Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 956054

Summary: =www-client/chromium-136.0.7103.113 failes to compile wirh LLVM/Clang 20 and Rust 1.87.0 with ld.lld: error: undefined symbol: __rustc::__rust_alloc
Product: Gentoo Linux Reporter: Steffen Hau <steffen>
Component: Current packagesAssignee: Chromium Project <chromium>
Status: UNCONFIRMED ---    
Severity: normal CC: kangie, steffen
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://issues.chromium.org/issues/407024458
https://issues.chromium.org/issues/408221149
https://issues.chromium.org/issues/411418184
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: buidl.log for www-client/chromium-136.0.7103.113

Description Steffen Hau 2025-05-17 10:14:59 UTC
I have unmasked llvm_slot_20 use flag and ran into compilation errors for www-client/chromium-136.0.7103.113

I added the upstream bugs and attach the build.log.

I guess <www-client/chromium-137 has to be restricted to max <LLVM/Clang 20 and <rust-1.87.0

I can test as soon as you add an ebuild for chromium-137.

Reproducible: Always
Comment 1 Steffen Hau 2025-05-17 10:16:24 UTC
Created attachment 928970 [details]
buidl.log for www-client/chromium-136.0.7103.113
Comment 2 Matt Jolly gentoo-dev 2025-05-19 22:01:32 UTC
It seems unlikely that LLVM 19 would work and LLVM 20 is the culprit; M136 builds with LLVM 21 and a nightly Rust (likely 1.87.0) upstream.

More to the point, the issues that you've linked point to defective GN dependencies on `//build/rust/allocator`, which indicates that this could occur
on any LLVM/Rust combo.

The `#[global_allocator]` code has been in for a bit - I had to upstream a patch to make that code build with the `unbundle` toolchain on M137: https://github.com/chromium/chromium/commit/87d5ad2f621e0d5c81849dde24f3a5347efcb167

It looks like most of those changes have been in-tree since M137, with the exception of https://github.com/chromium/chromium/commit/ecdd28a15dfd184c9190d36d2609a308677743f0 which appears to be in our currently-packaged M138.

M137 has been in-tree for a bit now (Since the 17th), so you should be able to try that out (and M138 if willing to unmask; it's not scary). Let me know how you go.

We may need to backport those patches, but M137 is due to be promoted to (early) stable from Tomorrow so we'll likely be able to just use that instead. Let me know how M137 and M138 work for you.
Comment 3 Matt Jolly gentoo-dev 2025-05-20 06:31:34 UTC
Actually, having thought about this for a bit - the upstream changes were blocking updating Rust, probably for this reason. I'll restrict it when we do bumps this week.