Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install compile fails on windows #44

Closed
emlyn-Resn opened this issue Feb 20, 2018 · 6 comments
Closed

Install compile fails on windows #44

emlyn-Resn opened this issue Feb 20, 2018 · 6 comments

Comments

@emlyn-Resn
Copy link

Node: 8.9.1
OS: Windows 10, 64bit, v1709
Microsoft Build Engine version: 14.0.24720.0
CMAKE: 3.10.1

The compile process aborts with...

c:\dev\libs\face-recognition.js\node_modules\dlib-build\dlib\dlib\dlib\dnn\core.h(698): fatal error C1003: error count exceeds 100; stopping compilation (compiling source file ..\cc\FaceRecognizerNet.cc) [C:\dev\libs\face-recognition.js\build\facerec.vcxproj]

With the first error being...

Severity Code Description Project File Line Suppression State Error C2995 'alwaysbool<unknown-type>::type dlib::impl::backward_requires_forward_output(layer_type &,SUBNET &)': function template has already been defined (compiling source file ..\cc\index.cc) facerec c:\dev\libs\face-recognition.js\node_modules\dlib-build\dlib\dlib\dlib\dnn\core.h 238

I'm not familiar with C++ development, so i'm not sure where to start looking.

@justadudewhohacks
Copy link
Owner

Hi,

Your msbuild version is 14, but some code in the dnn module of dlib does not compile with vc14 (Visual Studio 2015 compiler). Unfortunately for windows we have to use vc15 (Visual Studio 2017) here. Installing the VS2017 build tools (msbuild 15) should fix it.

@emlyn-Resn
Copy link
Author

Thanks @justadudewhohacks. I have both VS2015 IDE and Build tools 2017 installed (via https://github.com/felixrieseberg/windows-build-tools), but node-gyp doesn't seem to want to use 2017.

Any ideas?

I understand that this isn't an issue with this package, so feel free to close this issue otherwise :)

@justadudewhohacks
Copy link
Owner

Ah I see. You should be able to tell node-gyp, which one to use. You can type npm config get to check what the value of msvs_version is. You can set it to msvs2017 with npm config set msvs_version=2017. Maybe that fixes it.

@emlyn-Resn
Copy link
Author

That doesn't seem to help :(

If i try to run node-gyp manually from after checking out the repo..

node-gyp configure --msvs_version=2017

I get an error..

File "C:\Users\Emlyn\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'

There seems to be some fresh comments on this node-gyp issue nodejs/node-gyp#1278

@justadudewhohacks
Copy link
Owner

Yeah unfortunately there are quite some issues with node-gyp and msvs2017. This might also be interesting: nodejs/node-gyp#1179.

Other then that, which npm version are you using? I would try upgrading to a recent version, since lower npm versions( below npm 5.0.2?) do not come with the right version of the bundled node-gyp binary.

@justadudewhohacks
Copy link
Owner

Closing here, as this is a node-gyp related issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants