ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

ibm_db install on z/OS is failing #961

Closed srinivasabommareddy closed 7 months ago

srinivasabommareddy commented 8 months ago

Please provide below information while opening an issue to understand your problem

For non-Windows system, output of below commands from terminal:

uname OS/390 uname -m 8561 node -v v18.14.2 npm ls ibm_db

bomms@1.0.0 /u/ttbr/home/bomms
`-- (empty)

db2level V12 echo $IBM_DB_HOME SYSDB2.DQA0

echo $PATH /usr/lpp/IBM/oelcpp/v2r0/bin:/usr/lpp/ported/road4z/bin:/bin:/usr/sbin:.:/usr/lpp/java/J8.0_64/bin:/usr/lpp/ported/git/bin:/usr/bin:/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/bin:/service/rocket/python/python-2017-04-12-py36/python36/bin:/usr/lpp/ported/openssl/bin:/usr/lpp/IBM/dbb:/usr/lpp/IBM/dbb/migration/bin:/usr/lpp/ported/curl/bin

echo $LD_LIBRARY_PATH $DYLD_LIBRARY_PATH

Null

Please provide below problem specific info:

========================================= $ npm install ibm_db npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm ERR! code 1 npm ERR! path /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! command failed npm ERR! command sh -c node installer/driverInstall.js npm ERR! platform = os390, arch = s390x, node.js version = v18.14.2 npm ERR! make version =GNU Make 4.4.1 npm ERR! make: Entering directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! CXX(target) Release/obj.target/odbc_bindings/src/odbc.o npm ERR! make: Leaving directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! npm ERR! Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME" npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.1 npm ERR! gyp info using node@18.14.2 | os390 | s390x npm ERR! gyp info find Python using Python version 3.10.7 found at "/usr/lpp/ported/road4z/bin/python3" npm ERR! gyp info spawn /usr/lpp/ported/road4z/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x', npm ERR! gyp info spawn args '-Dnode_exp_file=/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/libnode.x', npm ERR! gyp info spawn args '-Dzoslib_include_dir=/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/include/node/zoslib', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/$(Configuration)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/u/ttbr/home/bomms/TestDB/node_modules/ibm_db', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! ../src/odbc.cpp:18:11: warning: '_AE_BIMODAL' macro redefined [-Wmacro-redefined] npm ERR! #define _AE_BIMODAL npm ERR! ^ npm ERR! :28:9: note: previous definition is here npm ERR! #define _AE_BIMODAL 1 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:37: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-savstack.h:15: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:11:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma nomargins nosequence npm ERR! ^ npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:12:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma checkout(suspend) npm ERR! ^ npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:614:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma checkout(resume) npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:60:3: error: expected identifier npm ERR! CLOCK_REALTIME, npm ERR! ^ npm ERR! /usr/include/time.h:106:33: note: expanded from macro 'CLOCK_REALTIME' npm ERR! #define CLOCK_REALTIME 0 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:61:3: error: expected identifier npm ERR! CLOCK_MONOTONIC, npm ERR! ^ npm ERR! /usr/include/time.h:107:33: note: expanded from macro 'CLOCK_MONOTONIC' npm ERR! #define CLOCK_MONOTONIC 1 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:64:3: error: typedef redefinition with different types ('enum clockid_t' vs 'unsigned int') npm ERR! } clockid_t; npm ERR! ^ npm ERR! /usr/include/sys/types.h:277:35: note: previous definition is here npm ERR! typedef unsigned int clockid_t; npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! ../build/include/sqlcli1.h:51:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLCLI1 /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:52:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:53:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:53:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:54:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:62: npm ERR! ../build/include/sqlsystm.h:32:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLSYSTM /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:33:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:34:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:34:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:35:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:36:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=define SQL_H_SQLSYSTM /@03/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:64: npm ERR! ../build/include/sqlca.h:31:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQLCODE / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:32:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:33:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:33:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:34:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:65: npm ERR! ../build/include/sqlcli.h:55:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLCLI /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:56:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:57:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:57:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:58:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:792: npm ERR! ../build/include/sqlext.h:41:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQLEXT / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:42:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:43:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:43:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:44:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:798: npm ERR! ../build/include/sqlwapi.h:35:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLWAPI / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:36:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:37:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:37:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:38:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! ../src/odbc.cpp:216:15: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! data->cb->Call(1, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! ../src/odbc.cpp:228:15: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! data->cb->Call(2, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! ../src/odbc.cpp:799:10: error: use of undeclared identifier 'SQL_BOOLEAN' npm ERR! case SQL_BOOLEAN : npm ERR! ^ npm ERR! ../src/odbc.cpp:1205:27: error: use of undeclared identifier 'SQL_BOOLEAN' npm ERR! param->type == SQL_BOOLEAN || param->type == SQL_SMALLINT || npm ERR! ^ npm ERR! ../src/odbc.cpp:1536:7: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! cb->Call(1, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! 38 warnings and 5 errors generated. npm ERR! make: *** [odbc_bindings.target.mk:175: Release/obj.target/odbc_bindings/src/odbc.o] Error 1 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 (/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System OS/390 28.00 npm ERR! gyp ERR! command "/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/bin/node" "/CTQ111/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.14.2-os390-s390x-202303231340/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=SYSDB2.DQA0" npm ERR! gyp ERR! cwd /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! gyp ERR! node -v v18.14.2 npm ERR! gyp ERR! node-gyp -v v9.3.1 npm ERR! gyp ERR! not ok npm ERR! npm ERR! at ChildProcess.exithandler (node:child_process:419:12) npm ERR! at ChildProcess.emit (node:events:513:28) npm ERR! at maybeClose (node:internal/child_process:1134:16) npm ERR! at ChildProcess._handle.onexit (node:internal/child_process:302:5) { npm ERR! code: 1, npm ERR! killed: false, npm ERR! signal: null, npm ERR! cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' npm ERR! } npm ERR! oput 'SYSDB2.DQA0.SDSNMACS(DSNAO64C)' '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/dsnao64c.x'

npm ERR! A complete log of this run can be found in: npm ERR! /u/ttbr/home/bomms/.npm/_logs/2023-10-31T12_12_02_233Z-debug-0.log $

For Installation related issue

Steps to Reproduce:

1.npm install ibm_db

I tried with Node V16 and V12 as well, Same issue. Also Tried with different version of ibm_db without any luck.

bimalkjha commented 8 months ago

@srinivasabommareddy What is the version of your z/OS and Db2?

srinivasabommareddy commented 8 months ago

z/OS 2.4: DB2 version 12

bimalkjha commented 8 months ago

@srinivasabommareddy I see mainly below errors:

npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:60:3: error: expected identifier
npm ERR! CLOCK_REALTIME,
npm ERR! ^
npm ERR! /usr/include/time.h:106:33: note: expanded from macro 'CLOCK_REALTIME'
npm ERR! #define CLOCK_REALTIME 0
npm ERR! ^

npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:64:3: error: typedef redefinition with different types ('enum clockid_t' vs 'unsigned int')
npm ERR! } clockid_t;
npm ERR! ^
npm ERR! /usr/include/sys/types.h:277:35: note: previous definition is here
npm ERR! typedef unsigned int clockid_t;
npm ERR! ^

npm ERR! ../src/odbc.cpp:799:10: error: use of undeclared identifier 'SQL_BOOLEAN'
npm ERR! case SQL_BOOLEAN :
npm ERR! ^
npm ERR! ../src/odbc.cpp:1205:27: error: use of undeclared identifier 'SQL_BOOLEAN'
npm ERR! param->type == SQL_BOOLEAN || param->type == SQL_SMALLINT ||
npm ERR! ^

The first two errors are related to OS header file and third error says SQL_BOOLEAN is not defined in sqlcli.h header file. Both points that OS and Db2 is of older version. We have tested ibm_db@2.8.1 with Db2 for z/OS v11.0 and v12.0 and do not observed error about SQL_BOOLEAN. I hope you have configured the ODBC driver on z/OS before installation of ibm_db as documented here: https://github.com/ibmdb/node-ibm_db#configure-odbc-driver-on-zos

bimalkjha commented 8 months ago

@srinivasabommareddy Please share your PTF level and confirm that you have applied all PTFs as documented here: https://www.ibm.com/docs/en/sdk-nodejs-zos/18.0?topic=configuring-installing-smpe-format

bimalkjha commented 8 months ago

@srinivasabommareddy I saw the closed issue #939 and came to know from IBM slack discussion that SSL connection issue got resolved after setting the correct environment variables by . <nodejs_dir>/.env command. And now you are getting error shared in this issue. I posted this error on IBM Slack and Wayne Zhang updated that - it appears that PTF UI81095 was not installed correctly, which could be a potential cause of the errors. Please apply the PTF and continue to work with Karen Wilkins.

Basically you are getting 3 errors during installation related to - CLOCK_REALTIME, clockid_t and SQL_BOOLEAN.

SQL_BOOLEAN was added in ibm_db@2.5.3 two years back and it is working for everyone. Since, your installation is unable to find SQL_BOOLEAN in the odbc header file points that ODBC is not configured correctly or some very old version of Db2 header files are getting pointed. Please check it.

About other two errors of zos-base.h file, I got below updates:

there's no clockid_t in /usr/include/sys/types.h on our V2R4 machine; and also no CLOCK_REALTIME in our V2R4's 
/usr/include/time.h (as referenced in the error). Did they apply all PTFs listed in
 https://www.ibm.com/docs/en/sdk-nodejs-zos/18.0?topic=configuring-installing-smpe-format ?

I see clockid_t in the zoslib/zos-base.h used in node v18's zoslib has now been moved to include/time.h under v2r5 
guard, so customer won't encounter it. Do you know why the customer's /usr/include/sys/types.h is different than
the one in our V2R4 machine? Can you please check if your V2R4 machine includes clockid_t in types.h?

So, it seems the system is not configured properly for installation of ibm_db and these errors do not point about any issue in ibm_db code. Please continue working with Karen Wilkins to resolve the system configuration issue. I am already involved with them on slack and will provide any input required from ibm_db side. Thanks.

srinivasabommareddy commented 8 months ago

@bimaljha I have validated the information with our Sys progs. Here is update:

Small correction - we are on z/OS 2.5. 1st thing I noticed is we are running z/OS 2.5 - this issue has been around so long it might have been 2.4 when you started but I don't think so

As regards the pre-reqs for node.js v18 (https://www.ibm.com/docs/en/sdk-nodejs-zos/18.0?topic=configuring-installing-smpe-format) I checked the PTFs mentioned and all are applied, I also ran the setup.sh script on S-Plex and it came back clean.

I also validated DB2 and all PTFs are applied for ODBC.

It is continuous of issue. 939

Kareen from IBM has been helping us.

The first issue was related to some of the environment variable missing. We have added them. Which resolved header file GEt issue.

… it looks like there is a GET request being made to https://nodejs.org/download/release/v18.14.2/node-v18.14.2-headers.tar.gz according to the logs you linked. However, this request shouldn't be necessary when npm_config_nodedir and npm_config_zoslib_include_dir are set correctly. Can you ask them to confirm that they performed all the installation steps as documented in https://www.ibm.com/docs/en/sdk-nodejs-zos/18.0?topic=configuring-installing-pax-format ?If they did not perform the . /.env step then the above environment variables would not be set. They can validate whether the environment variables are set correctly or not by running env | grep npmconfig

The second problem was that we did not have c/C++ compler.

In the log you posted, I see this error message: 692 error make: clang++: EDC5129I No such file or directory.Please ask them to confirm if they've installed IBM C/C++ for Open Enterprise Languages on z/OS 2.0 and that it's available in their PATH environment variable.

And also that they've installed Make 4.1 or later. Make 4.4.1 is available via z/OS Open Tools https://github.com/ZOSOpenTools/makeport/releases (edited)

We added c/c++ complier.

I have raised this new issue because the older issue got closed and also the issue we are facing looks more like with ibm_db package rather than z/os set-up.

Thank you so much for all your help.

bimalkjha commented 8 months ago

@srinivasabommareddy Thanks for confirming that the OS version is 2.5 and not 2.4. It seems there is a bug in file IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h for z/OS 2.5. Please get it fixed from z/OS team. Thanks.

bimalkjha commented 8 months ago

About SQL_BOOLEAN issue - SQL_BOOLEAN should be defined in a header file under HLQ of Db2 dataset. You have set IBM_DB_HOME as SYSDB2.DQA0. Please check if it is correct. As per ibm_db doc: https://github.com/ibmdb/node-ibm_db/blob/master/INSTALL.md#82-configure-odbc-driver-on-zos

Set the IBM_DB_HOME environment variable to the High Level Qualifier (HLQ) of your Db2 datasets. For example, if your Db2 datasets are located as DSNC10.SDSNC.H and DSNC10.SDSNMACS, you need to set IBM_DB_HOME environment variable to DSNC10 with the following statement (can be saved in ~/.profile):

# Set HLQ to Db2 datasets.
export IBM_DB_HOME="DSNC10"

I think once set IBM_DB_HOME in right way, SQL_BOOLEAN error should go. Thanks.

bimalkjha commented 8 months ago

If SYSDB2.DQA0 is correct value for IBM_DB_HOME, then please search .H files and check which file has SQL_BOOLEAN defined?

srinivasabommareddy commented 8 months ago

Hello Bimal

I can confirm IBM_DB_HOME value is correct and I can see both datasets mentioned in the SYSDB2.DQA0.SDSNC.H and SYSDB2.DQA0.SDSNMACS

I the searched the .H library for SQL_BOOLEAN. Only occurrence I found is SQL_BOOLEAN_LENGTH in member DSNSQL and SQL

I can not find SQL_BOOLEAN on its own.

bimalkjha commented 8 months ago

@srinivasabommareddy Ok. If you do not find SQL_BOOLEAN, can you search for BOOL and see any similar defines like SQLBOOL? and in which header file it is? On LUW system, we see these two defines in db2 header files:

clidriver/include> grep SQL_BOOLEAN *
sqlcli.h:#define  SQL_BOOLEAN            16
sql.h:#define SQL_BOOLEAN_LENGTH     1       /* Size of a BOOLEAN field             */
clidriver/include> 

It seems Db2 for z/OS has different datatype for boolean column than the Db2 for LUW. Thanks.

srinivasabommareddy commented 8 months ago

I have looked at the datatype defined on host (sqlcli) Here is the list. / Standard SQL data types /

define SQL_CHAR 1

define SQL_NUMERIC 2

define SQL_DECIMAL 3

define SQL_INTEGER 4

define SQL_SMALLINT 5

define SQL_FLOAT 6

define SQL_REAL 7

define SQL_DOUBLE 8

define SQL_DATE 9

define SQL_TIME 10

define SQL_TIMESTAMP 11

define SQL_VARCHAR 12

define SQL_DATETIME SQL_DATE //d9526

define SQL_DECFLOAT (-360) //li700_cli

Data types from Windows CLI driver

bimalkjha commented 8 months ago

@srinivasabommareddy It seems Db2 for z/OS is missing define for SQL_BOOLEAN. May be not supporting yet. I'll update ibm_db/src/odbc.h file to define #define SQL_BOOLEAN 16 to fix compilation issue. Node.js on z/OS dev team is working on zoslib issue. Thanks.

bimalkjha commented 7 months ago

Released ibm_db@3.2.3 with fix of SQL_BOOLEAN issue. Hence, closing this issue. Thanks.

srinivasabommareddy commented 7 months ago

Thank you so much for fixing the SQL-BOOLEAN issue.

I have tried to install ibm_db 3.2.3. Still facing issue. Not very sure still issue with Node on host of ibm_db. Here is the latest install log npm install ibm_db npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm ERR! code 1 npm ERR! path /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! command failed npm ERR! command sh -c node installer/driverInstall.js npm ERR! platform = os390, arch = s390x, node.js version = v18.18.2 npm ERR! make version =GNU Make 4.4.1 npm ERR! make: Entering directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! CXX(target) Release/obj.target/odbc_bindings/src/odbc.o npm ERR! make: Leaving directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! npm ERR! Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME" npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.0 npm ERR! gyp info using node@18.18.2 | os390 | s390x npm ERR! gyp info find Python using Python version 3.10.7 found at "/usr/lpp/ported/road4z/bin/python3" npm ERR! gyp info spawn /usr/lpp/ported/road4z/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x', npm ERR! gyp info spawn args '-Dnode_exp_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/libnode.x', npm ERR! gyp info spawn args '-Dzoslib_include_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/include/node/zoslib', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/$(Configuration)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/u/ttbr/home/bomms/TestDB/node_modules/ibm_db', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! ../src/odbc.cpp:18:11: warning: '_AE_BIMODAL' macro redefined [-Wmacro-redefined] npm ERR! #define _AE_BIMODAL npm ERR! ^ npm ERR! :28:9: note: previous definition is here npm ERR! #define _AE_BIMODAL 1 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:37: npm ERR! In file included from /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-savstack.h:15: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:11:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma nomargins nosequence npm ERR! ^ npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:12:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma checkout(suspend) npm ERR! ^ npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/edcwccwi.h:614:28: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! #pragma checkout(resume) npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:60:3: error: expected identifier npm ERR! CLOCK_REALTIME, npm ERR! ^ npm ERR! /usr/include/time.h:106:33: note: expanded from macro 'CLOCK_REALTIME' npm ERR! #define CLOCK_REALTIME 0 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:61:3: error: expected identifier npm ERR! CLOCK_MONOTONIC, npm ERR! ^ npm ERR! /usr/include/time.h:107:33: note: expanded from macro 'CLOCK_MONOTONIC' npm ERR! #define CLOCK_MONOTONIC 1 npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8.h:23: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/cppgc/common.h:9: npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/v8config.h:34: npm ERR! /usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:64:3: error: typedef redefinition with different types ('enum clockid_t' vs 'unsigned int') npm ERR! } clockid_t; npm ERR! ^ npm ERR! /usr/include/sys/types.h:277:35: note: previous definition is here npm ERR! typedef unsigned int clockid_t; npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! ../build/include/sqlcli1.h:51:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLCLI1 /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:52:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:53:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:53:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli1.h:54:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:62: npm ERR! ../build/include/sqlsystm.h:32:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLSYSTM /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:33:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:34:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:34:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:35:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /@03/ npm ERR! ^ npm ERR! ../build/include/sqlsystm.h:36:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=define SQL_H_SQLSYSTM /@03/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:64: npm ERR! ../build/include/sqlca.h:31:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQLCODE / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:32:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:33:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:33:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlca.h:34:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:65: npm ERR! ../build/include/sqlcli.h:55:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLCLI /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:56:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:57:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:57:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlcli.h:58:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:792: npm ERR! ../build/include/sqlext.h:41:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQLEXT / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:42:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:43:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:43:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlext.h:44:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! In file included from ../src/odbc.cpp:29: npm ERR! In file included from ../src/odbc.h:27: npm ERR! In file included from ../build/include/sqlcli1.h:798: npm ERR! ../build/include/sqlwapi.h:35:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifndef SQL_H_SQLWAPI / Permit Duplicate Includes/ /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:36:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=ifdef COMPILER_VER /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:37:4: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:37:14: warning: unknown pragma ignored [-Wunknown-pragmas] npm ERR! ??=pragma filetag("IBM-1047") /d43265/ npm ERR! ^ npm ERR! ../build/include/sqlwapi.h:38:1: warning: trigraph converted to '#' character [-Wtrigraphs] npm ERR! ??=endif /d43265/ npm ERR! ^ npm ERR! ../src/odbc.cpp:216:15: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! data->cb->Call(1, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! ../src/odbc.cpp:228:15: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! data->cb->Call(2, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! ../src/odbc.cpp:1536:7: warning: 'Call' is deprecated [-Wdeprecated-declarations] npm ERR! cb->Call(1, info); npm ERR! ^ npm ERR! ../../nan/nan.h:1747:3: note: 'Call' has been explicitly marked deprecated here npm ERR! NAN_DEPRECATED inline v8::Local npm ERR! ^ npm ERR! ../../nan/nan.h:112:40: note: expanded from macro 'NAN_DEPRECATED' npm ERR! # define NAN_DEPRECATED attribute((deprecated)) npm ERR! ^ npm ERR! 38 warnings and 3 errors generated. npm ERR! make: *** [odbc_bindings.target.mk:175: Release/obj.target/odbc_bindings/src/odbc.o] Error 1 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 (/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! System OS/390 28.00 npm ERR! gyp ERR! command "/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/bin/node" "/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=SYSDB2.DQA0" npm ERR! gyp ERR! cwd /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! gyp ERR! node -v v18.18.2 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:517:28) npm ERR! at maybeClose (node:internal/child_process:1141:16) npm ERR! at Socket. (node:internal/child_process:493:11) npm ERR! at Socket.emit (node:events:517:28) npm ERR! at Pipe. (node:net:350:12) { npm ERR! code: 1, npm ERR! killed: false, npm ERR! signal: null, npm ERR! cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' npm ERR! } npm ERR! oput 'SYSDB2.DQA0.SDSNMACS(DSNAO64C)' '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/dsnao64c.x'

npm ERR! A complete log of this run can be found in: /u/ttbr/home/bomms/.npm/_logs/2023-11-17T06_10_00_923Z-debug-0.log $

bimalkjha commented 7 months ago

@srinivasabommareddy Thanks for sharing complete install output of ibm_db version 3.2.3. We can see below 3 errors in above output:

npm ERR! In file included from /service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/
       IBM/node-latest-os390-s390x/include/node/v8config.h:34:
npm ERR! /usr/lpp/IBM/cnj/v18r0/
       IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:60:3: error: expected identifier
npm ERR! CLOCK_REALTIME,
npm ERR! ^

npm ERR! /usr/lpp/IBM/cnj/v18r0/
       IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:61:3: error: expected identifier
npm ERR! CLOCK_MONOTONIC,
npm ERR! ^

npm ERR! /usr/lpp/IBM/cnj/v18r0/
       IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h:64:3: error: typedef redefinition
 with different types ('enum clockid_t' vs 'unsigned int')
npm ERR! } clockid_t;
npm ERR! ^
npm ERR! /usr/include/sys/types.h:277:35: note: previous definition is here
npm ERR! typedef unsigned int clockid_t;
npm ERR! ^

All errors are from file IBM/node-latest-os390-s390x/include/node/zoslib/zos-base.h which comes with NodeJS SDK for z/OS. It is not part of ibm_db driver. So, wait for the fix from NodeJS team. Once, they provide new NodeJS SDK, you can install new NodeJS and then try to install ibm_db. Thanks.

srinivasabommareddy commented 7 months ago

Thank you so much for your quick response. I have passed the information to IBM as well. Hopefully new version node will fix rest of the issues. I will update once get new version of Node from IBM

srinivasabommareddy commented 7 months ago

I re-ran after fix applied to NdoeJs: I am getting the following error.

npm install ibm_db npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm ERR! code 1 npm ERR! path /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! command failed npm ERR! command sh -c -- node installer/driverInstall.js npm ERR! platform = os390, arch = s390x, node.js version = v16.19.1 npm ERR! make version =GNU Make 4.4.1 npm ERR! make: Entering directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! CXX(target) Release/obj.target/odbc_bindings/src/odbc.o npm ERR! make: Leaving directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! npm ERR! Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME" npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@16.19.1 | os390 | s390x npm ERR! gyp info find Python using Python version 3.10.7 found at "/usr/lpp/ported/road4z/bin/python3" npm ERR! gyp info spawn /usr/lpp/ported/road4z/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-latest-os390-s390x/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-latest-os390-s390x', npm ERR! gyp info spawn args '-Dnode_exp_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/libnode.x', npm ERR! gyp info spawn args '-Dzoslib_include_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/include/node/zoslib', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-latest-os390-s390x/$(Configuration)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/u/ttbr/home/bomms/TestDB/node_modules/ibm_db', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! clang-14: error: unknown argument: '-q64' npm ERR! clang-14: error: unknown argument: '-qlonglong' npm ERR! clang-14: error: unknown argument: '-qenum=int' npm ERR! clang-14: error: unknown argument: '-qxclang=-fexec-charset=ISO8859-1' npm ERR! clang-14: error: unknown argument: '-q64' npm ERR! clang-14: error: unknown argument: '-qARCH=10' npm ERR! clang-14: error: unknown argument: '-qASCII' npm ERR! clang-14: error: unknown argument: '-qTUNE=12' npm ERR! clang-14: error: unknown argument: '-qENUM=INT' npm ERR! clang-14: error: unknown argument: '-qEXPORTALL' npm ERR! clang-14: error: unknown argument: '-qASM' npm ERR! clang-14: error: unknown argument: '-qINLINE=::150:100000' npm ERR! clang-14: error: unknown argument: '-qxclang=-std=c++14' npm ERR! clang-14: error: unknown argument: '-qxclang=-std=c++14' npm ERR! clang-14: error: unknown argument: '-qNOEH' npm ERR! clang-14: error: unknown argument: '-qmakedep=gcc' npm ERR! clang-14: error: unsupported argument 'GOFF' to option 'Wa,' npm ERR! make: *** [odbc_bindings.target.mk:178: Release/obj.target/odbc_bindings/src/odbc.o] Error 1 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 (/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) npm ERR! gyp ERR! System OS/390 28.00 npm ERR! gyp ERR! command "/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/bin/node" "/service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=SYSDB2.DQA0" npm ERR! gyp ERR! cwd /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! gyp ERR! node -v v16.19.1 npm ERR! gyp ERR! node-gyp -v v9.1.0 npm ERR! gyp ERR! not ok npm ERR! npm ERR! at ChildProcess.exithandler (node:child_process:402:12) npm ERR! at ChildProcess.emit (node:events:513:28) npm ERR! at maybeClose (node:internal/child_process:1143:16) npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) { npm ERR! code: 1, npm ERR! killed: false, npm ERR! signal: null, npm ERR! cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' npm ERR! } npm ERR! oput 'SYSDB2.DQA0.SDSNMACS(DSNAO64C)' '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/dsnao64c.x'

npm ERR! A complete log of this run can be found in: npm ERR! /u/ttbr/home/bomms/.npm/_logs/2023-11-17T16_42_07_083Z-debug-0.log $

bimalkjha commented 7 months ago

The error is coming from node-gyp package now. Looks some C compiler issue. Not sure why clang-14 is used now which was not used before with node 18.18.2. The NodeJS team gave you fix with v16.19.1 SDK? Please share this error with SDK team too. Thanks.

bimalkjha commented 7 months ago

@srinivasabommareddy I checked with IBM team about above clang issue and below is their reply:

The above log shows node-v16.19.1-os390-s390x-202303281842 (v16 from 2023-03-28). The fix for the original issue
 (which was for Node.js v18 on z/OS 2.5) is yet to be released in an upcoming v18.18.2.1 PTF.

Anyway, the log shows customer is using clang to be build a native add-on in Node.js v16, while the njsc compiler 
should be used in Node.js v16 and below. Please let customer to run following commands:

$ . /service/zos/LS63A0/usr/lpp/IBM/cnj/v16r0/IBM/node-v16.19.1-os390-s390x-202303281842/.env
$ export CC=njsc
$ export CXX=njsc++
$ export LINK=njsc++
then rerun the npm install command.

Thanks.

srinivasabommareddy commented 7 months ago

I have tried with Node Version 18 and getting a different message;

I also tied with

export CC=clang export CXX=clang++ export LINK=clang++

and

export CC=njsc export CXX=njsc++ export LINK=njsc++

Both giving same error message.

npm install ibm_db npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ npm ERR! code 1 npm ERR! path /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! command failed npm ERR! command sh -c node installer/driverInstall.js npm ERR! platform = os390, arch = s390x, node.js version = v18.18.2 npm ERR! make version =GNU Make 4.4.1 npm ERR! make: Entering directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! CXX(target) Release/obj.target/odbc_bindings/src/odbc.o npm ERR! make: Leaving directory '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build' npm ERR! npm ERR! Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME" npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.0 npm ERR! gyp info using node@18.18.2 | os390 | s390x npm ERR! gyp info find Python using Python version 3.10.7 found at "/usr/lpp/ported/road4z/bin/python3" npm ERR! gyp info spawn /usr/lpp/ported/road4z/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x', npm ERR! gyp info spawn args '-Dnode_exp_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/libnode.x', npm ERR! gyp info spawn args '-Dzoslib_include_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/include/node/zoslib', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-latest-os390-s390x/$(Configuration)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/u/ttbr/home/bomms/TestDB/node_modules/ibm_db', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! make: njsc++: EDC5129I No such file or directory. npm ERR! make: *** [odbc_bindings.target.mk:183: 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 (/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! System OS/390 28.00 npm ERR! gyp ERR! command "/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/bin/node" "/service/zos/LS63A0/usr/lpp/IBM/cnj/v18r0/IBM/node-v18.18.2-os390-s390x-202310180251/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=SYSDB2.DQA0" npm ERR! gyp ERR! cwd /u/ttbr/home/bomms/TestDB/node_modules/ibm_db npm ERR! gyp ERR! node -v v18.18.2 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:517:28) npm ERR! at maybeClose (node:internal/child_process:1141:16) npm ERR! at Socket. (node:internal/child_process:493:11) npm ERR! at Socket.emit (node:events:517:28) npm ERR! at Pipe. (node:net:350:12) { npm ERR! code: 1, npm ERR! killed: false, npm ERR! signal: null, npm ERR! cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' npm ERR! } npm ERR! oput 'SYSDB2.DQA0.SDSNMACS(DSNAO64C)' '/u/ttbr/home/bomms/TestDB/node_modules/ibm_db/build/dsnao64c.x'

npm ERR! A complete log of this run can be found in: /u/ttbr/home/bomms/.npm/_logs/2023-11-19T21_22_44_555Z-debug-0.log

bimalkjha commented 7 months ago

@srinivasabommareddy Please note that export CXX=njsc++ is required for node.js v16.19.1 only that you tried last time. In the above shared output, you have used node.js v18.18.2 with which export CXX=njsc++ do not work and hence error is expected.

Please check my last update again where it is mentioned that - The fix for the original issue (which was for Node.js v18 on z/OS 2.5) is yet to be released in an upcoming v18.18.2.1 PTF. So, please wait for the Node.js v18.18.2.1 PTF and then try installing ibm_db@3.2.3 without setting export CXX=njsc++ and other env as you tried in first attempt. Installing ibm_db using any other version of node.js except v18.18.2.1 will fail with error. Thanks.