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

Unable to install any library that requires build #8096

Closed
bangusi opened this issue Sep 8, 2019 · 17 comments
Closed

Unable to install any library that requires build #8096

bangusi opened this issue Sep 8, 2019 · 17 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@bangusi
Copy link

bangusi commented Sep 8, 2019

Host Environment
Vcpkg package management program version 2019.08.27-nohash
OS: Windows 10
Compiler: VS Express 2017 for Windows Desktop
( Also tried with Commutiny Edition - same result )
Cmake: cmake-3.15.3-win64-x64 ( tried 3.14 -- same result )

(Note I have two other Windows 10 machines where vcpkg behaves as expected )

To Reproduce
Steps to reproduce the behavior:
./vcpkg install cxxopts:x64-windows-static
(Note this just one of the libraries that I tried to install and failed. Others include fmt, boost-filesystem).

Failure logs
-- Configuring x64-windows-static
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
Command failed: ninja -v
Working Directory: ..\vcpkg/buildtrees/cxxopts/x64-windows-static-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
..\vcpkg\buildtrees\cxxopts\config-x64-windows-static-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:296 (vcpkg_execute_required_process)
ports/cxxopts/portfile.cmake:12 (vcpkg_configure_cmake)
scripts/ports.cmake:85 (include)

Error: Building package cxxopts:x64-windows-static failed with: BUILD_FAILED
config-x64-windows-static-out.log

Additional context
Installed VS 2017, Community Edition .. didn't work
Tried different versions of Cmake, -- none worked
Run Powershell with and without Admin rights
Forced use of different versions of WIndows SDK

@bangusi bangusi added the category:port-bug The issue is with a library, which is something the port should already support label Sep 8, 2019
@MVoz
Copy link
Contributor

MVoz commented Sep 8, 2019

RC Pass 1 command "rc /fo CMakeFiles\cmTC_04175.dir/manifest.res CMakeFiles\cmTC_04175.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified

where rc.exe

  1. --mt=CMAKE_MT-NOTFOUND --manifests

where mt.exe

REINSTALL WinSDK

@bangusi
Copy link
Author

bangusi commented Sep 8, 2019

I have those executables in these loctions

C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86

Should I install a specific version on WinSDK? which one?

Update:
Just reinstalled WinSDK ( 10.0.17763.0 ) from here https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
The issue still not fixed.

@MVoz
Copy link
Contributor

MVoz commented Sep 8, 2019

install cmake 3.15.1 ?, 3.15.3

@bangusi
Copy link
Author

bangusi commented Sep 8, 2019

I tried 3.15.3 didn't help. Where can I get 3.15.1?
The latest from https://cmake.org/download is 3.15.3.

@MVoz
Copy link
Contributor

MVoz commented Sep 8, 2019

vcpkg env --debug --triplet x64-windows-static

where mt

where rc

? log

@bangusi
Copy link
Author

bangusi commented Sep 8, 2019

./vcpkg env --debug --triplet x64-windows-static
[DEBUG] Using vcpkg-root: C:\Users\stellaF\Programs\vcpkg
[DEBUG] Found path: C:\Users\stellaF\Programs\cmake-3.15.3-win64-x64\bin\cmake.exe
[DEBUG] _wpopen(""C:\Users\stellaF\Programs\cmake-3.15.3-win64-x64\bin\cmake.exe" --version 2>&1")
[DEBUG] _pclose() returned 0 after 164674 us
[DEBUG] _wpopen(""C:\Users\stellaF\Programs\cmake-3.15.3-win64-x64\bin\cmake.exe" "-DCMAKE_TRIPLET_FILE=C:/Users/stellaF/Programs/vcpkg/triplets/x64-windows-static.cmake" -P "C:/Users/stellaF/Programs/vcpkg/scripts/get_triplet_environment.cmake" 2>&1")
[DEBUG] _pclose() returned 0 after 82413 us
[DEBUG] _wpopen(""C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml 2>&1")
[DEBUG] _pclose() returned 0 after 81664 us
[DEBUG] CreateProcessW(cmd.exe /c ""C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 x86_amd64 2>&1 <NUL && cmd")


** Visual Studio 2017 Developer Command Prompt v15.9.15
** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86_x64'
Microsoft Windows [Version 10.0.17134.950]
(c) 2018 Microsoft Corporation. All rights reserved.

>where rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\rc.exe

>where mt.exe
C:\Program Files (x86)\MKS Toolkit\mksnt\mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\mt.exe

@MVoz
Copy link
Contributor

MVoz commented Sep 8, 2019

rename - C:\Program Files (x86)\MKS Toolkit\mksnt\mt.exe

@bangusi
Copy link
Author

bangusi commented Sep 8, 2019

renamed mt to z_mt. Still fails

@PhoebeHui PhoebeHui self-assigned this Sep 9, 2019
@MVoz
Copy link
Contributor

MVoz commented Sep 9, 2019

where lib.exe

where link.exe

another thing that I do not like, x86 is ahead of x64, perhaps because of this error

  1. C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\ x86 \
  2. C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\ x64 \

should be the other way around

@MVoz
Copy link
Contributor

MVoz commented Sep 9, 2019

and, cmake-3.15.3-win64-x64 should use Hostx64, you Hostx86

14.16.27023/bin/ Hostx86 /x64/cl.exe -- broken

Try to use full compatibility
cmake- win32-x86

otherwise I don't see any reason for the errors, or maybe no component has been installed

rust-lang/rust#53474

@bangusi
Copy link
Author

bangusi commented Sep 9, 2019

Fixed the order.. still .
Question:
I have another machine that has same tool chain ( i.e. 2017\WDExpress ). Works fine.
Differences to note:

vcpkg version
2018.10.20
Powershell 5.1 ( new vcpkg insists on downloading 6.2.1 )

Can I get an older version of vcpkg?

@PhoebeHui PhoebeHui added requires:repro The issue is not currently repro-able and removed category:port-bug The issue is with a library, which is something the port should already support labels Sep 10, 2019
@PhoebeHui
Copy link
Contributor

@bangusi, can you try to build cxxopts:x64-windows-static with vcpkg latest source on your worked machine?

From your log, it seems something wrong in your VS and windows SDK setting up. I can't repro your issue. please reinstall VS and install windows sdk via vs installer.

@bangusi
Copy link
Author

bangusi commented Sep 10, 2019

@PhoebeHui It turns out I did not have cxxopts on the other machine and just installed it now. This is the log
`PS D:\vcpkg> ./vcpkg install cxxopts:x64-windows-static
The following packages will be built and installed:
cxxopts[core]:x64-windows-static
Starting package 1/1: cxxopts:x64-windows-static
Building package cxxopts[core]:x64-windows-static...
-- Downloading https://github.com/jarro2783/cxxopts/archive/v2.1.1.tar.gz...
-- Extracting source D:/vcpkg/downloads/jarro2783-cxxopts-v2.1.1.tar.gz
-- Using source at D:/vcpkg/buildtrees/cxxopts/src/v2.1.1-a29c67cbdc
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
-- Building x64-windows-static-rel
-- Installing: D:/vcpkg/packages/cxxopts_x64-windows-static/share/cxxopts/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package cxxopts[core]:x64-windows-static... done
Installing package cxxopts[core]:x64-windows-static...
Installing package cxxopts[core]:x64-windows-static... done
Elapsed time for package cxxopts:x64-windows-static: 14.31 s

Total elapsed time: 14.31 s

The package cxxopts:x64-windows-static provides CMake targets:

find_package(cxxopts CONFIG REQUIRED)
target_link_libraries(main PRIVATE cxxopts::cxxopts)

PS D:\vcpkg>`

Config log is this:
`[1/2] cmd /c "cd .. && "D:/cmake-3.12.4-win64-x64/bin/cmake.exe" "D:/vcpkg/buildtrees/cxxopts/src/v2.1.1-a29c67cbdc" "-DCXXOPTS_BUILD_EXAMPLES=OFF" "-DCMAKE_MAKE_PROGRAM=D:/vcpkg/downloads/tools/ninja/ninja-1.8.2/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static" "-DVCPKG_PLATFORM_TOOLSET=v141" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/vcpkg/packages/cxxopts_x64-windows-static""
-- The C compiler identification is MSVC 19.16.27024.1
-- The CXX compiler identification is MSVC 19.16.27024.1
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/WDExpress/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/WDExpress/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/WDExpress/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/WDExpress/VC/Tools/MSVC/14.16.27023/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
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_LIBDIR`

As for re-install, I have done this mutliple times so far. No luck

@PhoebeHui
Copy link
Contributor

PhoebeHui commented Sep 10, 2019

@bangusi, the above logs show everything worked well on your worked machine, please compare the environment variable in your 2 machines:

  1. Compare the all env variable from command './vcpkg env --debug --triplet x64-windows-static'
  2. Compare the VS and windows sdk related variable from command 'set'.
  3. Compare installed VS component via VS installer.

@bangusi
Copy link
Author

bangusi commented Sep 11, 2019

@PhoebeHui

  1. They are similar except for the drive location. On the machine that works the install is on the D drive. It is on the C drive on this machine that does not work.
  2. I am not clear on how to perform the compare using 'set'
  3. VS Express install has no 'components'. You get the whole thing or nothing. It is not like the Community Edition for example. So both machines have 100% of the VS Express install

@PhoebeHui
Copy link
Contributor

@bangusi, you can open x64 Native tools Command prompt, and execute 'set' command, and all VS and windows sdk related variable will be list, you can check if they are setting correctly.

This issue should relate to vs and vs sdk installation.

@PhoebeHui
Copy link
Contributor

PhoebeHui commented Nov 13, 2019

@bangusi, I get a chance to install VS Express 2017 for Windows Desktop on win10 and try to repro this issue, however, I can't repro your issue, everything build successfully for me. Feel free tor reopen this issue if you still expect any help from us.

Here is my environment variable:
PS C:\vcpkg> ./vcpkg env --debug --triplet x64-windows-static
[DEBUG] Using vcpkg-root: C:\vcpkg
[DEBUG] _wpopen(""C:\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe" --version 2>&1")
[DEBUG] _pclose() returned 0 after 252731 us
[DEBUG] _wpopen(""C:\vcpkg\downloads\tools\cmake-3.14.0-windows\cmake-3.14.0-win32-x86\bin\cmake.exe" "-DCMAKE_TRIPLET_FILE=C:/vcpkg/triplets/x64-windows-static.cmake" -P "C:/vcpkg/scripts/get_triplet_environment.cmake" 2>&1")
[DEBUG] _pclose() returned 0 after 114478 us
[DEBUG] _wpopen(""C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml 2>&1")
[DEBUG] _pclose() returned 0 after 99138 us
[DEBUG] CreateProcessW(cmd.exe /c ""C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.1 x86_amd64 2>&1 <NUL && cmd")


** Visual Studio 2017 Developer Command Prompt v15.9.17
** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86_x64'
Microsoft Windows [Version 10.0.17134.1006]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\vcpkg>where rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\rc.exe
C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.exe

C:\vcpkg>where mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\mt.exe
C:\Program Files (x86)\Windows Kits\10\bin\x86\mt.exe

C:\vcpkg>where cl.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\cl.exe

C:\vcpkg>where link.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\link.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\link.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

3 participants