Closed anupong-s closed 5 years ago
I already fixed.
Hi @bsrdjan, I have the same problem. My build fails when I run this command 'node-pre-gyp configure build'. The error is as follows:
I also tried to install via "npm install node-rfc@next" and it seems ok, but when I run a test it gives me this error:
Can you help me? Thank you. Kind regards
@Santech88, the first screenshot indicates that SAP NW RFC SDK could not be found. Did you install and register SAP NW RFC SDK on your Linux system (see documentation) ? If SAP NW RFC SDK not present, the npm install works but the node-rfc wrapper can't work without SDK. Kind regards
Hi @bsrdjan,
Thanks for your reply. I followed the documentation. I'll list my steps:
1) I downloaded SAP NW RFC SDK 7.5 Linux on x86_64 64bit 2) I extracted the lib directory on /usr/local/sap/nwrfcsdk/lib 3) I create nwrfcsdk.conf file and then I run "ldconfig" command on terminal. Maybe I skipped a few steps?
Kind regards
To check if libraries are loaded, you may run
$ ldconfig -p | grep sap
libsapucum.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libsapucum.so
libsapnwrfc.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libsapnwrfc.so
libicuuc.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicuuc.so.50
libicui18n.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicui18n.so.50
libicudecnumber.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicudecnumber.so
libicudata.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicudata.so.50
libgssapi_krb5.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
libgssapi.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgssapi.so.3
$
or:
$ cd /usr/local/sap/nwrfcsdk/bin
sudo chmod a+x rfcexec
./rfcexec # should show something like:
Error: Not all mandatory parameters specified
Please start the program in the following way:
rfcexec -t -a <program ID> -g <gateway host> -x <gateway service>
-f <file with list of allowed commands> -s <allowed Sys ID>
The options "-t" (trace), "-f" and "-s" are optional.
$
Did you set SAPNNWRFC_HOME env variable to /usr/local/sap/nwrfcsdk
?
I had not set the env variable! Thank you @bsrdjan
Glad it works now and here the updated installation and build from source documentation.
I try to installed follow 'Build from the latest source' but it's failed when I run this command 'node-pre-gyp configure build'.
What should I do?
$ node-pre-gyp configure build node-pre-gyp info it worked if it ends with ok node-pre-gyp info using node-pre-gyp@0.11.0 node-pre-gyp info using node@8.11.3 | linux | x64 gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@8.11.3 | linux | x64 gyp info spawn /usr/bin/python2 gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/anupong.s/www_root/saprfc/node-rfc/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/anupong.s/.node-gyp/8.11.3/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/anupong.s/.node-gyp/8.11.3', gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/anupong.s/.node-gyp/8.11.3/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/anupong.s/www_root/saprfc/node-rfc', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info ok gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@8.11.3 | linux | x64 make: Entering directory (/usr/lib/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 3.10.0-862.3.3.el7.x86_64
node-pre-gyp ERR! command "/usr/bin/node" "/usr/bin/node-pre-gyp" "configure" "build"
node-pre-gyp ERR! cwd /home/anupong.s/www_root/saprfc/node-rfc
node-pre-gyp ERR! node -v v8.11.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --module=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57/sapnwrfc.node --module_name=sapnwrfc --module_path=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
/home/anupong.s/www_root/saprfc/node-rfc/build' gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o AR(target) Release/obj.target/node_modules/node-addon-api/src/nothing.a COPY Release/nothing.a CXX(target) Release/obj.target/sapnwrfc/src/node_sapnwrfc.o CXX(target) Release/obj.target/sapnwrfc/src/client.o CXX(target) Release/obj.target/sapnwrfc/src/rfcio.o CXX(target) Release/obj.target/sapnwrfc/src/error.o SOLINK_MODULE(target) Release/obj.target/sapnwrfc.node g++: error: unrecognized command line option ‘-rpath,$ORIGIN’ make: *** [Release/obj.target/sapnwrfc.node] Error 1 make: Leaving directory
/home/anupong.s/www_root/saprfc/node-rfc/build' gyp ERR! build error gyp ERR! stack Error:make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.10.0-862.3.3.el7.x86_64 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--module=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57/sapnwrfc.node" "--module_name=sapnwrfc" "--module_path=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" gyp ERR! cwd /home/anupong.s/www_root/saprfc/node-rfc gyp ERR! node -v v8.11.3 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/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --module=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57/sapnwrfc.node --module_name=sapnwrfc --module_path=/home/anupong.s/www_root/saprfc/node-rfc/lib/binding/linux-x64-node-v57 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) node-pre-gyp ERR! stack at ChildProcess.