microsoft / microsoft/vcpkg

[glad] build failure

Open
#44,489 3 comments 0 reactions 1 assignee Claimed by @Cheney-W View on GitHub
category:port-bug Stale
Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 19h
Merged PRs (30d)
321

Description

### Operating system

Windows

### Compiler

MSVC

### Steps to reproduce the behavior

```Shell
`./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]:x64-windows@0.1.36
* 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]:x64-windows@0.1.36...
Building glad[core,loader]:x64-windows@0.1.36...
-- 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](https://github.com/user-attachments/files/19352442/config-x64-windows-out.log)
[config-x64-windows-rel-CMakeCache.txt.log](https://github.com/user-attachments/files/19352443/config-x64-windows-rel-CMakeCache.txt.log)
[config-x64-windows-dbg-CMakeCache.txt.log](https://github.com/user-attachments/files/19352441/config-x64-windows-dbg-CMakeCache.txt.log)

### Additional context

Glad from the vcpkg port uses cmake 3.0 in it's CMakeLists.txt

[CMakeLists.txt](https://github.com/user-attachments/files/19352545/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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.