Summary: | sys-apps/attr-2.4.48-r3: broken with -Wl,--gc-sections | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Constantin Baranov <const> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, holgersson, hydrapolic, mike, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=644048 | ||
Whiteboard: | Workaround applied in ebuild: -Wl,--no-gc-sections | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315, 731004, 915000 | ||
Attachments: |
output of emerge --info
emerge --info output of an unaffected system. emerge --info of another unaffected system append -Wl,--no-gc-sections to LDFLAGS |
Description
Constantin Baranov
2019-11-14 22:05:10 UTC
I can confirm this. Plenty segfaults from elogind to /usr/bin/install as soon as 2.4.48-r3 is emerged. Downgrading via binpkg to 2.4.47-r2 resolves the problem for me. Created attachment 596206 [details]
output of emerge --info
Adding the emerge --info for my system.
Just to add this here, no issues with this version emerged a few months ago on two ~amd64 systems. I'll attach the emerge --info output just for comparison with affected systems. Created attachment 596208 [details]
emerge --info output of an unaffected system.
I have tested the upgrade on four different stable systems before I filed the stable request bug. No clue what's going so badly wrong on your systems :-( Created attachment 596210 [details]
emerge --info of another unaffected system
Added emerge --info of another unaffected system. Maybe it might help nail down the source of the issue.
Both affected systems has "-Wl,--gc-sections" in LDFLAGS. (In reply to Alexander Tsoy from comment #7) > Both affected systems has "-Wl,--gc-sections" in LDFLAGS. So this could be basically the same issue as with LTO and/or gold (bug 644048) I was able to reproduce this with "-Wl,--gc-sections". It eliminates the text section of libattr_la-syscalls.o. Compiling with "-Wl,--gc-sections,--print-gc-sections" gives the following message: /bin/bash ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -include libattr/libattr.h -O2 -march=bdver2 -mtune=bdver2 -mno-tbm -mno-fma4 -mno-xop -mno-lwp -pipe -fvisibility=hidden -Wl,--version-script,/var/tmp/portage/sys-apps/a ttr-2.4.48-r3/work/attr-2.4.48/exports -Wl,/var/tmp/portage/sys-apps/attr-2.4.48-r3/work/attr-2.4.48/libattr/libattr.lds -version-info 2:2448:1 -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections,--print-gc-sections -o libattr.la -rpath /usr/lib64 libattr/libattr_la-attr_copy_action.lo libattr/libattr_la-attr_copy_check.lo libattr/libattr_la-attr_copy_fd.lo libattr/libattr_la-attr_copy_file.lo libattr/libattr_la-libattr.lo libattr/libattr_la-syscalls.lo libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC libattr/.libs/libattr_la-attr_copy_action.o libattr/.libs/libattr_la-attr_copy_check.o libattr/.libs/libattr_la-attr_copy_fd.o libattr/.libs/libattr_la-attr_copy_file.o libattr/ .libs/libattr_la-libattr.o libattr/.libs/libattr_la-syscalls.o -Wl,--as-needed -O2 -march=bdver2 -mtune=bdver2 -mno-tbm -mno-fma4 -mno-xop -mno-lwp -Wl,--version-script -Wl,/var/tmp/portage/sys-apps/attr-2.4.48-r3/work/attr-2.4.48/expo rts -Wl,/var/tmp/portage/sys-apps/attr-2.4.48-r3/work/attr-2.4.48/libattr/libattr.lds -Wl,-O1 -Wl,--gc-sections -Wl,--print-gc-sections -Wl,-soname -Wl,libattr.so.1 -o .libs/libattr.so.1.1.2448 /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: removing unused section '.text' in file 'libattr/.libs/libattr_la-syscalls.o' (In reply to Alexander Tsoy from comment #8) > (In reply to Alexander Tsoy from comment #7) > > Both affected systems has "-Wl,--gc-sections" in LDFLAGS. > So this could be basically the same issue as with LTO and/or gold (bug > 644048) No, not the same issue (but probably the same root cause?) Created attachment 596286 [details]
append -Wl,--no-gc-sections to LDFLAGS
(In reply to Alexander Tsoy from comment #8) > (In reply to Alexander Tsoy from comment #7) > > Both affected systems has "-Wl,--gc-sections" in LDFLAGS. > So this could be basically the same issue as with LTO and/or gold (bug > 644048) You were faster than me: Yes, it is triggered by the gc-sections LDFLAGS. I tried to bisect the problematic upstream git commit, but had not much success so far (commit to efa0b1ea982261861d64f6d6d620af83d82b02d3 emerge broken binaries, commits older die with a reference to the lto bug "symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048", and some even older commits need major refactoring of the ebuild into historical states. Do you see the cause inside upstreams code? (In reply to Nils Freydank from comment #11) > Do you see the cause inside upstreams code? I didn't verify, but I guess the following sequence of commits caused this bug: http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38 http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=efa0b1ea982261861d64f6d6d620af83d82b02d3 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea36cc2c63ab6c06e1851dc44189e64109e1717d commit ea36cc2c63ab6c06e1851dc44189e64109e1717d Author: Alexander Tsoy <alexander@tsoy.me> AuthorDate: 2019-11-15 23:07:54 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-11-15 23:08:30 +0000 sys-apps/attr: Add --no-gc-sections to linker flags Bug: https://bugs.gentoo.org/700116 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-apps/attr/attr-2.4.48-r3.ebuild | 1 + 1 file changed, 1 insertion(+) See bug 644048 comment 38 for a patch that may fix this issue. Please test it and report your success there. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89b02b4b145ab489734ebcee4d111657473ba560 commit 89b02b4b145ab489734ebcee4d111657473ba560 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-06-20 15:25:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-06-20 15:28:28 +0000 sys-apps/attr: update EAPI 7 -> 8; use real symbol versioning (fix lld, etc) This should finally let us fix compatibility with LLD and.. pretty much anything other than gcc + bfd + -fno-lto (and even then it wasn't technically correct). Big thanks to Alexander Miller for sorting it out. Closes: https://bugs.gentoo.org/644048 Closes: https://bugs.gentoo.org/700116 Thanks-to: Alexander Miller <alex.miller@gmx.de> Signed-off-by: Sam James <sam@gentoo.org> sys-apps/attr/attr-2.5.1-r1.ebuild | 109 +++++++++++++++ sys-apps/attr/attr-9999.ebuild | 44 +++--- sys-apps/attr/files/attr-2.5.1-fix-symver.patch | 173 ++++++++++++++++++++++++ 3 files changed, 308 insertions(+), 18 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db24f070e4b6c04631eebc311098b5b6fd62911 commit 7db24f070e4b6c04631eebc311098b5b6fd62911 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-14 03:48:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-14 03:51:01 +0000 sys-apps/attr: add 2.5.2 Thanks vapier! Bug: https://bugs.gentoo.org/644048 Bug: https://bugs.gentoo.org/700116 Closes: https://bugs.gentoo.org/644058 Closes: https://bugs.gentoo.org/790581 Closes: https://bugs.gentoo.org/912735 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/attr/Manifest | 1 + sys-apps/attr/attr-2.5.2.ebuild | 73 +++++++++++++++++++++++++++++++++++++++++ sys-apps/attr/attr-9999.ebuild | 32 +++--------------- 3 files changed, 78 insertions(+), 28 deletions(-) |