Add CMAKE_FIND_USE_INSTALL_PREFIX=OFF to our CMake flags #22315
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 Can we apply this patch to a test system and see whether it makes things better or worse?
Here's the issue:
sha256:25e51469574b174a940bc7970cba71d8f96ce228c8ddf7a60aedd61f32c87c68
)/bin/sh: 1: ccache: not found
The build process assumes
there's a "ccache" binary in the path, even though the only copy of
"ccache" is that in the /data directory. The problem is that CMake's
find_program
searches the install prefix unlessCMAKE_FIND_USE_INSTALL_PREFIX
is set, even thoughCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
is also set and affects thesame directory.
Problems:
find_program
is ever validly usedto search for target executables rather than host executables. If
that is the case, this change might break other packages.
Obviously, it's perfectly possible for ccache to be a findable program
but not reside on the PATH, but the code assumes it's always in the
cache.
(It's generally a bad idea to automatically enable
ccache
without anexplicit flag, but that's a
swiftshader
problem, and we have to livewith the broken CMakeLists.txt provided by the package maintainer)
This popped up while working on #22305, but is unrelated.