Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"version `CXXABI_1.3.8' not found" on Amazon Linux with Node 12 #93

Open
rchampeimont opened this issue Jul 17, 2020 · 4 comments
Open
Labels

Comments

@rchampeimont
Copy link

After upgrading to Node 12 on my Amazon Linux server, I get this error when trying to load lzma-native:

$ node
Welcome to Node.js v12.18.2.
Type ".help" for more information.
> require('lzma-native')
Uncaught:
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/ec2-user/test/nodejs-doctrine-test/node_modules/lzma-native/binding-v6.0.1-n-api-linux-x64/lzma_native.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1188:18)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/ec2-user/test/nodejs-doctrine-test/node_modules/lzma-native/index.js:13:14
>

It seems that this is because the binary package is built with a more recent C++ ABI than the one with Amazon Linux:

$ strings /usr/lib64/libstdc++.so.6 |grep CXXABI
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1

I am using lzma-native 6.0.1, Node.js v12.18.2 on Amazon Linux AMI 2018.03.

It is possible to temporarily work around the issue by running npm rebuild lzma-native --build-from-source after npm install in my build process but of course this is kind of a hack.

Is there any better way to fix this for me? A way to fix it on your side?

@addaleax
Copy link
Owner

Hm yeah, not sure what to do about this – the prebuilt binaries are built on Travis CI, so that’s where the ABI requirement comes from. I’m not sure if there’s a way to request a lower built target value? Other than that, building from source when installing seems like a fair workaround …

@addaleax addaleax added the build label Jul 17, 2020
@rchampeimont
Copy link
Author

Thanks for you fast answer! Do you know if there a way to specify "permanently" that I always want to install lzma-native from source? like in package.json/npmrc or anything I could checkout in my own project repo?

@addaleax
Copy link
Owner

@raphaelchampeimont Sorry, I’m not aware of anything like that … :/

@baparham
Copy link

@raphaelchampeimont I've had success with this same issue by specifying --build-from-source=lzma-native when running npm install or npm rebuild to have it recompile (and more importantly, re-link) lzma using node-gyp against my current toolchain and libstdc++ library version. You'll need the prereqs outline on node-gyp's site though: https://github.com/nodejs/node-gyp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants