OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Compilation fails on Windows #281

Closed AlCalzone closed 5 years ago

AlCalzone commented 5 years ago

https://travis-ci.org/ioBroker/ioBroker.zwave/jobs/527882690#L348

I see this error on NodeJS 8 and 10.

     Creating library C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\Release\openzwave_shared.lib and object C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\Release\openzwave_shared.exp
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_ioctlsocket [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_freeaddrinfo [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_recv [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_connect [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_socket [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_send [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_WSAStartup [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_getaddrinfo [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_closesocket [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(HttpClient.obj) : error LNK2001: unresolved external symbol __imp_WSACleanup [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(DNSImpl.obj) : error LNK2001: unresolved external symbol DnsQuery_A [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
OpenZWave.lib(DNSImpl.obj) : error LNK2001: unresolved external symbol DnsFree [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\Release\openzwave_shared.node : fatal error LNK1120: 13 unresolved externals [C:\Users\travis\build\ioBroker\ioBroker.zwave\node_modules\openzwave-shared\build\openzwave_shared.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
ekarak commented 5 years ago

These are system calls, not part of openzwave. This looks like either:

AlCalzone commented 5 years ago

@ekarak I'm not doing anything special. This is from a test run on Travis CI. All it does is npm install a library which has openzwave-shared as a dependency:

before_install:
  # [...] Linux/OSX related stuff
  - npm install -g node-gyp
install:
  - npm install --unsafe-perm
Fishwaldo commented 5 years ago

Trying to use OZW 1.6 with any wrappers at the moment is likely to fail. The wrappers need to update for the latest release.

Fishwaldo commented 5 years ago

@ekarak please see the team discussion and 1.6 release notes I posted on things you will probably have to look at

ekarak commented 5 years ago

thank you Justin, will take a look

Στις Σάβ, 4 Μαΐ 2019, 2:58 μ.μ. ο χρήστης Justin Hammond < notifications@github.com> έγραψε:

@ekarak https://github.com/ekarak please see the team discussion and 1.6 release notes I posted on things you will probably have to look at

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/281#issuecomment-489320438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEPQKL22EK3GXTRYOZ37CTPTV26RANCNFSM4HKYKZPQ .

ekarak commented 5 years ago

I just compiled and linked node-openzwave-shared against OpenZWave/1.6 on Ubuntu/Debian, seems to work fine (see below). There are a lot of deprecated calls which need fixing of course.

openzwave-shared@1.4.8 test /home/ekarak/src/gh/OpenZWave/node-openzwave-shared node test.js

Initialising OpenZWave 1.6.3 binary addon for Node.JS. OpenZWave Security API is ENABLED ZWave device db : /usr/local/etc/openzwave ...

I will try a Windows build in a VM tomorrow and see what I can find.

Στις Κυρ, 5 Μαΐ 2019 στις 4:17 μ.μ., ο/η Ηλίας Καρακουλάκης < elias.karakoulakis@gmail.com> έγραψε:

thank you Justin, will take a look

Στις Σάβ, 4 Μαΐ 2019, 2:58 μ.μ. ο χρήστης Justin Hammond < notifications@github.com> έγραψε:

@ekarak https://github.com/ekarak please see the team discussion and 1.6 release notes I posted on things you will probably have to look at

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/281#issuecomment-489320438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEPQKL22EK3GXTRYOZ37CTPTV26RANCNFSM4HKYKZPQ .

-- Elias Karakoulakis Electrical & Computer Engineer NTUA Athens Msc Information Systems, AUEB Athens KNX Advanced Partner

AlCalzone commented 5 years ago

@ekarak Our AppVeyor builds finally ran. They used to succeed before OZW 1.6, now they are failing with the same error message as Travis/Windows. So something windows-build related must have changed but I have no clue how to fix it on our end. Would appreciate if you can give us some pointers (or if you are able to fix it on your end).