-
-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mold: fatal: could not open plugin file: Cannot open "/usr/bin/../lib/LLVMgold.so" #793
Comments
I don't think this is a bug of mold. That path is not hardcoded to mold, so someone must be passing to the linker in your environment. |
clang do that, IMHO.
|
Even if lld completely ignores the |
This is clang specific, not FreeBSD. You can find this in llvm upstream:
So LTO should be broken on linux too then clang used. |
No, it's actually a FreeBSD's clang package issue. LTO works on Linux with Clang. The problem is that FreeBSD's Clang doesn't ship with |
You assume that CLang have workaround for this then |
We do not assume that |
FWIW, The reason lld doesn't get |
I made patch to llvm, rebuild and reinstall it:
now I get:
PS: then I create symlynk to LLVMgold.so (llvm13 installed from ports with this plugin, base llvm is 13 too) then it link in single thread, do not see performace grow. |
|
I am right that it: "work as intended" / "not a bug" ? LTO enabled on build system side, clang add |
You are right. mold is working as intended. Any linker other than lld can't do LTO without the linker plugin file. (On the other hand, lld can't do LTO with a linker plugin, so it can't do LTO with any compilers other than clang.) |
Please file a bug to FreeBSD clang package so that
|
|
As I said, this is a problem of clang that invokes a linker with a bad parameter. It is not a linker but clang who should print out an error message if |
I recommended you report this issue to FreeBSD because they need a user input to fix the issue once and for all. There's actually a fix to this issue which I made in May (https://reviews.llvm.org/D125624), but there's no progress because there's no one who pushed it other than me. Your problem cannot be solved by filing a bug to mold and pushing me to do something. Please file bugs to FreeBSD and Clang instead and ask them to solve the problem for you. |
This happen on FreeBSD 13 amd64 during try to build svt-av1 with LTO.
There is no
LLVMgold.so
in system and system clang/ld work without this.I suppose mold should not fail and silently ignore this.
The text was updated successfully, but these errors were encountered: