Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 785373 - [guru] games-arcade/taisei-1.3.1-r1 fails to compile
Summary: [guru] games-arcade/taisei-1.3.1-r1 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Haelwenn (lanodan) Monnier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-24 12:06 UTC by Agostino Sarubbo
Modified: 2021-04-24 23:19 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,267.52 KB, text/plain)
2021-04-24 12:06 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-04-24 12:06:15 UTC
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..
Comment 1 Agostino Sarubbo gentoo-dev 2021-04-24 12:06:18 UTC
Created attachment 702192 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-04-24 12:06:19 UTC
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)
Comment 3 Oliver Freyermuth 2021-04-24 14:54:01 UTC
(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?
Comment 4 Agostino Sarubbo gentoo-dev 2021-04-24 15:34:44 UTC
the mentioned library does not exists here
Comment 5 Oliver Freyermuth 2021-04-24 16:01:38 UTC
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.
Comment 6 Larry the Git Cow gentoo-dev 2021-04-24 23:19:40 UTC
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(-)