Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926525 - sys-devel/llvmgold: should be slotted
Summary: sys-devel/llvmgold: should be slotted
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-08 19:41 UTC by fabolous.e05
Modified: 2024-03-12 16:37 UTC (History)
2 users (show)

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


Attachments
emerge --info (emergeinfo,21.06 KB, text/plain)
2024-03-09 20:17 UTC, fabolous.e05
Details
build.log (build.log,56.61 KB, text/plain)
2024-03-09 20:17 UTC, fabolous.e05
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fabolous.e05 2024-03-08 19:41:37 UTC
When llvm:18 and clang:18 is installed, llvmgold:18 will be pulled in by the binutils-plugin useflag of llvm.
Packages that depend on llvmgold, but have LLVM_MAX_SLOT capped at 17 will fail.


Error: could not open plugin file: /usr/lib/llvm/17/bin/../lib64/LLVMgold.so

Example: =mail-client/thunderbird-115.8.1
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-08 19:43:01 UTC
Please always include the full build.log and emerge --info.
Comment 2 Mike Gilbert gentoo-dev 2024-03-08 22:48:12 UTC
Please attach a build log from a failing package and provide emerge --info.
Comment 3 fabolous.e05 2024-03-09 19:28:02 UTC
emerge --info
https://bpa.st/KFNA

build.log
https://bpa.st/2JMQ
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-09 20:06:24 UTC
Please don't link to pastebins in bug reports. They expire and may not be accessible behind firewalls etc. Please use attachments.
Comment 5 fabolous.e05 2024-03-09 20:17:00 UTC
Created attachment 887192 [details]
emerge --info
Comment 6 fabolous.e05 2024-03-09 20:17:54 UTC
Created attachment 887193 [details]
build.log
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-09 20:55:48 UTC
This is tricky. I'm not really sure who is responsible for this. It's arguably you, as the user, for using LTO with Clang.
Comment 8 fabolous.e05 2024-03-09 21:21:28 UTC
actually @immolo on discord told me to open this issue.
I tried to bump llvm version to 18, but thunderbird depends on rust, so rust would have to get a bump to.
But building rust still fails with llvm:18, i'm working on creating a patch.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-09 21:30:30 UTC
I think you might be right, actually.

sys-devel/llvm[binutils-plugin] depends on >=sys-devel/llvmgold-${PV} which means you can easily get a mismatch.
Comment 10 fabolous.e05 2024-03-09 21:31:36 UTC
Is there a problem with slotting llvmgold?
Comment 11 fabolous.e05 2024-03-09 21:32:12 UTC
oops sorry just read the new summary
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-10 03:38:55 UTC
Is that specific to mold?
Comment 13 fabolous.e05 2024-03-11 15:49:05 UTC
sorry for late response had to figure out some other stuff due to llvm:18
anyways yeah you're right it is specific to mold
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-11 15:49:38 UTC
It'll likely happen with bfd too. The gold plugin isn't needed with lld.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-11 17:03:32 UTC
Actually, this makes no sense to me.

/usr/lib/llvm/17/lib64/LLVMgold.so is installed by sys-devel/llvm[binutils-plugin], and it is slotted.

sys-devel/llvmgold only installs /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so symlink.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-11 17:30:34 UTC
(In reply to Michał Górny from comment #15)
> Actually, this makes no sense to me.
> 
> /usr/lib/llvm/17/lib64/LLVMgold.so is installed by
> sys-devel/llvm[binutils-plugin], and it is slotted.
> 
> sys-devel/llvmgold only installs
> /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so symlink.

OH, I read it the wrong way around.
Comment 17 fabolous.e05 2024-03-12 11:30:05 UTC
(In reply to Michał Górny from comment #15)
> Actually, this makes no sense to me.
> 
> /usr/lib/llvm/17/lib64/LLVMgold.so is installed by
> sys-devel/llvm[binutils-plugin], and it is slotted.
> 
> sys-devel/llvmgold only installs
> /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so symlink.

but if you have llvm:18 only llvmgold-18 gets pulled in
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-12 11:35:22 UTC
(In reply to fabolous.e05 from comment #17)
> (In reply to Michał Górny from comment #15)
> > Actually, this makes no sense to me.
> > 
> > /usr/lib/llvm/17/lib64/LLVMgold.so is installed by
> > sys-devel/llvm[binutils-plugin], and it is slotted.
> > 
> > sys-devel/llvmgold only installs
> > /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so symlink.
> 
> but if you have llvm:18 only llvmgold-18 gets pulled in

Yes.  Which installs a symlink that has nothing to do with the error you're seeing.
Comment 19 fabolous.e05 2024-03-12 16:21:42 UTC
Oh shoot I'm just stupid i had binutils-plugin enabled on llvm, but i hadn't recompiled. Sorry for that!
Anyways just to understand: what even is the purpose of llvmgold as it's just a symlink? In other terms: which programs need the symlink?

btw: thunderbid passes ^ this stuff now, but fails when compiling rusts style lib, but I'm sure i can figure that out by myself.
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-12 16:36:40 UTC
GNU ld does.
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-12 16:37:12 UTC
Err, GNU binutils in general, I meant.  It's needed for ar/nm etc. to understand LLVM bitcode.