[Bug libstdc++/115907] New: Libstdc++ and GCC itself should avoid glibc above 2.34 dependency
unlvsur at live dot com
gcc-bugzilla@gcc.gnu.org
Sat Jul 13 11:55:14 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115907
Bug ID: 115907
Summary: Libstdc++ and GCC itself should avoid glibc above 2.34
dependency
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: unlvsur at live dot com
Target Milestone: ---
I think we really need to relax the version requirements of glibc since version
2.34. I cannot use the upstream glibc due to the potential new and versioned
symbols from glibc itself. Glibc2.38 is just too new tbh. Majority of linux
distributions do not support glibc 2.38. Ubuntu 22.04 which is i guess the most
of people are using is still using glibc 2.35
libstdc++ built with latest glibc would introduce import symbols like
arc4random@GLIBC_2.36
__isoc23_strtoull@GLIBC_2.38
I have checked arc4random implementation in glibc. It does not do anything
meaningful in terms of performance but just a wrapper of /dev/random.
glibc only introduces the symbol since 2.36. I don't see why libstdc++ needs
this and in fact it can break abi silently since passing arc4random as a device
now has different behaviors across libstdc++ versions
https://github.com/gcc-mirror/gcc/blob/abf3964711f05b6858d9775c3595ec2b45483e14/libstdc%2B%2B-v3/src/c%2B%2B11/random.cc#L189
This is another thing which is useless for gcc and libstdc++ since libstdc++
won't use 0b 0B in scanf/printf.
https://github.com/bminor/glibc/blob/4b2a1b602fc1ade0de85084feb328203be3147c9/include/features.h#L481
while glibc does not break the abi until 2.34. I suggest libstdc++ to use glibc
below 2.34 functions.
More information about the Gcc-bugs
mailing list