Background: I have AWS Lambda running nodejs 6.10. For my code i need to have a C Library to run algorithms. Which is compiled by node-gyp on my machine.
My buildserver was an outdated ubuntu 14.04, on which i was running my node-gyp compiled code and everything was working as expected.
Now, i have updated my ubuntu to 17.04 version. Which seems to giving me issues with Version of GLIBCXX
I have gathered the versions of GLIBCXX in different environments by running
- /sbin/ldconfig -p | grep stdc++
- (using the path from 1) strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX
Here you can see that on Ubuntu 17.04 GLIBCXX is available from v3.4 to 3.4.22, where as the other environments have it only upto 3.4.19.
My code compiled on Ubuntu 17.04 is looking for GLIBCXX_3.4.21 which is not available on the running environments and results in the following error
"errorMessage": "/var/lang/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /var/task/addon.node)",
Request: Is there any method by which (other than using custom dockers / going back to older versions of ubuntu etc) where i can set the compiler to use GLIBCXX_3.4.19, which i can eventually change when the environments (AWS lambda supports the latest version?). Ideally i am looking for a compiler flag that i can set permanently on the machine or via node-gyp that i can pass on so that i use the right version.
Observation: even though I have GLIBCXX_3.4.22 it is only linkling GLIBCXX_3.4.21 ( or they are backward compatible? )