SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 73 forks source link

libstdc++.so.6: version `GLIBCXX_3.4.21' not found #80

Closed EmryRosario closed 5 years ago

EmryRosario commented 5 years ago

node-rfc dependency not work for me, please help.

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by node_modules/node-rfc/build/rfc/rfc.node)`

bsrdjan commented 5 years ago

Are you using the docker container (which one?) and could you please describe steps leading to this error?

Did you try adding the missing library, like described here ?

EmryRosario commented 5 years ago

I'm not using the docker container. My environment is a server with ubuntu 14.04.

steps to make it happen: I only import var saprfc = require ('node-rfc').

I added the missing library and my error output changed to this I'm not using the docker container. My environment is a server with ubuntu 14.04.

steps to make it happen: I only import saprfc = require ('node-rfc').

I added the missing library and my error output changed to this symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev, version GLIBCXX_3.4.21 not defined in file libstdc ++. So.6 with link time reference

bsrdjan commented 5 years ago

Thank you, will try to reproduce.

Could you please let me know your nodejs version and if you installed the node-rfc@next by npm install node-rfc@next, or built from source?

EmryRosario commented 5 years ago

My node version is 9.11.1, I installed node-rfc from the source (I have version 0.1.16 of node-rfc)

bsrdjan commented 5 years ago

Could you please try the prerelease, with many new features and bugs' fixes:

npm install node-rfc@next

The 0.1.16 is not maintained anymore, only critical bugs.

EmryRosario commented 5 years ago

When I tried npm install node-rfc@next my output was:

npm install node-rfc@next

> node-rfc@1.0.0-rc7 preinstall /home/uranium/prueba/node_modules/node-rfc
> npm install node-pre-gyp node-addon-api

npm notice created a lockfile as package-lock.json. You should commit this file.
+ node-addon-api@1.6.3
+ node-pre-gyp@0.12.0
added 1 package and updated 8 packages in 1.801s

> node-rfc@1.0.0-rc7 install /home/uranium/prueba/node_modules/node-rfc
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/SAP/node-rfc/releases/download/1.0.0-rc7/rfc-linux-x64-node-v59.tar.gz
node-pre-gyp WARN Pre-built binaries not found for node-rfc@1.0.0-rc7 and node@9.11.1 (node-v59 ABI, glibc) (falling back to source compile with node-gyp)
gyp: binding.gyp not found (cwd: /home/uranium/prueba/node_modules/node-rfc) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 3.13.0-168-generic
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59/sapnwrfc.node" "--module_name=sapnwrfc" "--module_path=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v59"
gyp ERR! cwd /home/uranium/prueba/node_modules/node-rfc
gyp ERR! node -v v9.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/node/bin/node /usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59/sapnwrfc.node --module_name=sapnwrfc --module_path=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/uranium/prueba/node_modules/node-rfc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 3.13.0-168-generic
node-pre-gyp ERR! command "/usr/local/node/bin/node" "/home/uranium/prueba/node_modules/node-rfc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/uranium/prueba/node_modules/node-rfc
node-pre-gyp ERR! node -v v9.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/node/bin/node /usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59/sapnwrfc.node --module_name=sapnwrfc --module_path=/home/uranium/prueba/node_modules/node-rfc/lib/binding/linux-x64-node-v59 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59' (1)
npm WARN prueba@1.0.0 No description
npm WARN prueba@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-rfc@1.0.0-rc7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-rfc@1.0.0-rc7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/uranium/.npm/_logs/2019-04-09T14_38_42_541Z-debug.log
bsrdjan commented 5 years ago

Sorry, I overlooked you are using the nodejs release 9. Is it the standard one on Ubuntu 10.04 ?

This release is actually not supported and pre-compiled binaries are provided only for nodejs LTS releases.

I would suggest using any LTS release (6, 8, 10 or 11), otherwise the package must be built from source on your system. You may try nodejs version managers, like nvm for example.

If you go for older nodejs release, please upgrade the npm to the latest npm release (npm install npm), which is the only one supported. The default npm release for nodejs release you may check here.

EmryRosario commented 5 years ago

Sorry, I overlooked you are using the nodejs release 9. Is it the standard one on Ubuntu 10.04 ?

This release is actually not supported and pre-compiled binaries are provided only for nodejs LTS releases.

I would suggest using any LTS release (6, 8, 10 or 11), otherwise the package must be built from source on your system. You may try nodejs version managers, like nvm for example.

If you go for older nodejs release, please upgrade the npm to the latest npm release (npm install npm), which is the only one supported. The default npm release for nodejs release you may check here.

Thanks, this worked for me 🙂.