1

This is an extension on a previous question asked here: libstdc++ GLIBCXX version errors

I have a Node.js app which runs fine locally (Ubuntu 16.04), but when I upload the bundle to AWS Elastic Beanstalk, I get an error related to my DLLs. The app uses the ffi node-module to call C++ functions in the form of a DLL (.so). When the app is run on AWS, I get a GLIBCXX version error which results in failed dynamic linking calls.

While posts on previous questions have suggested to use static linking instead of dynamic linking, this is not an option for me since the C++ add-on must be a dll. It seems then that I need to compile my dll such that it uses an earlier version GLIBCXX.

My questions are then:

  1. How do I know which version of GLIBCXX is running on my AWS instance?
  2. How do I compile my dll to use an earlier version of GLIBCXX?
  3. Is there anyway to solve these issues on the AWS instance itself (i.e. doesn't require recompiling the dll to an earlier version of GLIBCXX)

For reference, here is the exact error I am getting:

Error: Dynamic Linking Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by Code/C++/mathreco/TRUNK/src/lib/libsmath.so) at new DynamicLibrary (/var/app/current/node_modules/ffi/lib/dynamic_library.js:74:11)

Community
  • 1
  • 1
Connor Flood
  • 67
  • 1
  • 6

1 Answers1

-1

Answer found here: How to fix: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found

Link statically to libstdc++ with -static-libstdc++ gcc option.

For some reason I didn't think I could statically link libstc++ since my library was dynamically linked. Happy it worked!

Community
  • 1
  • 1
Connor Flood
  • 67
  • 1
  • 6