using GNU libc 2.27

Arsen Arsenović aarsenovic@baylibre.com
Mon Apr 20 09:01:20 GMT 2026


Paul Zimmermann <Paul.Zimmermann@inria.fr> writes:

>        Hi,
>
> I'd like to use GNU libc 2.27 with the CORE-MATH test suite. Some time ago
> I got the following help from this list:
>
> # to check the GNU libc 2.27, installed in say /tmp:
> # CORE_MATH_CHECK_STD=true CORE_MATH_LAUNCHER="/tmp/lib/ld-2.27.so
> --library-path /tmp/lib" LDFLAGS="-L /tmp/lib" ./check.sh --worst --rndn exp
>
> I tried again and it fails (Debian Linux, with gcc 15.2.0) because MPFR needs
> __isoc23_strtol:
>
> zimmerma@coriandre:~/svn/core-math$ CFLAGS=-DCORE_MATH_NO_OPENMP
> OMP_NUM_THREADS=1 CORE_MATH_CHECK_STD=true
> CORE_MATH_LAUNCHER="$TMP/lib/ld-2.27.so --library-path $TMP/lib" LDFLAGS="-L
> $TMP/lib" ./check.sh --worst --rndn exp
> /usr/bin/x86_64-linux-gnu-ld.bfd: check_worst.o: in function `readstdin':
> check_worst_uni.c:(.text+0x202): undefined reference to `__isoc23_sscanf'
> /usr/bin/x86_64-linux-gnu-ld.bfd:
> /usr/lib/gcc/x86_64-linux-gnu/15/../../../x86_64-linux-gnu/libmpfr.so:
> undefined reference to `__isoc23_strtol@GLIBC_2.38'
> collect2: error: ld returned 1 exit status
> gmake: *** [../support/Makefile.univariate:12: check_worst] Error 1
>
> I recompiled GMP and MPFR with -std=c99, installed them in /tmp and tried
> again, but now it seems the system ld needs __isoc23_strtol:
>
> zimmerma@coriandre:~/svn/core-math$ CFLAGS="-I /tmp/include -std=c99
> -DCORE_MATH_NO_OPENMP" OMP_NUM_THREADS=1 CORE_MATH_CHECK_STD=true
> CORE_MATH_LAUNCHER="$TMP/lib/ld-2.27.so --library-path $TMP/lib" LDFLAGS="-L
> /tmp/lib -L $TMP/lib" ./check.sh --worst --rndn exp
> /usr/bin/x86_64-linux-gnu-ld.bfd: /tmp/lib/libgmp.so.10: undefined reference to `__isoc23_strtol@GLIBC_2.38'
>
> Is there any hope to use GNU libc 2.27 with modern compilers?
>
> (My goal is to check some math functions integrated from MathLibm and which
> were correctly rounded.)
>
> Paul

That symbol (__isoc23_strtol) comes from libc headers, so I suspect that
somehow the program still included the (chronologically) newer glibc
headers.

Try getting one of the compiler commands involved in building
libgmp.so.10 and passing it -save-temps, and look at the location
information in the resulting '.i' (or '.ii') file.  I suspect you'll see
/usr/include in there.

The easiest way to do this might be to get an era-appropriate distro.
Or, to treat it as a sort of cross compilation scenario and build up a
sysroot somewhere that you can chroot into later.
-- 
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 430 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260420/c126c7bd/attachment-0001.sig>


More information about the Libc-alpha mailing list