Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938659 - dev-build/ninja-1.12.1: Fails to build with mold linker
Summary: dev-build/ninja-1.12.1: Fails to build with mold linker
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-mold gcc-15
  Show dependency tree
 
Reported: 2024-08-29 03:49 UTC by Blacktea Hamburger
Modified: 2024-10-28 11:40 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,33.37 KB, text/x-log)
2024-08-29 03:49 UTC, Blacktea Hamburger
Details
Output of emerge --info dev-build/ninja (emerge-info-output.log,19.50 KB, text/x-log)
2024-08-29 03:50 UTC, Blacktea Hamburger
Details
gdb coredump (gdb.txt,21.98 KB, text/plain)
2024-08-30 11:51 UTC, Blacktea Hamburger
Details
build.log (build.log,32.20 KB, text/x-log)
2024-08-30 11:53 UTC, Blacktea Hamburger
Details
build.log (build.log,31.12 KB, text/x-log)
2024-08-31 11:06 UTC, Blacktea Hamburger
Details
gdb coredump (gdb.txt,21.05 KB, text/plain)
2024-08-31 11:06 UTC, Blacktea Hamburger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blacktea Hamburger 2024-08-29 03:49:38 UTC
Created attachment 901515 [details]
build.log

On gcc14 or without -fuse-ld=mold build succeeds.
Comment 1 Blacktea Hamburger 2024-08-29 03:50:15 UTC
Created attachment 901516 [details]
Output of emerge --info dev-build/ninja
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-30 03:25:51 UTC
Can you run the failing command manually in the build directory under gdb to find where it traps?
Comment 3 Blacktea Hamburger 2024-08-30 11:51:53 UTC
Created attachment 901671 [details]
gdb coredump
Comment 4 Blacktea Hamburger 2024-08-30 11:53:24 UTC
Created attachment 901672 [details]
build.log
Comment 5 Blacktea Hamburger 2024-08-31 11:06:24 UTC
Created attachment 901768 [details]
build.log
Comment 6 Blacktea Hamburger 2024-08-31 11:06:44 UTC
Created attachment 901769 [details]
gdb coredump
Comment 7 Blacktea Hamburger 2024-08-31 11:09:56 UTC
I recompiled it using gcc-14 but it still failed. It never failed before. My gcc-14 and mold are built on gcc-15.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-01 09:33:00 UTC
I think you need to figure out which part of your system is miscompiled.

I'm using GCC 15 (and mold + lto) on various systems and had no issues.

Please also keep in mind that given the flags you mentioned in another bug, it's not always enough to just rebuild _one_ thing with safe flags. It might be that a dependency is contaminated.
Comment 9 Blacktea Hamburger 2024-09-14 10:28:16 UTC
It seems that gcc 15 has broken too many things. I don't want to move further because I have reinstalled my system.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-17 21:45:40 UTC
I really think it's more about the flags, but it is what it is now.
Comment 11 Larry the Git Cow gentoo-dev 2024-10-28 11:38:44 UTC
The bug has been referenced in the following commit(s):

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

commit f6da81d9f85e2223a469e043dc95fd6fc555409f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-10-28 11:36:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-28 11:38:18 +0000

    sys-devel/mold: workaround linux-6.11 incompatibility
    
    Don't write to existing files, instead replace them. This fixes (or works
    around) an incompatibility with linux-6.11.
    
    Bug: https://github.com/rui314/mold/issues/1361
    Bug: https://bugs.gentoo.org/938659
    Closes: https://bugs.gentoo.org/941070
    Thanks-to: Jinghao Jia <jinghao7@illinois.edu>
    Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/mold/files/mold-2.34.1-linux-6.11.patch |  22 +++++
 sys-devel/mold/mold-2.34.1-r1.ebuild              | 107 ++++++++++++++++++++++
 sys-devel/mold/mold-9999.ebuild                   |   4 +
 3 files changed, 133 insertions(+)
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-28 11:40:28 UTC
I think your issue was really bug 941070 and it should be fixed/worked around now.