clang_configure: add /usr/lib/libclang.so to search paths #528
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.
On ArchlinuxARM, running
clang --versionreturns:compared to Ubuntu:
which breaks the build with:
On ArchlinuxARM,
libclang.sois installed directly under/usr/lib, so theres no need to get the version first. This PR adds a search forlibclang.soin/usr/libfirst, and falls back to the existing lookup if it’s not found.I also evaluated a more hermetic approach using toolchains_llvm.
Theres
@llvm_toolchain_llvm//:bin/clangand@llvm_toolchain_llvm//:lib/libclang.sotarget, but it can be added to the root bazel module only. Another issue is size - extracted toolchain is about 6 GB and takes more than 400 seconds to extract on Raspberry Pi - not sure if its worth it. Maybe there could be somerules_ros2option to providerules_ros2_config_clangreplacement if root module is already usingtoolchains_llvm...