Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784215 - www-client/firefox-88.0 USE=clang : llvm miss-match
Summary: www-client/firefox-88.0 USE=clang : llvm miss-match
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 784269 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-19 18:42 UTC by Reuben Martin
Modified: 2021-05-07 01:29 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2021-04-19 18:42:39 UTC
If latest llvm/clang packages are installed (12) then firefox will try to build using llvm / clang 12, however dev-lang/rust (with USE=system-llvm) limits itself to 11. This llvm version mismatch between clang and rust prevents building.

Reproducible: Always
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-19 19:33:32 UTC
Please read the given error message and pick a solution. There is no automatic solution.

At the moment it is a bit complicated because dev-lang/rust doesn't support LLVM:12... Mask >=sys-devel/lld-12 for now to force LLVM slot 11...
Comment 2 Dennis Schridde 2021-04-19 19:39:29 UTC
Is there a workaround?  I tried to figure out how to point ld.lld to LLVM 11, to make the warning go away, but found no way to influence which version of lld is being executed.


(In reply to Thomas Deutschmann from comment #1)
> Please read the given error message and pick a solution.

Sadly the recommendations given in the error message are not applicable:

> * Rust is using LLVM version 11 but ld.lld version belongs to LLVM version 12.
> * You will be unable to link www-client/firefox. To proceed you have the following options:
> *   - Manually switch rust version using 'eselect rust' to match used LLVM version
 
There is only one Rust version available and it was liked with LLVM 11.

> *   - Switch to dev-lang/rust[system-llvm] which will guarantee matching version

Rust is built with USE=system-llvm and the error appears regardless.

> *   - Build www-client/firefox without USE=lto

I did not try this yet.


> At the moment it is a bit complicated because dev-lang/rust doesn't support LLVM:12... Mask >=sys-devel/lld-12 for now to force LLVM slot 11...

Is it possible to make Firefox depend on LLVM <=11 instead?
Comment 3 Reuben Martin 2021-04-19 19:47:30 UTC
I would think it would make much more sense if firefox defaulted to using the same version of llvm/clang that rust is built with. I can't think of any situation where it would make sense to do otherwise.
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-19 20:02:31 UTC
(In reply to Dennis Schridde from comment #2)
> Is there a workaround?  I tried to figure out how to point ld.lld to LLVM
> 11, to make the warning go away, but found no way to influence which version
> of lld is being executed.

No, the workaround is to downgrade entire sys-devel/lld package.


> Rust is built with USE=system-llvm and the error appears regardless.

Yes, the message

> Switch to dev-lang/rust[system-llvm] which will guarantee matching version

was written when we did not thought about that rust will ever fall behind LLVM upstream. We will probably adjust the message and add ", as long as dev-lang/rust will supported latest LLVM version".


> Is it possible to make Firefox depend on LLVM <=11 instead?

I really want to avoid this. Not everyone building firefox is affected by that problem and forcing people to LLVM <12 feels wrong. Keep in mind that the default ebuild will work out of the box. We also got some requests to allow building against LLVM 12 already...
Comment 5 Larry the Git Cow gentoo-dev 2021-04-19 21:35:46 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4343b18757c41a58c0c40e95891d5582ec714dc7

commit 4343b18757c41a58c0c40e95891d5582ec714dc7
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2021-04-19 21:33:14 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2021-04-19 21:34:37 +0000

    www-client/firefox: drop LLVM:12 support to aid smooth upgrading
    
    USE=lto requires that LLVM version used by rust matches used LLVM version.
    However, dev-lang/rust-1.51 does not support latest LLVM version (12) so
    there is currently no way to automatically enforce all depedencies.
    
    This seems to be too challenging for average Gentoo users so we are dropping
    LLVM:12 support for now to aid smooth upgrading.
    
    Bug: https://bugs.gentoo.org/784215
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-78.10.0.ebuild | 10 +---------
 www-client/firefox/firefox-88.0.ebuild    | 10 +---------
 2 files changed, 2 insertions(+), 18 deletions(-)
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-20 20:59:13 UTC
*** Bug 784269 has been marked as a duplicate of this bug. ***
Comment 7 cyrillic 2021-04-22 00:29:52 UTC
I did get this to work using rust-1.52.0_beta, but it was a rather bumpy ride, and then firefox required patching to get rid of the RUSTC_BOOTSTRAP=1 errors.

# equery list llvm rust firefox
 * Searching for llvm ...
[IP-] [ ~] sys-devel/llvm-12.0.0:12

 * Searching for rust ...
[I-O] [  ] dev-lang/rust-1.52.0_beta:beta/1.52.0_beta

 * Searching for firefox ...
[I-O] [  ] www-client/firefox-88.0:0/88
Comment 8 cyrillic 2021-05-07 01:29:04 UTC
From the stable rust-1.52.0 release notes :
Cargo build scripts are now forbidden from setting RUSTC_BOOTSTRAP.

I needed to patch firefox and spidermonkey a little bit because of this, but they are currently working for me.