Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899974 - sys-devel/mold-1.10.1 - packages built with mold fail with: crtbeginS.o:(.text): cannot find a symbol in .opd for R_PPC64_REL24 at offset 0x0 because of stripped sys-devel/gcc
Summary: sys-devel/mold-1.10.1 - packages built with mold fail with: crtbeginS.o:(.tex...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: Matthew Smith
URL: https://github.com/rui314/mold/issues...
Whiteboard:
Keywords:
Depends on:
Blocks: 914592
  Show dependency tree
 
Reported: 2023-03-06 23:21 UTC by ernsteiswuerfel
Modified: 2025-05-06 07:46 UTC (History)
1 user (show)

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


Attachments
emerge --info (file_899974.txt,6.67 KB, text/plain)
2023-03-06 23:21 UTC, ernsteiswuerfel
Details
build.log (ppc64, less-608-r2) (less-608-r2:20230306-230311.log,3.52 KB, text/plain)
2023-03-06 23:23 UTC, ernsteiswuerfel
Details
config.log (ppc64, less-608-r2) (config.log,7.92 KB, text/plain)
2023-03-06 23:24 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-03-06 23:21:46 UTC
Created attachment 856440 [details]
emerge --info

Gentoo bug to track the upstream issue: https://github.com/rui314/mold/issues/987

On ppc64 every package trying to use mold as system linker fails with "mold: fatal: /usr/lib/gcc/powerpc64-unknown-linux-gnu/12/crtbeginS.o:(.text): cannot find a symbol in .opd for R_PPC64_REL24 at offset 0x0" in the config phase.

This is not the case for amd64 and musl-amd64 on my boxes. Only seen this on ppc64 so far, musl-ppc64 and ppc not tested yet.

See emerge.log and config.log from sys-apps/less-608-r2 attached here.
Comment 1 ernsteiswuerfel archtester 2023-03-06 23:23:36 UTC
Created attachment 856442 [details]
build.log (ppc64, less-608-r2)
Comment 2 ernsteiswuerfel archtester 2023-03-06 23:24:12 UTC
Created attachment 856444 [details]
config.log (ppc64, less-608-r2)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-13 02:25:59 UTC
Upstream's claim is we shouldn't strip compiler internals like crtbegin*.

In a sense, I'm generally inclined to agree unless something tells us we _should_ do that.

On the other, I feel like surely this would've come up before if it was actually wrong? (I know that's not a strong argument.)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-06 07:44:12 UTC
I wonder if this fix helped:

commit 51f6ad158fc3de14df3f87d1242ff950b2189f05
Author: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Date:   Sat Mar 11 12:27:23 2023 -0500

    estrip: Don't use splitdebug for .o files

    As the process_ar comment explained, object files cannot be splitdebug.

    Bug: https://bugs.gentoo.org/787623 ("www-client/firefox[clang]: .gnu_debuglink is busted when using LLD")
    Fixes: 51579fb34c19 ("prepstrip: add support for elfutils strip")
    Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
    Signed-off-by: Sam James <sam@gentoo.org>

(Or could help, if using splitdebug.)
Comment 5 Larry the Git Cow gentoo-dev 2025-05-06 07:45:19 UTC
The bug has been referenced in the following commit(s):

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

commit ad926f186c5df33c0d33838808901bb2da2b2765
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-06 07:41:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-06 07:43:27 +0000

    sys-devel/mold: drop 2.1.0, 2.35.1, 2.36.0
    
    This drops ppc64 but it was stuck on an old version anyway. We can bring
    it back later once that is sorted.
    
    Bug: https://bugs.gentoo.org/899974
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/mold/Manifest                            |   3 -
 .../mold/files/mold-2.35.1-system-mimalloc.patch   |  64 ------------
 sys-devel/mold/mold-2.1.0.ebuild                   |  89 -----------------
 sys-devel/mold/mold-2.35.1.ebuild                  | 105 --------------------
 sys-devel/mold/mold-2.36.0.ebuild                  | 109 ---------------------
 5 files changed, 370 deletions(-)