Summary: | sys-libs/glibc-2.33-r1: emerge crashes out with segfault checking for CONFIG_IA32_EMULATION when built with old Binutils (<sys-devel/binutils-2.27?) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alan Mackenzie <acm> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bkohler, floppym, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=802051 https://bugs.gentoo.org/show_bug.cgi?id=847133 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | glibc build log |
Description
Alan Mackenzie
2021-07-13 16:50:05 UTC
We have been seeing this lately when (new) glibc-2.33 is built with (very old) binutils-2.25 or 2.26. You do have newer versions of binutils but you've never activated a new one or depcleaned your old obsolete ones. I'm not sure if you can recover from this except by getting a rescue binpkg of glibc. Created attachment 723718 [details]
glibc build log
I believe it's the same as https://archives.gentoo.org/gentoo-user/message/ab0237608c7076d53ee5b024b4f24f21 Try getting a backtrace and instructing dump out of SIGSEGVing glibc-test. The typical session would look like: $ gdb ./glibc-test (gdb) run (gdb) bt (gdb) disassemble > ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 Oh, yeah. That binutils version is way out of date. You need to update sys-devel/binutils to something non-masked, like 2.35. > sys-devel/binutils: 2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo, 2.30-r4::gentoo, 2.31.1-r6::gentoo, 2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34-r2::gentoo, 2.35.2::gentoo You have recent version installed. Switch to that instead with `binutils-config` and check if it's enough to get glibc unstuck. Hello, Sergei. Thanks for the hints about binutils. binutils-config to the highest version wasn't enough to build gclib. In the end, I edited the gclib ebuild file to remove the check which was crashing, and after finding out about emerge --digest was able to rebuild with the new binutils. Somehow, I wasn't aware that binutils-config was needed after emerging a new binutils. Perhaps there's something missing in the binutils emerge messages, or maybe I've just been unaccountably blind for several years. But the bug in the ebuild is not fixed. Maybe it's not worth fixing, but the workaround I used is only really practicable for a hacker. I'll update the thread on the gentoo user mailing list. Thanks again! I'm up and running, now. Typically, old binutils slots get removed by "emerge --depclean". Portage emits a message advising users to run this periodically. If the active binutils slot gets unmerged, pkg_postrm will automatically call binutils-config to select the newest version. Emerge should have complained about masked binutils installed. I think we have a few issues here: 1. Missing automatic `binutils-config` switch (and `gcc-config`). We will need some form of more eager switch to most recent version. It keeps biting people. Filed bug #802051 2. Minimal -m32 test SIGSEGVs for you for both old and new binutils. Let's keep this bug for [2.]. With your glibc workaround did you manage to build glibc-2.33-r1? If you revert the workaround can you build unmodified glibc against installed 2.33-r1 glibc? I don't think a printed warning will be much help here, but we (helpdesk people) have pondered whether >=glibc-2.33[multilib] should bail out completely if ld-2.26 or earlier is detected. This issue is not trivial to recover from. (In reply to Sergei Trofimovich from comment #7) > Let's keep this bug for [2.]. With your glibc workaround did you manage to > build glibc-2.33-r1? If you revert the workaround can you build unmodified > glibc against installed 2.33-r1 glibc? Yes, my workaround build glibc-2.33-r1, and with a restored glibc ebuild, I was able to rebuild that glibc. So I'm up and running, thanks! As a suggestion for a "fix", how about a new use flag which would mean "don't run the check for the multilib stuff"? It's not nice, but might be as good a workaround as any. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f296ba04cc9c825875b4d9fe5df8dbfd2971cd9 commit 7f296ba04cc9c825875b4d9fe5df8dbfd2971cd9 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-24 21:26:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-24 21:26:02 +0000 sys-apps/pciutils: mention why 2.37 check It's to prevent catastrophies from people running with an older Binutils in general, even if 2.35 is strictly enough (probably, not tried myself) to build this package, given older binutils can cause all sorts of problems, it should be considered a wake-up call for people running such an old one, rather than just encouraging them to bump to the lowest possible version which will work (< 2.37 is masked in Gentoo and has been for a while, and we're not backporting any fixes for it.) Bug: https://bugs.gentoo.org/802036 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/pciutils/pciutils-3.8.0.ebuild | 5 +++++ 1 file changed, 5 insertions(+) (In reply to Larry the Git Cow from comment #10) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=7f296ba04cc9c825875b4d9fe5df8dbfd2971cd9 > > commit 7f296ba04cc9c825875b4d9fe5df8dbfd2971cd9 > Author: Sam James <sam@gentoo.org> > AuthorDate: 2022-05-24 21:26:02 +0000 > Commit: Sam James <sam@gentoo.org> > CommitDate: 2022-05-24 21:26:02 +0000 > > sys-apps/pciutils: mention why 2.37 check > > It's to prevent catastrophies from people running with an older Binutils > in general, even if 2.35 is strictly enough (probably, not tried myself) > to build this package, given older binutils can cause all sorts of > problems, > it should be considered a wake-up call for people running such an old > one, > rather than just encouraging them to bump to the lowest possible version > which will work (< 2.37 is masked in Gentoo and has been for a while, > and we're not backporting any fixes for it.) > > Bug: https://bugs.gentoo.org/802036 > Signed-off-by: Sam James <sam@gentoo.org> > > sys-apps/pciutils/pciutils-3.8.0.ebuild | 5 +++++ > 1 file changed, 5 insertions(+) |