[glad] build failure
Operating system
Windows
Compiler
MSVC
Steps to reproduce the behavior
`./vcpkg install glad`
Failure logs
PS D:\cpp\lib\vcpkg> vcpkg install glad
Computing installation plan...
The following packages will be built and installed:
* egl-registry:x64-windows@2024-01-25
glad[core,loader]:[email protected]
* opengl-registry:x64-windows@2024-02-10#1
* vcpkg-cmake:x64-windows@2024-04-23
* vcpkg-cmake-config:x64-windows@2024-05-23
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Compiler found: D:/Microsoft/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe
Restored 4 package(s) from C:\Users\Nes\AppData\Local\vcpkg\archives in 40.6 ms. Use --debug to see more details.
Installing 1/5 egl-registry:x64-windows@2024-01-25...
Elapsed time to handle egl-registry:x64-windows: 2.08 ms
egl-registry:x64-windows package ABI: 19899c0b5b6cf54fdf3d522d150e319a7559aa04f8cffdaa584253ae1885d794
Installing 2/5 opengl-registry:x64-windows@2024-02-10#1...
Elapsed time to handle opengl-registry:x64-windows: 4.28 ms
opengl-registry:x64-windows package ABI: e5e7589da48e2a6780b6c937437feda5f065642a0dd834642453800672bbd3b4
Installing 3/5 vcpkg-cmake:x64-windows@2024-04-23...
Elapsed time to handle vcpkg-cmake:x64-windows: 4.33 ms
vcpkg-cmake:x64-windows package ABI: c0d881a05ffde2e43dd25bd44dcb975fcb2a5ede6d8e599a07784cbea714e653
Installing 4/5 vcpkg-cmake-config:x64-windows@2024-05-23...
Elapsed time to handle vcpkg-cmake-config:x64-windows: 3.71 ms
vcpkg-cmake-config:x64-windows package ABI: b6f13d5a923abbccb848c45bec53102a04444401bd6aa3b3650863a1889cb5ca
Installing 5/5 glad[core,loader]:[email protected]...
Building glad[core,loader]:[email protected]...
-- Note: glad only supports static library linkage. Building static library.
-- Using cached Dav1dde-glad-1ecd45775d96f35170458e6b148eb0708967e402.tar.gz.
-- Cleaning sources at D:/cpp/lib/vcpkg/buildtrees/glad/src/708967e402-274d415499.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/cpp/lib/vcpkg/downloads/Dav1dde-glad-1ecd45775d96f35170458e6b148eb0708967e402.tar.gz
-- Applying patch encoding.patch
-- Applying patch find_python.patch
-- Using source at D:/cpp/lib/vcpkg/buildtrees/glad/src/708967e402-274d415499.clean
-- This version of glad uses the compatibility profile. To use the core profile instead, create an overlay port of this with GLAD_PROFILE set to 'core' or set GLAD_PROFILE to 'core' in a custom triplet.
-- This recipe is at D:/cpp/lib/vcpkg/ports/glad
-- See the overlay ports documentation at https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md
-- Found external ninja('1.12.1').
-- Configuring x64-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: "D:/Microsoft/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v
Working Directory: D:/cpp/lib/vcpkg/buildtrees/glad/x64-windows-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
D:\cpp\lib\vcpkg\buildtrees\glad\config-x64-windows-dbg-CMakeCache.txt.log
D:\cpp\lib\vcpkg\buildtrees\glad\config-x64-windows-rel-CMakeCache.txt.log
D:\cpp\lib\vcpkg\buildtrees\glad\config-x64-windows-out.log
Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:269 (vcpkg_execute_required_process)
ports/glad/portfile.cmake:126 (vcpkg_cmake_configure)
scripts/ports.cmake:196 (include)
error: building glad:x64-windows failed with: BUILD_FAILED
config-x64-windows-out.log config-x64-windows-rel-CMakeCache.txt.log config-x64-windows-dbg-CMakeCache.txt.log
Additional context
Glad from the vcpkg port uses cmake 3.0 in it's CMakeLists.txt
However, it's deprecated for the latest CMake version. Therefore, a new install of glad simply fails if the latest CMake is installed on the machine.
The glad repo doesn't have non-glad2 branches with a more fresh cmake requirement (as far as I can tell), so from what I can see, either the glad repo has to update it's CMake for the v1, or the v1 should be deprecated.
In the meantime, I'd very much appreciate some pointers for a clean hotfix, if there is a tried and sure way to do so in such cases (for now I'll probably just downgrade my cmake as I don't need the latest one). My cmake version is 4.0.0-rc4
CMake has now upgraded to v4.0.0 on Arch Linux, which means that a system-installed toolchain cannot build glad.
Same issue, downgrading to latest CMake before 4.0 fixed it
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.