Attempting to node-gyp rebuild ibm_db, windows 7, msvs 2105

132 views
Skip to first unread message

Justin Johnson

unread,
Feb 25, 2016, 3:57:46 AM2/25/16
to node-ibm_db

I am attempting to build ibm_db for use in an electron app.

(Note: Attempting to build for vanilla node 4.2.6 results in identical error output, so I don't think this is an issue with electron.)

Build environment is windows 7, 64 bit, using MSVS 2015.


Base Node version is 4.2.6, Electron version 0.35.4 (i have heard ibm_db doesn't work with Node 5.x on windows 7, and this is the most recent elctron version using 4.x).


I have installed the CLI drivers for ibm data server client v 10.5


I am pointing to the CLI drivers via the IBM_DB_HOME environment variable - Failing to set this variable instead gives me an error about a missing header file, sqlcli1.h


Building with node-gyp gives me the following error output:


C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db>node-gyp rebuild --target=0.35.4 --arch=x64 --dist-url=https://atom.io/download/atom-shell --proxy=<myproxy> --msvs_version=2015
gyp info it worked if it ends with ok
gyp info using node...@3.2.1
gyp info using no...@4.2.6 | win32 | x64
gyp info spawn C:\Users\chq-justinj\AppData\Local\Continuum\Anaconda\python.EXE
gyp info spawn args [ 'C:\\Users\\chq-justinj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\chq-justinj\\Node\\sql_gui_test\\node_modules\\ibm_db\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\chq-justinj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\chq-justinj\\.node-gyp\\0.35.4\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\chq-justinj\\.node-gyp\\0.35.4',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\chq-justinj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\chq-justinj\\Node\\sql_gui_test\\node_modules\\ibm_db',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\chq-justinj\\Node\\sql_gui_test\\node_modules\\ibm_db\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  odbc.cpp
  odbc_connection.cpp
..\src\odbc_connection.cpp(115): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHENV' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_connection.cpp(115): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc_connection.cpp(116): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHDBC' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_connection.cpp(116): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc.cpp(835): warning C4244: 'argument': conversion from 'SQLINTEGER' to 'SQLSMALLINT', possible loss of data [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  odbc_statement.cpp
  odbc_result.cpp
..\src\odbc_statement.cpp(122): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHENV' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_statement.cpp(122): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc_statement.cpp(123): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHDBC' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_statement.cpp(123): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc_statement.cpp(124): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHSTMT' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_statement.cpp(124): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
  dynodbc.cpp
..\src\odbc_result.cpp(101): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHENV' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_result.cpp(101): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc_result.cpp(102): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHDBC' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_result.cpp(102): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
..\src\odbc_result.cpp(103): error C2440: 'static_cast': cannot convert from 'intptr_t' to 'SQLHSTMT' [C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db\build\odbc_bindings.vcxproj]
  ..\src\odbc_result.cpp(103): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\chq-justinj\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\chq-justinj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=0.35.4" "--arch=x64" "--dist-url=https://atom.io/download/atom-shell" "--proxy=<my proxy>" "--msvs_version=2015"
gyp ERR! cwd C:\Users\chq-justinj\Node\sql_gui_test\node_modules\ibm_db
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok



Near as I can tell, it's like there is some abstraction layer missing somehow, but I don't really understand C++ at all, so I am not sure how to try to troubleshoot this.

Can anyone help me?



bimaljha

unread,
Feb 28, 2016, 12:47:11 PM2/28/16
to node-ibm_db
Check this answer https://github.com/ibmdb/node-ibm_db/issues/96 . It should help you. Thanks.
Reply all
Reply to author
Forward
0 new messages