Vcpkg: [gts] build failure when using CMake 3.17-rc3 on x64-windows

Created on 15 Mar 2020  路  7Comments  路  Source: microsoft/vcpkg

Host Environment

  • OS: Windows
  • Compiler: Visual Studio 2019 16.4

To Reproduce
Install CMake 3.17 rc3 . Then install vcpkg commit https://github.com/microsoft/vcpkg/commit/ecff0166637f958b0272d10f5f308c83e25d4acb, and try to install gts:x64-windows
./vcpkg install gts:x64-windows

Failure logs
Failure on console:
~~~
Starting package 7/7: gts:x64-windows
Building package gts[core]:x64-windows...
-- Downloading https://github.com/finetjul/gts/archive/c4da61ae075f355d9ecc9f2d4767acf777f54c2b.tar.gz...
-- Extracting source C:/gts-issue/vcpkg-latest-cmake/downloads/finetjul-gts-c4da61ae075f355d9ecc9f2d4767acf777f54c2b.tar.gz
-- Using source at C:/gts-issue/vcpkg-latest-cmake/buildtrees/gts/src/f777f54c2b-e54e70019b
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v
Working Directory: C:/gts-issue/vcpkg-latest-cmake/buildtrees/gts/x64-windows-dbg
See logs for more information:
C:\gts-issue\vcpkg-latest-cmake\buildtrees\gts\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/gts/portfile.cmake:18 (vcpkg_install_cmake)
scripts/ports.cmake:90 (include)

Error: Building package gts:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: gts:x64-windows
Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above
~
The relevant error from C:\gts-issue\vcpkg-latest-cmake\buildtrees\gts\install-x64-windows-dbg-out.log is:
~

[9/38] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\predicates_init.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.18362.0x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.18362.0x64\mt.exe --manifests -- C:\PROGRA~2\MIB055~1\2019Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64x64\link.exe CMakeFiles\predicates_init.dir\src\predicates_init.c.obj /out:predicates_init.exe /implib: /pdb:predicates_init.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: predicates_init.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\predicates_init.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.18362.0x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\10.0.18362.0x64\mt.exe --manifests -- C:\PROGRA~2\MIB055~1\2019Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64x64\link.exe CMakeFiles\predicates_init.dir\src\predicates_init.c.obj /out:predicates_init.exe /implib: /pdb:predicates_init.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MIB055~1\2019Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64x64\link.exe CMakeFiles\predicates_init.dir\src\predicates_init.c.obj /out:predicates_init.exe /implib: /pdb:predicates_init.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\predicates_init.dir/intermediate.manifest CMakeFiles\predicates_init.dir/manifest.res" failed (exit code 1146) with the following output:
Microsoft (R) Incremental Linker Version 14.24.28316.0
Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1146: no argument specified with option '/implib:'
Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28316 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
~~~

See additional context for the full logs.

Additional context
Archive of the gts buildtree: gts-buildtree-with-cmake-3-17.zip .
The compilation works fine with no CMake is installed on the system, and vcpkg downloads its own internal CMake (3.14 at the moment).

port-bug

Most helpful comment

cmake 3.14.0: OK
cmake 3.15.7: OK
cmake 3.16.5: Error
cmake 3.17.0-rc3: Error

All 7 comments

cmake 3.14.0: OK
cmake 3.15.7: OK
cmake 3.16.5: Error
cmake 3.17.0-rc3: Error

Related PR that would update the internal CMake version to 3.16, breaking this port even when no CMake is installed: https://github.com/microsoft/vcpkg/pull/9531 .

Confirmed.

The current workaround is to comment out PREFER_NINJA in _VCPKG_PATH/ports/gts/portfile.cmake_.

I don't know who added this empty parameter, it seems that our toolchain has a problem on the latest cmake, @dan-shaw could you please have a look?

Thanks.

Thanks for posting this issue. This issue has been fixed. So I am closing this issue for now.

Thanks for fixing the issue!

Was this page helpful?
0 / 5 - 0 ratings