Skip to content

vs-build-tools-2017 (vs version 15) is not recognized #78

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

Closed
erichiller opened this issue Feb 16, 2017 · 15 comments
Closed

vs-build-tools-2017 (vs version 15) is not recognized #78

erichiller opened this issue Feb 16, 2017 · 15 comments
Labels

Comments

@erichiller
Copy link

In a continuation of #46 - it appears that build tools 2017 is not found
ERR! OMG Error: There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.

From what I can tell, cmake-js looks in in vsDetect in the registry key

"HKLM\\SOFTWARE\\Classes\\Installer\\Dependencies\\Microsoft.VS.VisualCppBuildTools_x86_enu,v" + mainVer

Visual Studio 2017 build tools does not have a registry key there, although there are others, that particular one does not exist.

@unbornchikken
Copy link
Member

Do you see one that would be used for detecting BT 2017?

@erichiller
Copy link
Author

erichiller commented Feb 16, 2017

I'm not sure if this is a result of cmake-js not supporting Visual Studio 15 2017 but if I try to set it directly from the command line (I have both 2017 and 2015 installed so that cmake-js doesn't error) like:

cmake-js build -a x64 -r electron -v 1.6.0 -c "C:\Users\ehiller\AppData\Local\omega\system\cmake\bin\cmake.exe" -G "Visual Studio 15 2017"

Yields:

info TOOL Using Visual Studio 15 2017 generator, as specified from commandline.
info CMD CONFIGURE
info RUN C:\Users\ehiller\AppData\Local\omega\system\cmake\bin\cmake.exe "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test" --no-warn-unused-cli -G"Visual Studio 15 2017" -DCMAKE_JS_VERSION="3.4.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build" -DCMAKE_JS_INC="C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\src;C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\deps\v8\include;C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\deps\uv\include;C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\node_modules\nan" -DNODE_RUNTIME="electron" -DNODE_RUNTIMEVERSION="1.6.0" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\x64\node.lib"
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.10.24930.0
-- The CXX compiler identification is MSVC 19.10.24930.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.10.24930/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.10.24930/bin/HostX86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.10.24930/bin/HostX86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.10.24930/bin/HostX86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/build
info CMD BUILD
info RUN C:\Users\ehiller\AppData\Local\omega\system\cmake\bin\cmake.exe --build "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build" --config Release
Microsoft (R) Build Engine version 15.1.545.13942
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2/16/2017 9:41:00 AM.
Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ALL_BUILD.vcxproj" on node 1 (default targets).
Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-te st\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "Win32\Release\ZERO_CHECK\".
  Creating directory "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\Release\".
  Creating directory "Win32\Release\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
  Creating "Win32\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Checking Build System
  CMake does not need to re-run because C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/build/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
  Deleting file "Win32\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
  Touching "Win32\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ZERO_CHECK.vcxproj" (default targets).

Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-te st\build\async_pi_estimate.vcxproj" (3) on node 1 (default targets).
PrepareForBuild:
  Creating directory "async_pi_estimate.dir\Release\".
  Creating directory "async_pi_estimate.dir\Release\async_pi.EF0005AE.tlog\".
InitializeBuildStatus:
  Creating "async_pi_estimate.dir\Release\async_pi.EF0005AE.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/CMakeLists.txt
  CMake does not need to re-run because C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/build/CMakeFiles/generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.24930\bin\HostX86\x86\CL.exe /c /I"C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0
  \src" /I"C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\deps\v8\include" /I"C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\deps\uv\include" /I"C:\Users\ehiller\Dev\
  src\github.com\erichiller\uwp-js-test\node_modules\nan" /nologo /W3 /WX- /diagnostics:classic /O2 /Ob2 /Oy- /D WIN32 /D _WINDOWS /D NDEBUG /D "CMAKE_INTDIR=\"Releas
  e\"" /D async_pi_estimate_EXPORTS /D _WINDLL /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"async_pi_estimate.dir\Release\\" /F
  d"async_pi_estimate.dir\Release\vc141.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\src\module\async_pi_esti
  mate\addon.cc" "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\src\module\async_pi_estimate\async.cc" "C:\Users\ehiller\Dev\src\github.com\erichiller\uw
  p-js-test\src\module\async_pi_estimate\pi_est.cc" "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\src\module\async_pi_estimate\sync.cc"
  addon.cc
  async.cc
  pi_est.cc
  sync.cc
  Generating Code...
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.24930\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\ehiller\Dev\src\
  github.com\erichiller\uwp-js-test\build\Release\async_pi_estimate.node" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
   oleaut32.lib uuid.lib comdlg32.lib advapi32.lib "C:\Users\ehiller\.cmake-js\electron-x64\v1.6.0\x64\node.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='f
  alse'" /manifest:embed /PDB:"C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/build/Release/async_pi_estimate.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBAS
  E /NXCOMPAT /IMPLIB:"C:/Users/ehiller/Dev/src/github.com/erichiller/uwp-js-test/build/Release/async_pi_estimate.lib" /MACHINE:X86 /SAFESEH   /machine:X86 /DLL async
  _pi_estimate.dir\Release\addon.obj
  async_pi_estimate.dir\Release\async.obj
  async_pi_estimate.dir\Release\pi_est.obj
  async_pi_estimate.dir\Release\sync.obj
node.lib(node.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-te st\build\async_pi_estimate.vcxproj]
Done Building Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\async_pi_estimate.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.


Build FAILED.

"C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js-test\build\async_pi_estimate.vcxproj" (default target) (3) ->
(Link target) ->
  node.lib(node.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [C:\Users\ehiller\Dev\src\github.com\erichiller\uwp-js- test\build\async_pi_estimate.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.90
ERR! OMG Process terminated: 1

It appears this would work as an indicator HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VisualStudio.MinShell.Msi,v15

@unbornchikken
Copy link
Member

Try with:

cmake-js build -a x64 -r electron -v 1.6.0 -c "C:\Users\ehiller\AppData\Local\omega\system\cmake\bin\cmake.exe" -G "Visual Studio 15 2017 Win64"

@erichiller
Copy link
Author

@unbornchikken That did it - built fine now.

@mkrivos
Copy link

mkrivos commented Jun 20, 2017

Hello, is there any chance to fix this bug?
VS2017 is already in use and this bug is annoying, I can help with one if needed.

@unbornchikken
Copy link
Member

Any PR would be greatly appreciated, since I don't have VS 2017 by hand right now, and don't have too much time to setup a virtual environment.

@mkrivos
Copy link

mkrivos commented Jun 20, 2017

@unbornchikken
Copy link
Member

@mkrivos Please run:

reg query "HKLM\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VisualStudio.MinShell.Msi,v15"

What's the output?

@mkrivos
Copy link

mkrivos commented Jun 20, 2017

C:>reg query "HKLM\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VisualStudio.MinShell.Msi,v15"

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VisualStudio.MinShell.Msi,v15
Version REG_SZ 15.0.26315
(Default) REG_SZ {ACFEA151-D1BE-4114-875A-87328B6002D4}
DisplayName REG_SZ vs_minshellmsi

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VisualStudio.MinShell.Msi,v15\Dependents

@unbornchikken
Copy link
Member

Please try master.

@unbornchikken unbornchikken reopened this Jun 21, 2017
@mkrivos
Copy link

mkrivos commented Jun 21, 2017

copy vsDetect from master into node_modules and try -> seems to be OK.

cmake-js compile

info TOOL Using Visual Studio 15 2017 Win64 generator.
info CMD CONFIGURE
WARN invalid config loglevel="notice"
info RUN cmake "C:\projects\flow\js" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="3.4.1" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="C:\projects\flow\js\build" -DCMAKE_JS_INC="C:\Users\mkrivos.cmake-js\node-x64\v8.1.2\include\node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="8.1.2" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\mkrivos.cmake-js\node-x64\v8.1.2\win-x64\node.lib"
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.10.25019.0
-- The CXX compiler identification is MSVC 19.10.25019.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
** Default installation path: /opt/rsys
-- Found Subversion: C:/Program Files/TortoiseSVN/bin/svn.exe (found version "1.9.2")

@unbornchikken
Copy link
Member

Fixed as of 3.5.0.

@bpaczkowski
Copy link

Doesn't seem to be fixed for me. I have VS2017 installed, and I also have the 2015 build tools installed, cmake-js detects neither. node-gyp works fine though.

@grrrwaaa
Copy link

grrrwaaa commented Feb 21, 2018

cmake-js 3.6.2
node v6.11.4
npm 3.10.10
Visual Studio Community 2017 Version 15.5.7
Visual Studio Community 2015 Version 14.0.254.20.01 Update 3
Windows 10 64-bit Pro

Still getting OMG There is no Visual C++ compiler installed

@heaths
Copy link

heaths commented Mar 14, 2018

Just stumbled across this. Note that the linked Developer Community page uses undocumented, unsupported registry key paths that were valid (documented, supported) for past versions but not for Visual Studio 2017. I worked with the CMake community to provide the necessary capabilities in our query API, for which CMake added support in commit Kitware/CMake@9ffb353.

I came across this because I'm looking to create a node native module for easier consumption with possible Unicode (encoded as UTF8) output that generally causes problems for console applications.

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

No branches or pull requests

6 participants