|
|
Log in / Subscribe / Register

GNU C library 2.33 released

GNU C library 2.33 released

Posted Feb 7, 2021 17:27 UTC (Sun) by nix (subscriber, #2304)
Parent article: GNU C library 2.33 released

Well upgrading my firewall was fun! We have more x86-32 rot! (This is *after* recovery, with all /lib links pointed back to 2.32.)

nix@fold 4 /home/nix% /lib/ld-2.33.so --preload /lib/libc-2.33.so /bin/ls
/lib/libc-2.33.so: CPU ISA level is lower than required

Looks like -march=geode does not cause binutils to guess right, at least as of binutils 2.35 (yes, I know this is old, but it still shouldn't cause glibc to fail like this):

Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA needed: x86-64-v2

(will report to the glibc list.)

Looks like the only way to turn off this stuff right now is to pass libc_cv_include_x86_isa_level=no to configure, which gentoo and others have just started doing.


to post comments

GNU C library 2.33 released

Posted Feb 7, 2021 17:54 UTC (Sun) by nix (subscriber, #2304) [Link] (2 responses)

On second thoughts, I think this particular instance was caused by the confluence of multiple local patches (one for the system gcc that passes in -march=native by default, then a specs file that overrides it with march=geode when building for the firewall, combined with a glibc makefile that does not always pass local CFLAGS down, so that one object file ended up being built without -march=geode. It didn't use any of the things the higher ISA level called for, but the arch notes system doesn't know anything about that, and the lack of an explicit arch on that one file led to everything being contaminated with an arch of x86-64-v2. Sigh.)

GNU C library 2.33 released

Posted Feb 8, 2021 13:49 UTC (Mon) by nix (subscriber, #2304) [Link] (1 responses)

Nope, this is real. march=... does not (reliably? at all) affect the ISA stamping done by sysdeps/x86/isa-level.c, leading to e.g. 32-bit glibcs being built on fast machines for execution on old slow machines being stamped as requiring whatever fast x86-64 box you did your builds on, even if it was built with -march=i586 or something. (ld.so validates this using the CPUID and has no way to override the validation, so everything seems to work when you test it on your build host, even if you test in a VM, and then fails disastrously when you install it on the target machine, with every binary failing to run, even though they would all run just fine if only ld.so let them).

See this thread: https://sourceware.org/pipermail/libc-alpha/2021-February... (HJ's initial patch is definitely not sufficient).

For now, it's safest to turn off ISA stamping if you're building on one machine for execution on any machine which might be older (or otherwise of a lower ISA level). Of course there is no configure flag for this: you have to override the cache variable by adding libc_cv_include_x86_isa_level=no to your configure line.

GNU C library 2.33 released

Posted Feb 8, 2021 15:55 UTC (Mon) by nix (subscriber, #2304) [Link]

Other fallout: openssh fails on 32-bit platforms due to needing some 64-bit time syscalls added to the seccomp filter list. (Patch submitted.)

Also some obscure --enable-stack-protector=all failures, but I suspect that use of that particular configure flag is quite rare (patches in preparation but they're all in the testsuite anyway and do not affect glibc itself).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds