ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
192 stars 150 forks source link

ibm_db install error on node v8.11.4 latest version #451

Closed nsanthoshkumar closed 6 years ago

nsanthoshkumar commented 6 years ago

Hi, I was trying to install ibm_db node module which used to work now starts complaining with the below error.

I tried various steps and different versions of node. None of them are working.

node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz...

100.00% | 20080158 bytes downloaded out of 20080158 bytes.


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 undefined 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.


Downloading and extraction of DB2 ODBC CLI Driver completed successfully ...

CXX(target) Release/obj.target/odbc_bindings/src/odbc.o

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME" In file included from ../src/odbc.cpp:22: In file included from /Users/nsanthoshkumar/.node-gyp/8.11.4/include/node/v8.h:19: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdint.h:119: In file included from /usr/local/include/stdint.h:82: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/inttypes.h:247: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/inttypes.h:30: /usr/include/inttypes.h:235:8: error: unknown type name 'intmax_t' extern intmax_t ^ /usr/include/inttypes.h:236:9: error: unknown type name 'intmax_t' imaxabs(intmax_t j); ^ /usr/include/inttypes.h:240:2: error: unknown type name 'intmax_t' intmax_t quot; ^ /usr/include/inttypes.h:241:2: error: unknown type name 'intmax_t' intmax_t rem; ^ /usr/include/inttypes.h:246:9: error: unknown type name 'intmax_t' imaxdiv(intmax_t numer, intmax_t denom); ^ /usr/include/inttypes.h:246:27: error: unknown type name 'intmax_t' imaxdiv(intmax_t numer, intmax_t denom); ^ /usr/include/inttypes.h:250:8: error: unknown type name 'intmax_t' extern intmax_t ^ /usr/include/inttypes.h:256:8: error: unknown type name 'uintmax_t'; did you mean 'uintptr_t'? extern uintmax_t ^ /usr/include/sys/_types/_uintptr_t.h:30:24: note: 'uintptr_t' declared here typedef unsigned long uintptr_t; ^ In file included from ../src/odbc.cpp:22:

removed the error messages because of path

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)

killed: false, code: 1, signal: null, cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ibm_db@2.3.1 install: node installer/driverInstall.js

rhtpandeyIN commented 6 years ago

Hi @nsanthoshkumar ,

I think this issue is coming from "node-gyp", please try to upgrade the node-gyp version to latest. Also, please include the details of the platform which you are using.

nsanthoshkumar commented 6 years ago

I tried updating the node-gyp, but it did not work. I am using Darwin 17.0. Also, it is caused by xcode. I read that the error is caused by the broken version of xcode. I removed the following folder as mentioned in the stackoverflow.

rm -r /usr/local/include

It worked like a charm and I am able to install the module without any issues.

Thanks for the prompt response.