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

Binary Path in Release 0.16 is wrong #85

Closed
chforster opened this issue May 20, 2019 · 10 comments
Closed

Binary Path in Release 0.16 is wrong #85

chforster opened this issue May 20, 2019 · 10 comments

Comments

@chforster
Copy link

chforster commented May 20, 2019

When performing a "npm install node-rfc" I receive the following Error:

node-pre-gyp ERR! Tried to download(404): https://github.com/sap/node-rfc/releases/download/0.1.16/rfc-v0.1.16-node-v64-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)

The Binary Path provided in package.json is not valid anymore.
You should take "https://github.com/SAP/node-rfc/releases/tag/" instead of "https://github.com/sap/node-rfc/releases/download/"

@bsrdjan
Copy link
Contributor

bsrdjan commented May 20, 2019

Could you please use the node-rfc@next because node-rfc is not supported on node 10.

@chforster
Copy link
Author

chforster commented May 20, 2019

When using node-rfc@next the npm installworks, but afterwards I receive the following Error:

/home/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:26
throw ex;
^

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/root/node_modules/node-rfc/lib/binding/linux-x64-node-v64/sapnwrfc.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:9:15)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/root/node_modules/node-rfc/lib/index.js:6:10)
    at Module._compile (internal/modules/cjs/loader.js:701:30)

@bsrdjan
Copy link
Contributor

bsrdjan commented May 20, 2019

Could you please share the Linux version/release you are using? Is it a docker image and which one?

@chforster
Copy link
Author

chforster commented May 20, 2019

It's a Docker-Container running on Docker version 18.09.5.

Here's my first draft of the Dockerfile:

FROM node:10-jessie
COPY nwrfcsdk /usr/local/sap/nwrfcsdk
COPY nwrfcsdk.conf /etc/ld.so.conf.d/nwrfcsdk.conf
COPY src/ /home/root/
WORKDIR /home/root
ENV SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk
RUN /sbin/ldconfig
RUN npm install node-rfc@next

The js file I try to execute afterwards is just a connection attempt which worked when using node-rfc (0.16):

var client = new rfc.Client({'user': 'user', 'passwd': 'pwd', 'ashost': '10.0.0.1', 'sysnr': 'x01', 'client': '001'});

client.connect(function(err, res) {  // and connect
  if (err) {  // check for login/connection errors
    return console.error('could not connect to server', err);
  }

@bsrdjan
Copy link
Contributor

bsrdjan commented May 20, 2019

docker node images are based on older GLIBC versions and node-rfc must be built from source on them (see #35).

The npm install --build-from-source node-rfc@next should work but for some reason it doesn't. Just tested and need some time to investigate why.

In the meantime, attached sapnwrfc.node should help, just unpack and require('sapnwrfc.node').

@bsrdjan
Copy link
Contributor

bsrdjan commented May 22, 2019

npm install node-rfc@next --no-bin-links works now also in node:10-jessie containers.

The --no-bin-links required for now, because of npm issues.

@chforster
Copy link
Author

chforster commented May 22, 2019

Perfect, thx. Will try it asap.
The attached sapnwrfc.node you posted before worked also.

@bsrdjan
Copy link
Contributor

bsrdjan commented Jun 18, 2019

Fixed in rc10.

@bsrdjan bsrdjan closed this as completed Jun 18, 2019
@chforster
Copy link
Author

@bsrdjan : I just tried to install rc10 within my Docker-Container:
npm install node-rfc@next --no-bin-link

When calling my connection-function I still receive the error

/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:16
   throw ex;
   ^

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /root/node_modules/node-rfc/lib/binding/linux-x64-node-v64/sapnwrfc.node)

The SAP NW RFC SDK could not be loaded, check the installation: http://sap.github.io/node-rfc/install.html#sap-nw-rfc-sdk-installation
   at Object.Module._extensions..node (internal/modules/cjs/loader.js:730:18)
   at Module.load (internal/modules/cjs/loader.js:600:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
   at Function.Module._load (internal/modules/cjs/loader.js:531:3)
   at Module.require (internal/modules/cjs/loader.js:637:17)
   at require (internal/modules/cjs/helpers.js:22:18)
   at Object.<anonymous> (/root/node_modules/node-rfc/lib/wrapper/sapnwrfc-client.js:9:15)
   at Module._compile (internal/modules/cjs/loader.js:701:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
   at Module.load (internal/modules/cjs/loader.js:600:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
   at Function.Module._load (internal/modules/cjs/loader.js:531:3)
   at Module.require (internal/modules/cjs/loader.js:637:17)
   at require (internal/modules/cjs/helpers.js:22:18)
   at Object.<anonymous> (/root/node_modules/node-rfc/lib/index.js:6:10)
   at Module._compile (internal/modules/cjs/loader.js:701:30)

When building from source it works npm install --build-from-source node-rfc@next

@bsrdjan
Copy link
Contributor

bsrdjan commented Jun 24, 2019

The node-rfc Linux addon is built on ubuntu based docker image, using GLIBC version 2.27. Docker node images are still using older GLIBC versions (see comment of #35) and the build from source is therefore required.

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

No branches or pull requests

2 participants