Fix clang post-installation test - #6300
Open
shahor02 wants to merge 1 commit into
Open
Conversation
Suggested by codex with this explanation Clang.sh moves clang into bin-safe, then immediately runs: $(clang --print-target-triple) But plain clang is no longer in PATH, so the log shows: Clang.sh: line 95: clang: command not found Clang.sh: line 98: clang: command not found Clang.sh: line 101: clang: command not found That creates wrongly named config files: -clang.cfg -clang++.cfg -clang-cpp.cfg So bin-safe/clang++ does not load the intended --gcc-toolchain config. It falls back to system GCC 12: Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12 but this machine only has C++ headers for GCC 11 under /usr/include/c++/11, not GCC 12, so the final check fails with: test.cc:1:10: fatal error: 'iostream' file not found I also verified that using the aliBuild GCC toolchain explicitly works: clang++ --gcc-toolchain=/home/shahoian/alice/sw/ubuntu2204_x86-64/GCC-Toolchain/v14.2.0-alice2-1 ... One more issue: the generated config contains the literal text $GCC_TOOLCHAIN_ROOT; Clang config files did not expand that in my test. So the recipe likely needs both a correct clang path for --print-target-triple and a concrete GCC toolchain path, or another supported relocation mechanism.
Contributor
Contributor
|
Thanks @shahor02 . This has indeed been a pending issue for a while. IIRC, all the attempts that have been tried so far did not ensure correct relocation. Does it work with this PR? |
Contributor
Author
|
@vkucera yes, on my ubuntu 22.04 PC (with system gcc v11, which was causing a problem after the fall-back) it worked fine. |
Contributor
Great! Thanks for the confirmation. |
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.
Suggested by codex with this explanation
The original build error was