SAP / node-rfc

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

Can not support in ppc64le architecture. #235

Closed mitulsrv closed 1 year ago

mitulsrv commented 2 years ago

Describe the bug Basically, i am installing node-rfc package into RedHat ppc64le architecture but it seems not installing. i also tried in alpine linux with architecture of ppc64le for os confirmation of problem. I had set two environment variable as LD_LIBRARY_PATH to nwrfcsdk lib as well SAPNWRFC_HOME for nwrfcsdk but it seems following error.

To Reproduce Describe how the node-rfc is installed, like locally or globally and using npm install or build from source.

Error as below

/home/node0js/project # npm install --build-from-source node-rfc
npm ERR! code 1
npm ERR! path /home/node0js/project/node_modules/node-rfc
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix -r napi || cmake-js rebuild
npm ERR! [
npm ERR!   '/usr/bin/node',
npm ERR!   '/home/node0js/project/node_modules/node-rfc/node_modules/.bin/cmake-js',
npm ERR!   'rebuild'
npm ERR! ]
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- The C compiler identification is GNU 10.3.1
npm ERR! -- The CXX compiler identification is GNU 10.3.1
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: /usr/bin/cc - skipped
npm ERR! -- Detecting C compile features
npm ERR! -- Detecting C compile features - done
npm ERR! -- Detecting CXX compiler ABI info
npm ERR! -- Detecting CXX compiler ABI info - done
npm ERR! -- Check for working CXX compiler: /usr/bin/c++ - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Configuring done
npm ERR! -- Generating done
npm ERR! -- Build files have been written to: /home/node0js/project/node_modules/node-rfc/build
npm ERR! [ 14%] Building CXX object CMakeFiles/sapnwrfc.dir/src/Client.cc.o
npm ERR! [ 28%] Building CXX object CMakeFiles/sapnwrfc.dir/src/nwrfcsdk.cc.o
npm ERR! [ 42%] Building CXX object CMakeFiles/sapnwrfc.dir/src/Pool.cc.o
npm ERR! [ 57%] Building CXX object CMakeFiles/sapnwrfc.dir/src/Throughput.cc.o
npm ERR! [ 71%] Building CXX object CMakeFiles/sapnwrfc.dir/src/Server.cc.o
npm ERR! [ 85%] Building CXX object CMakeFiles/sapnwrfc.dir/src/addon.cc.o
npm ERR! [100%] Linking CXX shared library ../lib/binding/sapnwrfc.node
npm ERR! info TOOL Using Unix Makefiles generator.
npm ERR! info CMD CLEAN
npm ERR! info RUN [
npm ERR! info RUN   'cmake',
npm ERR! info RUN   '-E',
npm ERR! info RUN   'remove_directory',
npm ERR! info RUN   '/home/node0js/project/node_modules/node-rfc/build'
npm ERR! info RUN ]
npm ERR! info CMD CONFIGURE
npm ERR! info RUN [
npm ERR! info RUN   'cmake',
npm ERR! info RUN   '/home/node0js/project/node_modules/node-rfc',
npm ERR! info RUN   '--no-warn-unused-cli',
npm ERR! info RUN   '-G',
npm ERR! info RUN   'Unix Makefiles',
npm ERR! info RUN   '-DCMAKE_JS_VERSION=6.2.1',
npm ERR! info RUN   '-DCMAKE_BUILD_TYPE=Release',
npm ERR! info RUN   '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/node0js/project/node_modules/node-rfc/build/Release',
npm ERR! info RUN   '-DCMAKE_JS_INC=/root/.cmake-js/node-ppc64/v14.17.6/include/node',
npm ERR! info RUN   '-DCMAKE_JS_SRC=',
npm ERR! info RUN   '-DNODE_RUNTIME=node',
npm ERR! info RUN   '-DNODE_RUNTIMEVERSION=14.17.6',
npm ERR! info RUN   '-DNODE_ARCH=ppc64'
npm ERR! info RUN ]
npm ERR! N-API version: 6   /usr/local/include
npm ERR! SAP NWRFC SDK: 
npm ERR! info CMD BUILD
npm ERR! info RUN [
npm ERR! info RUN   'cmake',
npm ERR! info RUN   '--build',
npm ERR! info RUN   '/home/node0js/project/node_modules/node-rfc/build',
npm ERR! info RUN   '--config',
npm ERR! info RUN   'Release'
npm ERR! info RUN ]
npm ERR! In file included from /home/node0js/project/node_modules/node-rfc/src/Pool.h:10,
npm ERR!                  from /home/node0js/project/node_modules/node-rfc/src/Pool.cc:5:
npm ERR! /home/node0js/project/node_modules/node-rfc/src/nwrfcsdk.h: In member function 'virtual void node_rfc::AcquireAsync::OnOK()':
npm ERR! /home/node0js/project/node_modules/node-rfc/src/nwrfcsdk.h:145:43: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
npm ERR!   145 |             timeout = pool_client_options.timeout;
npm ERR!       |                       ~~~~~~~~~~~~~~~~~~~~^~~~~~~
npm ERR! /usr/lib/gcc/powerpc64le-alpine-linux-musl/10.3.1/../../../../powerpc64le-alpine-linux-musl/bin/ld: /home/nwrfcsdk/lib/libsapnwrfc.so: error adding symbols: file in wrong format
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make[2]: *** [CMakeFiles/sapnwrfc.dir/build.make:177: ../lib/binding/sapnwrfc.node] Error 1
npm ERR! make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sapnwrfc.dir/all] Error 2
npm ERR! make: *** [Makefile:91: all] Error 2
npm ERR! ERR! OMG Process terminated: 2

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-21T13_02_07_333Z-debug.log

Please help me on that, how could i solve this problem ?

bsrdjan commented 2 years ago

The standard build is not available, the PPC is supported by build from source only.

Further info:

You can also refer to these Docker containers, for build toolchain configuration: SAP/fundamental-tools/docker

bsrdjan commented 1 year ago

SAP NWRFC SDK is not supported on ppc64le platform, see https://launchpad.support.sap.com/#/notes/2573790. Please re-open if still needed