https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: games-arcade/taisei-1.3.1-r1 fails to compile. Discovered on: amd64 (internal ref: guru_tinderbox) NOTE: This machine uses a clang/LLVM toolchain. If you think that this issue is strictly related to clang/LLVM please block bug 408963..
Created attachment 702192 [details] build.log build log and emerge --info
Possible context of error(s): /usr/bin/x86_64-pc-linux-gnu-ld: /usr/lib/llvm/12/bin/../lib64/LLVMgold.so: error loading plugin: /usr/lib/llvm/12/bin/../lib64/LLVMgold.so: cannot open shared object file: No such file or directory clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
(In reply to Agostino Sarubbo from comment #2) > /usr/bin/x86_64-pc-linux-gnu-ld: /usr/lib/llvm/12/bin/../lib64/LLVMgold.so: > error loading plugin: /usr/lib/llvm/12/bin/../lib64/LLVMgold.so: cannot open > shared object file: No such file or directory > clang-12: error: linker command failed with exit code 1 (use -v to see > invocation) This seems to point to an incomplete LLVM installation or upgrade (/usr/lib/llvm/12/lib64/LLVMgold.so is part of sys-devel/llvm-12.0.0). It might be triggered for this package only, since USE=lto is active by default (following upstream's default). I can't reproduce this locally, also when compiling this package with the clang toolchain. While disabling USE=lto would likely solve it, it would be preferrable to understand the issue. Would it be possible to check if the mentioned LLVMgold.so exists on the Tinderbox, and / or try to compile anything with -flto using the clang toolchain on it?
the mentioned library does not exists here
Thanks! I read up more on the matter and the situation appears as follows: - sys-devel/llvm[gold] provides the "missing" library. - It is (likely) only used when not specifying -fuse-ld=lld or sys-devel/clang[default-lld] (see [0]) - None of that is default in Gentoo, since LTO is not supported by default. [0] https://wiki.gentoo.org/wiki/Clang#Link-time_optimizations_with_Clang Given all this, even though it only breaks with Clang/LLVM for now in some USE flag combinations, there are many potential causes for breakage (and not all only with Clang/LLVM), so I turn off IUSE=lto by default which should fix this: https://github.com/gentoo/guru/commit/bdf198f3d79536be5dd7071504daaa17c57d47dd @Haelwenn: Feel free to bring lto support back if you disagree or have a solution working with all toolchain combinations / configurations.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bdf198f3d79536be5dd7071504daaa17c57d47dd commit bdf198f3d79536be5dd7071504daaa17c57d47dd Author: Oliver Freyermuth <o.freyermuth@googlemail.com> AuthorDate: 2021-04-24 16:00:02 +0000 Commit: Oliver Freyermuth <o.freyermuth@googlemail.com> CommitDate: 2021-04-24 16:00:02 +0000 games-arcade/taisei: Turn off LTO by default. Upstream has this enabled, but it is not supported by default on Gentoo and causes breakage in some configurations. Closes: https://bugs.gentoo.org/785373 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com> games-arcade/taisei/taisei-1.3.1-r1.ebuild | 2 +- games-arcade/taisei/taisei-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)