Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924237 - sys-devel/gcc-14: miscompiles sys-libs/glibc-2.38-r10 on arm
Summary: sys-devel/gcc-14: miscompiles sys-libs/glibc-2.38-r10 on arm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: gcc-14 924709 924758 924769 924871
  Show dependency tree
 
Reported: 2024-02-10 20:18 UTC by Agostino Sarubbo
Modified: 2024-03-15 04:24 UTC (History)
0 users

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


Attachments
build.log.xz (build.log.xz,145.12 KB, application/x-xz)
2024-02-10 20:18 UTC, Agostino Sarubbo
Details
build.log.xz (build.log.xz,573.48 KB, application/x-xz)
2024-02-13 12:55 UTC, Agostino Sarubbo
Details
out.xz (out.xz,906.05 KB, application/x-xz)
2024-02-14 09:55 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 2024-02-10 20:18:18 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-libs/glibc-2.38-r10 fails to compile.
Discovered on: arm (internal ref: tinderbox_arm)
System: GCC-14-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-14)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-10 20:18:21 UTC
Created attachment 884688 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2024-02-10 20:18:22 UTC
Error(s) that match a know pattern:

collect2: error: ld returned 1 exit status
Comment 3 Agostino Sarubbo gentoo-dev 2024-02-10 20:20:11 UTC
to reproduce:

1) get a fresh stage3
2) update to ~arch and update the world (-DuN)
3) install gcc-14
4) emerge -w world (2 times)
Comment 4 Agostino Sarubbo gentoo-dev 2024-02-10 20:20:30 UTC
(In reply to Agostino Sarubbo from comment #3)
> 4) emerge -w world (2 times)

typo: I meant -e world
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-11 09:45:50 UTC
armv7a-unknown-linux-gnueabihf-gcc  -g3 -ggdb3 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -pipe -pipe -fno-diagnostics-color -fmessage-length=0 -O2 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0  -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux-armhf.so.3   -B/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/csu/  -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.map -Wl,-soname=libc.so.6 -Wl,-z,relro -Wl,-z,now -nostdlib -nostartfiles -e __libc_main -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/math -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/dlfcn -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nss -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nis -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/rt -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/resolv -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/mathvec -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/support -L/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nptl -Wl,-rpath-link=/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/math:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/dlfcn:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nss:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nis:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/rt:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/resolv:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/mathvec:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/support:/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/nptl -o /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/csu/abi-note.o /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc_pic.os.clean /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/interp.os /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld.so -lgcc /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/sofini.os
/bin/sh ../scripts/rellns-sh /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld.so /var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3.new
collect2: error: ld returned 1 exit status

If you run that failing ld command manually, do you get any more output? What if you append -v?
Comment 6 Agostino Sarubbo gentoo-dev 2024-02-13 12:55:11 UTC
Created attachment 884861 [details]
build.log.xz

build.log (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 7 Agostino Sarubbo gentoo-dev 2024-02-13 12:55:30 UTC
(In reply to Agostino Sarubbo from comment #6)
> Created attachment 884861 [details]
> build.log.xz
> 
> build.log (compressed because it exceeds attachment limit, use 'xzless' to
> read it)

test log, requested by sam
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-13 19:25:25 UTC
Can you get the .out files please?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-14 02:54:59 UTC
I'm going to use this bug for the miscompilation. Let's handle the linker failure separately (new bug please) if you can consistently hit it with -ggdb3 and you're sure it's not OOMing.
Comment 10 Agostino Sarubbo gentoo-dev 2024-02-14 09:55:06 UTC
Created attachment 884949 [details]
out.xz

out.xz
Comment 11 Larry the Git Cow gentoo-dev 2024-02-19 00:02:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e54a7fbca63053b5753fd9ba543c27ef392d3084

commit e54a7fbca63053b5753fd9ba543c27ef392d3084
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-19 00:01:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-19 00:01:46 +0000

    14.0.0: arm: fix inconsistency between atomic patterns and expected attributes
    
    Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9.
    
    Bug: https://gcc.gnu.org/PR113915
    Bug: https://bugs.gentoo.org/924237
    Signed-off-by: Sam James <sam@gentoo.org>

 14.0.0/gentoo/75_all_arm_PR113915-atomics.patch | 36 +++++++++++++++++++++++++
 14.0.0/gentoo/README.history                    |  5 ++++
 2 files changed, 41 insertions(+)
Comment 12 Larry the Git Cow gentoo-dev 2024-02-19 00:08:22 UTC
The bug has been closed via the following commit(s):

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

commit 8b165bc3b9bfc3976fc97f95e20da59fa924440c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-19 00:05:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-19 00:06:59 +0000

    sys-devel/gcc: add 14.0.1_pre202402
    
    This has a workaround for bug #924237. bugs #924709, bug #924758, and
    bug #924769 may be the same.
    
    Bug: https://bugs.gentoo.org/924709
    Bug: https://bugs.gentoo.org/924758
    Bug: https://bugs.gentoo.org/924769
    Closes: https://bugs.gentoo.org/924237
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/Manifest                      |  2 +
 sys-devel/gcc/gcc-14.0.1_pre20240218.ebuild | 64 +++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-15 04:24:21 UTC

commit f294934516cf497001ad114963a66adefda005ba
Author: Sam James <sam@gentoo.org>
Date:   Mon Mar 11 12:43:18 2024 +0000

    sys-devel/gcc: add 14.0.1_pre20240310

    Signed-off-by: Sam James <sam@gentoo.org>