In a light weighted desktop, the configure phase of dev-lang/spidermonkey-78.6.0 failed because: DEBUG: Executing: `/usr/lib/ccache/bin/clang++ /mass/tmp/portage/dev-lang/spidermonkey-78.6.0/temp/conftest.ul6mpkz0.cpp -E` DEBUG: The command returned non-zero exit status 1. DEBUG: Its error output was: DEBUG: | ccache: error: Could not find compiler "clang++" in PATH ERROR: Command `/usr/lib/ccache/bin/clang++ /mass/tmp/portage/dev-lang/spidermonkey-78.6.0/temp/conftest.ul6mpkz0.cpp -E` failed with exit status 1. clang, indeed, was not installed. Adding the clang USE flag, and so pulling in sys-devel/clang-11.0.0, resolved the issue. Reproducible: Didn't try Steps to Reproduce: 1. Try to build dev-lang/spidermonkey-78.6.0 in a system without clang Actual Results: Unable to build Expected Results: Either force the clang dependency or resolve in other ways. emerge --info attached
Created attachment 682876 [details] emerge --info
I'm updating to spidermonkey-78.10.0 Since I removed clang for some reason, I am again in the identical issue.
/usr/lib/ccache/bin/clang++ ... check that your links are valid (eselect compiler-shadow update ccache).
They are. But there's no clang.
This sounds like you have a dangling symlink which is getting picked up...
I don't know if I don't arrive to understand something. Can /usr/lib/ccache/bin/clang++ be a symlink to something else? I mean something that is not clang. The error message says: error: Could not find compiler "clang++" in PATH. $PATH contains /usr/lib/llvm/11/bin and in a computer where clang is installed I have /usr/lib/llvm/11/bin/clang++. In this lightweight desktop there's no /usr/lib/llvm/11/bin/clang++. Adding the "clang" USE pulls clang as dependency and it works. Am I wrong in some understanding?
Yes. And I can reproduce when I have a system with working clang and ccache setup where I now remove clang. After removing clang, > /usr/lib/ccache/bin/clang++ -> /usr/bin/ccache will be kept. It's not a broken symlink but ccache will fail to run clang++ because there is no clang anymore on the system. > eselect compiler-shadow update ccache will remove the 'stale' link: > clean-stage3 # ls -lv /usr/lib/ccache/bin/clang++ > lrwxrwxrwx 1 root root 15 Apr 20 17:46 /usr/lib/ccache/bin/clang++ -> /usr/bin/ccache > clean-stage3 # eselect compiler-shadow update ccache > Updating masquerade for ccache ... > 'gcc' -> '/usr/bin/ccache' > 'gcc-10.2.0' -> '/usr/bin/ccache' > 'gcc-9.3.0' -> '/usr/bin/ccache' > 'g++' -> '/usr/bin/ccache' > 'g++-10.2.0' -> '/usr/bin/ccache' > 'g++-9.3.0' -> '/usr/bin/ccache' > 'aarch64-unknown-linux-gnu-gcc' -> '/usr/bin/ccache' > 'armv6j-hardfloat-linux-gnueabi-gcc' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-gcc' -> '/usr/bin/ccache' > 'aarch64-unknown-linux-gnu-gcc-10.2.0' -> '/usr/bin/ccache' > 'armv6j-hardfloat-linux-gnueabi-gcc-10.2.0' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-gcc-10.2.0' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-gcc-9.3.0' -> '/usr/bin/ccache' > 'aarch64-unknown-linux-gnu-g++' -> '/usr/bin/ccache' > 'armv6j-hardfloat-linux-gnueabi-g++' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-g++' -> '/usr/bin/ccache' > 'aarch64-unknown-linux-gnu-g++-10.2.0' -> '/usr/bin/ccache' > 'armv6j-hardfloat-linux-gnueabi-g++-10.2.0' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-g++-10.2.0' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-g++-9.3.0' -> '/usr/bin/ccache' > 'cc' -> '/usr/bin/ccache' > 'c99' -> '/usr/bin/ccache' > 'c++' -> '/usr/bin/ccache' > 'aarch64-unknown-linux-gnu-c++' -> '/usr/bin/ccache' > 'armv6j-hardfloat-linux-gnueabi-c++' -> '/usr/bin/ccache' > 'x86_64-pc-linux-gnu-c++' -> '/usr/bin/ccache' > clean-stage3 # ls -lv /usr/lib/ccache/bin/clang++ > ls: cannot access '/usr/lib/ccache/bin/clang++': No such file or directory ...and now, spidermonkey will merge successfully.