sqlanywhere / node-sqlanywhere

SAP SQL Anywhere Database Client for Node
Apache License 2.0
39 stars 36 forks source link

Error compiling native extensions on Windows 10 #23

Closed ddresselhaus closed 7 years ago

ddresselhaus commented 7 years ago

So I'm currently trying to update from 1.0.15 to 1.0.17, but I am not able to compile the native libraries. Essentially, I'm trying to use node-sqlanywhere in an Electron app on a Windows 10 machine. Electron is using Node 7.4.0.

1.0.15 continues to work in my environment, but I can't get 1.0.17 to compile.

When trying to run electron-rebuild, which leverages node-gyp in different environments, it errs out. I'll paste the error content below. If you have any thoughts about what's going on, let me know. Thanks!

$ ./node_modules/.bin/electron-rebuild.cmd × Rebuild Failed An unhandled error occurred inside electron-rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.6.0 gyp info using node@7.8.0 | win32 | x64 gyp info spawn C:\Python27\python.exe gyp info spawn args [ 'C:\Users\IEUser\projects\case_basis_js\sync_app\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=auto', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\.electron-gyp\.node-gyp\iojs-1.6.2\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\IEUser\.electron-gyp\.node-gyp\iojs-1.6.2', gyp info spawn args '-Dnode_gyp_dir=C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=iojs.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\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. sqlanywhere.cpp utils.cpp sqlanywhere_v0_10.cpp utils_v0_10.cpp sacapidll.cpp win_delay_load_hook.cc ..\src\utils.cpp(243): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\utils.cpp(253): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\utils.cpp(259): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\sqlanywhere.cpp(139): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\sqlanywhere.cpp(158): error C2039: 'sqlany_set_batch_size': is not a member of 'SQLAnywhereInterface' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapidll.h(115): note: see declaration of 'SQLAnywhereInterface' ..\src\sqlanywhere.cpp(870): warning C4312: 'type cast': conversion from 'long' to 'void *' of greater size [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] ..\src\utils.cpp(785): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' ..\src\utils.cpp(993): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' ..\src\utils.cpp(1005): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' 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\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\lib\build.js:285:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=1.6.2" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" gyp ERR! cwd C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere gyp ERR! node -v v7.8.0 gyp ERR! node-gyp -v v3.6.0 gyp ERR! not ok

Failed with exit code: 1

Error: gyp info it worked if it ends with ok gyp info using node-gyp@3.6.0 gyp info using node@7.8.0 | win32 | x64 gyp info spawn C:\Python27\python.exe gyp info spawn args [ 'C:\Users\IEUser\projects\case_basis_js\sync_app\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=auto', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\IEUser\.electron-gyp\.node-gyp\iojs-1.6.2\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\IEUser\.electron-gyp\.node-gyp\iojs-1.6.2', gyp info spawn args '-Dnode_gyp_dir=C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=iojs.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\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. sqlanywhere.cpp utils.cpp sqlanywhere_v0_10.cpp utils_v0_10.cpp sacapidll.cpp win_delay_load_hook.cc ..\src\utils.cpp(243): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\utils.cpp(253): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\utils.cpp(259): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\sqlanywhere.cpp(139): error C2039: 'is_address': is not a member of 'a_sqlany_data_value' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapi.h(217): note: see declaration of 'a_sqlany_data_value' ..\src\sqlanywhere.cpp(158): error C2039: 'sqlany_set_batch_size': is not a member of 'SQLAnywhereInterface' [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] c:\users\ieuser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\src\h\sacapidll.h(115): note: see declaration of 'SQLAnywhereInterface' ..\src\sqlanywhere.cpp(870): warning C4312: 'type cast': conversion from 'long' to 'void *' of greater size [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] ..\src\utils.cpp(785): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' ..\src\utils.cpp(993): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' ..\src\utils.cpp(1005): warning C4996: 'v8::Function::NewInstance': was declared deprecated [C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere\build\sqlanywhere.vcxproj] C:\Users\IEUser.electron-gyp.node-gyp\iojs-1.6.2\deps\v8\include\v8.h(3644): note: see declaration of 'v8::Function::NewInstance' 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\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\lib\build.js:285:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--target=1.6.2" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" gyp ERR! cwd C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\sqlanywhere gyp ERR! node -v v7.8.0 gyp ERR! node-gyp -v v3.6.0 gyp ERR! not ok

Failed with exit code: 1 at SafeSubscriber._error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\spawn-rx\lib\src\index.js:262:84) at SafeSubscriber.__tryOrUnsub (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:234:16) at SafeSubscriber.error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:195:26) at Subscriber._error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:128:26) at Subscriber.error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:102:18) at MapSubscriber.Subscriber._error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:128:26) at MapSubscriber.Subscriber.error (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:102:18) at SafeSubscriber._next (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\spawn-rx\lib\src\index.js:236:65) at SafeSubscriber.__tryOrSetError (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:243:16) at SafeSubscriber.next (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:185:27) at Subscriber._next (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:125:26) at Subscriber.next (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:89:18) at ReduceSubscriber._complete (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\operator\reduce.js:119:30) at ReduceSubscriber.Subscriber.complete (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:114:18) at MergeAllSubscriber._complete (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\operator\mergeAll.js:94:30) at MergeAllSubscriber.Subscriber.complete (C:\Users\IEUser\projects\case_basis_js\sync_app\node_modules\rxjs\Subscriber.js:114:18)

gperrow-SAP commented 7 years ago

This problem should be fixed with version 1.0.18.