Git Product home page Git Product logo

Comments (5)

bimalkjha avatar bimalkjha commented on September 4, 2024 1

@Kaaviya36 I checked the error log file and it seems you are trying to install ibm_db under some container using docker script.
Under container environment, g++ is not part of gcc and hence we need to install it specifically. In your system, g++ package is missing and hence the error. Please install it.
We have documented below info under pre-requisite section of ibm_db for linux container: https://github.com/ibmdb/node-ibm_db?tab=readme-ov-file#prerequisite
image

So, you need to add g++ or gcc-c++ also in Step 5/8 on your script as below. I am not sure gcc-c++ package or g++ package is available on this linux container. Whichever works, use it and update here.

Step 5/8 : RUN apt-get update      && apt-get install gcc g++ gcc-c++ python3 make -y

Thanks.

from node-ibm_db.

bimalkjha avatar bimalkjha commented on September 4, 2024

@Kaaviya36 To avoid ELF header error, you need to delete node_modules directory from your local before pushing the e2e directory on linux jenkins. Your local is different than linux OS and hence binary files are not compatible.

During manual installation of ibm_db, you can see this error in the output log: npm ERR! make: g++: Command not found.
Having gcc and make on non-Windows is prerequisite to install ibm_db package. Please install gcc@12 on linux system and then install ibm_db. Thanks.

from node-ibm_db.

Kaaviya36 avatar Kaaviya36 commented on September 4, 2024

@bimalkjha Thank you so much for the response! I am seeing below error while doing npm install after installing gcc and make.

Step 6/8 : RUN npm install
---> Running in e753f82b0d1c
npm ERR! code 1
npm ERR! path /opt/app/node_modules/ibm_db
npm ERR! command failed
npm ERR! command sh -c node installer/driverInstall.js
npm ERR! ****************************************
npm ERR! You are downloading a package which includes the Node.js module for IBM DB2/Informix. The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in /opt/app/node_modules/ibm_db/installer/clidriver. Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.
npm ERR! ****************************************
npm ERR!
npm ERR! Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz ...
npm ERR!
npm ERR!
0.03% | 8000 bytes downloaded out of 25388860 bytes.
50.01% | 12696000 bytes downloaded out of 25388860 bytes.
100.00% | 25388860 bytes downloaded out of 25388860 bytes.
npm ERR!
npm ERR! Downloading and extraction of DB2 ODBC CLI Driver completed successfully.
npm ERR!
npm ERR! Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
npm ERR! make: g++: No such file or directory
npm ERR! make: *** [odbc_bindings.target.mk:120: Release/obj.target/odbc_bindings/src/odbc.o] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 3.10.0-1160.105.1.el7.x86_64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=/opt/app/node_modules/ibm_db/installer/clidriver"
npm ERR! gyp ERR! cwd /opt/app/node_modules/ibm_db
npm ERR! gyp ERR! node -v v20.6.1
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
npm ERR!
npm ERR! at ChildProcess.exithandler (node:child_process:422:12)
npm ERR! at ChildProcess.emit (node:events:514:28)
npm ERR! at maybeClose (node:internal/child_process:1105:16)
npm ERR! at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
npm ERR! code: 1,
npm ERR! killed: false,
npm ERR! signal: null,
npm ERR! cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"'
npm ERR! }

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-11T17_08_10_192Z-debug-0.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
Build step 'Execute shell' marked build as failure
Finished: FAILURE


Attaching the full log below for reference

kaaviya_errorlog.txt

from node-ibm_db.

bimalkjha avatar bimalkjha commented on September 4, 2024

@Kaaviya36 We still see below gcc error in the shared output of npm install:

npm ERR! Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
npm ERR! make: g++: No such file or directory
npm ERR! make: *** [odbc_bindings.target.mk:120: Release/obj.target/odbc_bindings/src/odbc.o] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Linux 3.10.0-1160.105.1.el7.x86_64

Could you please share output of below commands:

gcc --version
make --version
g++ --version
uname -a

Error says, make is unable to find g++ in the system. Please add location of g++ to PATH env var if it is present in your system. Else, try to upgrade GNU Make 3.82 to the latest version. I see GNU Make 4.2.1 installed in my Linux system. Thanks.

from node-ibm_db.

Kaaviya36 avatar Kaaviya36 commented on September 4, 2024

Thanks @bimalkjha works now!! appreciate your help

from node-ibm_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.