Fix absolute install DESTINATION that breaks the vcpkg build under CMake >= 4 - #1457
Merged
JonathanSalwan merged 1 commit intoAug 31, 2026
Conversation
The vcpkg workflow has failed on every run since 2026-06-27, on all three
platforms, for any PR that touches the tree:
CMake Error (install-absolute-destination) at src/libtriton/CMakeLists.txt:378 (install):
INSTALL command given absolute DESTINATION path:
/home/runner/work/Triton/Triton/out/install/linux-x64/lib/python3.11/site-packages
Nothing in the repository changed. .github/workflows/vcpkg.yml uses
lukka/get-cmake@latest, which is unpinned, so the runner moved from CMake 3.x
to 4.4.2; CMake 4 promoted install-absolute-destination into the developer
warning category, and CMakePresets.json sets "errors": { "dev": true }.
The prefix was redundant in the first place. In this branch PYTHON_SITE_PACKAGES
is already relative -- the execute_process just above it prints
"lib/pythonX.Y/site-packages" -- and install() resolves a relative DESTINATION
against CMAKE_INSTALL_PREFIX. Prefixing it again only made the path absolute.
Dropping the prefix keeps the destination byte-identical for a normal install
and additionally restores `cmake --install --prefix <other>`, which an absolute
DESTINATION silently ignores.
The other branch of the if() is left alone: it deliberately installs into the
interpreter's real site-packages when no prefix was given, so its absolute path
is intended. It is not reachable from the presets, which always set one.
Verified with CMake 4.4.2 locally: reproduced the error before the change, and
after it the generated cmake_install.cmake records
"${CMAKE_INSTALL_PREFIX}/lib/pythonX.Y/site-packages" -- the same location,
resolved relative to the prefix.
This was referenced Aug 30, 2026
Author
Before / after on the same runnersSince the runs on this PR are held pending approval, here is the same workflow on my fork — same
So the failure and the fix are both reproducible outside this repository, on stock runners, with no approval needed to look at them. |
mahmoudimus
added a commit
to mahmoudimus/Triton
that referenced
this pull request
Aug 30, 2026
…t fixes Brings in the three commits proposed upstream as JonathanSalwan#1457, JonathanSalwan#1455 and JonathanSalwan#1456: * absolute install DESTINATION that CMake >= 4 rejects * endianness detection that byte-swapped every AArch64 FP immediate on Windows builds * the platform gate that hid the differential test which found it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
src/libtriton/CMakeLists.txtpasses an absolute path toinstall(DESTINATION). That has always been wrong, but it was harmless until CMake 4 turned it into a hard error. The vcpkg workflow installs CMake withlukka/get-cmake@latest, so the runner silently moved from 3.x to 4.4.2 and every PR since has been red.If you try to reproduce this on CMake 3.x you will not see it. I could not — 3.31.6 accepts the absolute path even with
-Werror=dev. That is the main thing to know before reviewing.Why it only manifests on CMake >= 4
Three things have to line up:
install(FILES ... DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES})produces an absolute destination.CMakePresets.jsonsets"errors": { "dev": true }, so developer warnings are errors.install-absolute-destinationinto the developer-warning category. On 3.x it is not in that category, soerrors.devnever applied to it.Only (3) changed, and it changed on the runner rather than in the repository:
Timeline, from the workflow's own history:
dev-v1.0@59f86fa2patch-1install-absolute-destinationatCMakeLists.txt:378No commit in between touched this code.
Reproducing in 30 seconds
Swap
cmake==4.4.2forcmake==3.31.6and it configures cleanly. That is the whole bug.The fix
The prefix was redundant to begin with. In this branch
PYTHON_SITE_PACKAGESis already relative — theexecute_processimmediately above printslib/pythonX.Y/site-packages— andinstall()resolves a relativeDESTINATIONagainstCMAKE_INSTALL_PREFIX. Prefixing it again only made the path absolute.Two benefits beyond unbreaking CI: the destination is unchanged for a normal install, and
cmake --install --prefix <other>starts working again — an absoluteDESTINATIONsilently ignores it.The other branch of the
if()is deliberately untouched. It installs into the interpreter's realsite-packageswhen no prefix was given, so its absolute path is intended, and it is unreachable from the presets, which always set one.Verification
With CMake 4.4.2, configuring the way the preset does:
CMake Generate step failed.cmake_install.cmakerecords${CMAKE_INSTALL_PREFIX}/lib/python3.13/site-packages— the same location, now resolved against the prefix.cmake --installputs the module at<prefix>/lib/python3.13/site-packages/triton.so; it imports and solves a constraint.Suggestion, separate from this PR
Pinning
lukka/get-cmaketo an explicit version would stop a toolchain bump on the runner from breaking the build again with no commit to point at. Worth doing regardless of whether this lands, since the same class of surprise will recur with CMake 5.