Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 854516 - app-emulation/dxvk-1.10.1 fails to compile (lto): undefined reference to dxvk::DxvkInstance::~DxvkInstance()
Summary: app-emulation/dxvk-1.10.1 fails to compile (lto): undefined reference to dxvk...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-06-27 06:14 UTC by Agostino Sarubbo
Modified: 2022-09-16 16:17 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,196.36 KB, text/plain)
2022-06-27 06:14 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 2022-06-27 06:14:07 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-emulation/dxvk-1.10.1 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-06-27 06:14:09 UTC
Created attachment 787874 [details]
build.log

build log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-27 06:19:07 UTC
It's either not possible to use LTO here or it'll need extensive work to make wire up the plugin for the cross bit.
Comment 3 Ionen Wolkens gentoo-dev 2022-06-28 04:48:01 UTC
Works if it can just find a symlink at:
/usr/lib/mingw64-toolchain/x86_64-w64-mingw32/lib/bfd-plugins/liblto_plugin.so

Unsure if a cleaner way to handle, but given this is a all-in-one gcc-only package, I think there's no real concerns doing that.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 05:24:35 UTC
My worry was about stuff like bug 751295 but if it works, why not?
Comment 5 Ionen Wolkens gentoo-dev 2022-06-28 05:43:32 UTC
Indeed, tried full slew of "-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" and both packages build fine now (I'll have the fix up soon, just testing a few things first).

Imagine issues with crossdev too but these two packages don't even build with out-of-the-box crossdev gcc in the first place (lto or not) and I hardly support that.
Comment 6 Larry the Git Cow gentoo-dev 2022-06-28 05:56:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681186074b74f271d43d680b920effa48c30eb0e

commit 681186074b74f271d43d680b920effa48c30eb0e
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-06-28 05:08:14 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-06-28 05:55:31 +0000

    dev-util/mingw64-toolchain: symlink gcc lto plugin for AR
    
    Don't really want to revbump this slow build over a symlink, but
    it could be a long time before this is bumped normally and come
    bite back when people try to use LTO.
    
    Closes: https://bugs.gentoo.org/854516
    Closes: https://bugs.gentoo.org/854540
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 ...64-toolchain-10.0.0.ebuild => mingw64-toolchain-10.0.0-r1.ebuild} | 5 +++++
 1 file changed, 5 insertions(+)
Comment 7 tt_1 2022-06-28 06:18:19 UTC
care to explain how you injected lto into the dxvk ebuild? 

I can test if it works with crossdev born then.
Comment 8 Ionen Wolkens gentoo-dev 2022-06-28 06:36:27 UTC
(In reply to tt_1 from comment #7)
> care to explain how you injected lto into the dxvk ebuild? 
> 
> I can test if it works with crossdev born then.
Hm? Just emerge with C(XX)FLAGS="-flto ..." like any other packages, it does strip-unsupported-flags (given changing expected compiler) but that keeps -flto.

Any issues are likely to be with crossdev rather than these packages, lto should now work out-of-the-box if mingw64-toolchain-10.0.0-r1 and USE=-crossdev-mingw (default).
Comment 9 Larry the Git Cow gentoo-dev 2022-09-16 16:17:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e855eb72fd45d7a1cb013e658fdeb49636ffe7af

commit e855eb72fd45d7a1cb013e658fdeb49636ffe7af
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-09-16 15:48:13 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-09-16 16:17:19 +0000

    dev-util/mingw64-toolchain: fix lto again
    
    Was wondering why AR was looking for the lto plugin in a non-existing
    bfd-plugins directory before, turned out it was because gcc resolved
    its location differently when set as a symlink.
    
    In commit c4262506ff492b96cddccb15e1fe1842d8d5a626, reverted to using
    upstream's intended hardlink but didn't notice this change in behavior
    and it broke lto again.
    
    Bug: https://bugs.gentoo.org/854516
    Fixes: c4262506ff492b96cddccb15e1fe1842d8d5a626
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 ...toolchain-10.0.0-r1.ebuild => mingw64-toolchain-10.0.0-r2.ebuild} | 5 ++---
 ...lchain-10.0.0_p1.ebuild => mingw64-toolchain-10.0.0_p1-r1.ebuild} | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)