Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916002 - app-emulation/virtualbox-7.0.12: virtualboxvm fails when compiled with ld.gold instead of ld.bfd
Summary: app-emulation/virtualbox-7.0.12: virtualboxvm fails when compiled with ld.gol...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-gold
  Show dependency tree
 
Reported: 2023-10-19 12:33 UTC by Wolfram Schlich
Modified: 2024-01-18 11:45 UTC (History)
2 users (show)

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


Attachments
emerge --info output (emerge-info.txt,27.15 KB, text/plain)
2023-10-19 12:33 UTC, Wolfram Schlich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schlich 2023-10-19 12:33:44 UTC
Created attachment 873141 [details]
emerge --info output

When app-emulation/virtualbox-7.0.12 is compiled with ld.gold instead of ld.bfd, virtualboxvm fails with the following error:

$ virtualboxvm
VirtualBoxVM: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib64/virtualbox/VirtualBoxVM.so",) failed: /usr/lib64/virtualbox/UICommon.so: undefined symbol: _ZN8QPrinterC1ENS_11PrinterModeE
$

When compiling it wirh ld.bfd, everything is fine.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-19 18:30:04 UTC
At this point, I really beg people to not use gold. Use bfd, lld, or mold. gold isn't really maintained upstream at the moment.
Comment 2 Viorel Munteanu gentoo-dev 2023-10-20 05:33:28 UTC
Yes, gold is no longer a thing.  I don't install it anymore.

When I will have some time I will try with lld and mold, if it doesn't work I'll force bfd in the ebuild.  But please consider this low prio.

Thanks!
Comment 3 Viorel Munteanu gentoo-dev 2023-12-31 10:39:39 UTC
I checked lld, I'll add tc-ld-force-bfd to the next release.
Comment 4 Larry the Git Cow gentoo-dev 2024-01-17 17:38:57 UTC
The bug has been closed via the following commit(s):

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

commit 65d17f35c412a1b3fffad677d5c535dd4ab52ca1
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2024-01-17 08:10:37 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2024-01-17 17:35:45 +0000

    app-emulation/virtualbox: add 7.0.14
    
    Closes: https://bugs.gentoo.org/916002
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/Manifest                 |   2 +
 app-emulation/virtualbox/virtualbox-7.0.14.ebuild | 761 ++++++++++++++++++++++
 2 files changed, 763 insertions(+)

Additionally, it has been referenced in the following commit(s):

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

commit ea0cd8e5f2ce9a3ff23a0be9168f0ff463f68c99
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2024-01-17 07:42:46 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2024-01-17 17:35:44 +0000

    app-emulation/virtualbox: add 6.1.50
    
    Bug: https://bugs.gentoo.org/908814
    Bug: https://bugs.gentoo.org/916002
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox/Manifest                 |   1 +
 app-emulation/virtualbox/virtualbox-6.1.50.ebuild | 681 ++++++++++++++++++++++
 2 files changed, 682 insertions(+)
Comment 5 Wolfram Schlich 2024-01-17 19:54:08 UTC
Viorel, I'm wondering about the old ebuild code in src_configure() and src_prepare() that have references to bug #488176:

src_prepare() {
[...]
	# Do not use hard-coded ld (related to bug #488176)
	sed -e '/QUIET)ld /s@ld @$(LD) @' \
		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
[...]
}

src_configure() {
	tc-ld-disable-gold # bug #488176
[...]
}

Do these make sense with the code you added to src_configure()?

+	# bug #916002
+	tc-ld-force-bfd

Cheers,
Wolfram
Comment 6 Viorel Munteanu gentoo-dev 2024-01-18 11:45:03 UTC
The sed is ok, use $(LD) instead of ld.

tc-ld-disable-gold is no longer needed but the call to tc-ld-force-bfd should be moved before LDFLAGS.

Thanks for spotting this!  I'll update the ebuilds.