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

can't build with VS 2017 #1411

Open
Spongman opened this issue Apr 10, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@Spongman
Copy link

commented Apr 10, 2018

for VS 2017 the generated vcxproj is missing references to $(UniversalCRT_IncludePath) and $(VC_VC_IncludePath), causing includes for CRT & ucrt headers to fail.

> node -v
v9.9.0
> npm -v
5.6.0
> systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.16299 N/A Build 16299
System Type:               x64-based PC
> msbuild /version /nologo
15.6.85.37198
> cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26131.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

node-glfw> node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@9.9.0 | win32 | x64
gyp info spawn c:\vs15\MSBuild\15.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.
  atb.cc
  glfw.cc
  win_delay_load_hook.cc
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\windows.h(167): fatal error C1083: Cannot open include file: 'excpt.h': No such file or directory (compiling source file C:\Users
\piersh.DFCN\AppData\Roaming\npm\node_modules\node-gyp\src\win_delay_load_hook.cc) [C:\play\node-wpe-webgl\node_modules\node-glfw\build\glfw.vcxproj]
c:\play\node-wpe-webgl\node_modules\node-glfw\deps\include\glfw\glfw3.h(109): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory (compiling source file ..\src\a
tb.cc) [C:\play\node-wpe-webgl\node_modules\node-glfw\build\glfw.vcxproj]
c:\play\node-wpe-webgl\node_modules\node-glfw\deps\include\glfw\glfw3.h(109): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory (compiling source file ..\src\g
lfw.cc) [C:\play\node-wpe-webgl\node_modules\node-glfw\build\glfw.vcxproj]

@bzoz

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2018

Sorry, I can't reproduce. With the same tools version, building https://github.com/mikeseven/node-glfw works fine. Maybe try reinstalling SDK?

@Spongman

This comment has been minimized.

Copy link
Author

commented Apr 11, 2018

this is after a fresh SDK install. do you have VS 2015 build tools installed? maybe it's selecting those.

does your vcxproj include references to the $(UniversalCRT_IncludePath) and $(VC_VC_IncludePath) directories? if not, where is it finding excpt.h and stddef.h ?

@joaocgreis

This comment has been minimized.

Copy link
Member

commented Apr 12, 2018

Haven't seen this exact error before, but it looks similar to what happens when there are issues finding the Windows SDK. @Spongman can you run node-gyp rebuild --verbose and paste the output here? (rebuild because we need to see the output of the configure stage.)

@betimer

This comment has been minimized.

Copy link

commented May 29, 2018

@joaocgreis I got similar pain (winsock2.h not found) here is my output:

PS C:\Repo\rtcio> node-gyp rebuild --verbose
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose' ]
gyp info using node-gyp@3.6.2
gyp info using node@8.11.2 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed python2 { Error: not found: python2
gyp verb which failed at getNotFoundError (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:89:16
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python2\n at getNotFoundError (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:13:12)\n at F (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:68:19)\n at E (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:80:29)\n at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:89:16\n at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5\n at C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb which failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python C:\Program Files\Python27\python.EXE
gyp verb check python version C:\Program Files\Python27\python.EXE -c "import platform; print(platform.python_version());" returned: "2.7.12\r\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.11.2
gyp verb command install [ '8.11.2' ]
gyp verb install input version string "8.11.2"
gyp verb install installing version: 8.11.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.11.2
gyp verb build dir attempting to create "build" dir: C:\Repo\rtcio\build
gyp verb build dir "build" dir needed to be created? C:\Repo\rtcio\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017 - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
gyp verb find vs2017 - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
gyp verb find vs2017 - Some required components are missing, not using this installation
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
gyp verb find vs2017 - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)
gyp verb find vs2017 - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
gyp verb find vs2017 - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
gyp verb find vs2017 - Some required components are missing, not using this installation
gyp verb Not using VS2017: No usable installation of VS2017 found
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Repo\rtcio\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Repo\rtcio\config.gypi
gyp verb common.gypi checking for gypi file: C:\Repo\rtcio\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Program Files\Python27\python.EXE
gyp info spawn args [ 'C:\Users\Xin\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=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\Repo\rtcio\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Xin\.node-gyp\8.11.2\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Xin\.node-gyp\8.11.2',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\Xin\.node-gyp\8.11.2\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Repo\rtcio',
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:\Repo\rtcio\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: C:\Repo\rtcio) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Xin\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose"
gyp ERR! cwd C:\Repo\rtcio
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

@joaocgreis

This comment has been minimized.

Copy link
Member

commented Jun 22, 2018

The interesting part is this:

gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017 - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
gyp verb find vs2017 - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
gyp verb find vs2017 - Some required components are missing, not using this installation
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
gyp verb find vs2017 - Missing Visual Studio C++ core features (Microsoft.VisualStudio.VC.MSBuild.Base)
gyp verb find vs2017 - Missing VC++ 2017 v141 toolset (x86,x64) (Microsoft.VisualStudio.Component.VC.Tools.x86.x64)
gyp verb find vs2017 - Missing a Windows SDK (Microsoft.VisualStudio.Component.Windows10SDK.* or Microsoft.VisualStudio.Component.Windows81SDK)
gyp verb find vs2017 - Some required components are missing, not using this installation
gyp verb Not using VS2017: No usable installation of VS2017 found

@betimer can you open the Visual Studio Installer and modify your Visual Studio Community 2017 installation to include the workload "Desktop development with C++"?

@Fishrock123 Fishrock123 added the Windows label Jul 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.