| Issue |
55445
|
| Summary |
FindLibEdit.cmake somehow ignores CMAKE_SYSROOT
|
| Labels |
bug,
cmake,
build-problem
|
| Assignees |
|
| Reporter |
ilovepi
|
Fuchsia's Clang CI had a breakage due to `FindLibEdit.cmake` incorrectly finding libedit headers in `/usr/include`, despite the fact that our builders set `CMAKE_SYSROOT` explicitly.
This is incorrect because in our build we set `CMAKE_SYSROOT=/b/s/w/ir/x/w/cipd/linux` so CMake shouldn't be looking in paths like `/usr/include`, because at build time Clang will be invoked with `--sysroot=/b/s/w/ir/x/w/cipd/linux` and it won't consider include paths like `/usr/include`.
More details can be found in a short discussion in the change in https://reviews.llvm.org/D124673.
The initial breakage can be found here: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8814329895908917697/overview
We were able to work around this in our builders for now, but its concerning that the `CMAKE_SYSROOT` may be ignored.
Looking at `FindLibEdit.cmake` hasn't highlighted anything obviously suspicious. It uses `find_path` and `find_library`, but the [CMake documentation](https://cmake.org/cmake/help/latest/variable/CMAKE_SYSROOT.html) says that the `find_*` set of utilities will prefix their searches with the path set in `CMAKE_SYSROOT`.
Comparing it to other `Find*` utilities (e.g., from kitware) hasn't highlighted anything immediately obvious either.
cc: @petrhosek @MaskRay @upsj Since you were all on the initial discussion.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs