Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765433 - dev-lang/spidermonkey-78.6.0 fails to build without clang
Summary: dev-lang/spidermonkey-78.6.0 fails to build without clang
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-14 13:20 UTC by Sergio
Modified: 2021-04-28 20:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info-media,17.18 KB, text/plain)
2021-01-14 13:20 UTC, Sergio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2021-01-14 13:20:24 UTC
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
Comment 1 Sergio 2021-01-14 13:20:57 UTC
Created attachment 682876 [details]
emerge --info
Comment 2 Sergio 2021-04-28 15:09:10 UTC
I'm updating to spidermonkey-78.10.0
Since I removed clang for some reason, I am again in the identical issue.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-28 15:30:45 UTC
/usr/lib/ccache/bin/clang++ ... check that your links are valid (eselect compiler-shadow update ccache).
Comment 4 Sergio 2021-04-28 15:37:22 UTC
They are. But there's no clang.
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-28 18:28:43 UTC
This sounds like you have a dangling symlink which is getting picked up...
Comment 6 Sergio 2021-04-28 20:06:51 UTC
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?
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-28 20:30:48 UTC
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.