I'm currently trying to create a build of Glibc 2.33 to live in parallel to the default system version, but the build process is resulting in a large number of unit test failures. While some of the failures might be safe to ignore, most seem like legitimate problems, but I'm not sure how to fix them. The desired final target system is CentOS 7.9, but I'm currently testing the build steps in Ubuntu Desktop 21.04 (in a VMware 15 VM) since CentOS 7.9 requires creating a bootstrap tool-chain (the default tool-chain is too old). According to the Glibc 2.33 documentation, the --enable-add-ons
option is no longer required (and might even be unsupported), so I'm not sure what steps or configuration options I could be missing.
The steps followed to create the build VM
- Create a "clean", minimal Ubuntu Desktop 21.04 VM installation
- Fully update the VM
- Install the following packages
build-essential
gawk
bison
texinfo
msgfmt
gettext
Software versions of the resultant system
- GCC: Ubuntu 10.3.0-1ubuntu1
- Binutils: 2.36.1
- Make: 4.3
- Bison: 3.7.5
- Gawk: 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
- Python 3: 3.9.5
- PExpect: 4.8.0
- Perl: 5.32.1
- Texinfo: 6.7.0
- Sed: 4.7
- Gdb: Ubuntu 10.1-2ubuntu2 (10.1.90.20210411-git)
Glibc 2.33 build steps:
Download the Glibc 2.33 source code
wget https://ftp.gnu.org/gnu/glibc/glibc-2.33.tar.gz -P ${HOME}/Downloads
Create directories
rm -rf ${HOME}/Projects/BuildToolchain && mkdir -p ${HOME}/Projects/BuildToolchain/Build
Extract the Glibc 2.33 source code
tar -xf ${HOME}/Downloads/glibc-2.33.tar.gz -C ${HOME}/Projects/BuildToolchain
Enter the (out-of-source) build directory
cd ${HOME}/Projects/BuildToolchain/Build
Configure Glibc 2.33
../glibc-2.33/configure --prefix=${HOME}/Projects/BuildToolchain/Install 2>&1 | tee output-configure.txt
Build Glibc 2.33
make -j`nproc` 2>&1 | tee output-make.txt
Build and run the unit tests
make check 2>&1 | tee output-make-check.txt
Unit test results
The above steps result in the following unit test results, including 149 failed tests.
FAIL: debug/tst-backtrace2
FAIL: debug/tst-backtrace3
FAIL: debug/tst-backtrace4
FAIL: debug/tst-backtrace5
FAIL: debug/tst-backtrace6
FAIL: dlfcn/bug-atexit3
FAIL: elf/check-abi-libc
UNSUPPORTED: elf/tst-audit10
UNSUPPORTED: elf/tst-avx512
UNSUPPORTED: elf/tst-cet-legacy-8
UNSUPPORTED: elf/tst-cet-property-2
FAIL: elf/tst-cpu-features-cpuinfo
FAIL: elf/tst-glibc-hwcaps-prepend-cache
FAIL: elf/tst-ldconfig-ld_so_conf-update
XPASS: elf/tst-protected1a
XPASS: elf/tst-protected1b
FAIL: elf/tst-unwind-main
FAIL: iconv/tst-iconv-mt
FAIL: malloc/tst-malloc-stats-cancellation
FAIL: malloc/tst-malloc-stats-cancellation-mcheck
UNSUPPORTED: math/test-double-libmvec-sincos-avx512
UNSUPPORTED: math/test-float-libmvec-sincosf-avx512
FAIL: misc/tst-gettid-kill
UNSUPPORTED: misc/tst-pkey
FAIL: misc/tst-sigcontext-get_pc
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
FAIL: nptl/tst-basic3
FAIL: nptl/tst-basic4
FAIL: nptl/tst-call-once
FAIL: nptl/tst-cancel-self
FAIL: nptl/tst-cancel-self-cancelstate
FAIL: nptl/tst-cancel-self-canceltype
FAIL: nptl/tst-cancel-self-testcancel
FAIL: nptl/tst-cancel1
FAIL: nptl/tst-cancel10
FAIL: nptl/tst-cancel11
FAIL: nptl/tst-cancel12
FAIL: nptl/tst-cancel13
FAIL: nptl/tst-cancel14
FAIL: nptl/tst-cancel15
FAIL: nptl/tst-cancel16
FAIL: nptl/tst-cancel17
FAIL: nptl/tst-cancel18
FAIL: nptl/tst-cancel2
FAIL: nptl/tst-cancel20
FAIL: nptl/tst-cancel21
FAIL: nptl/tst-cancel22
FAIL: nptl/tst-cancel23
FAIL: nptl/tst-cancel24
FAIL: nptl/tst-cancel25
FAIL: nptl/tst-cancel28
FAIL: nptl/tst-cancel3
FAIL: nptl/tst-cancel4
FAIL: nptl/tst-cancel4_1
FAIL: nptl/tst-cancel4_2
FAIL: nptl/tst-cancel5
FAIL: nptl/tst-cancel6
FAIL: nptl/tst-cancel7
FAIL: nptl/tst-cancel8
FAIL: nptl/tst-cancel9
FAIL: nptl/tst-cancelx10
FAIL: nptl/tst-cancelx11
FAIL: nptl/tst-cancelx12
FAIL: nptl/tst-cancelx13
FAIL: nptl/tst-cancelx14
FAIL: nptl/tst-cancelx15
FAIL: nptl/tst-cancelx16
FAIL: nptl/tst-cancelx17
FAIL: nptl/tst-cancelx18
FAIL: nptl/tst-cancelx2
FAIL: nptl/tst-cancelx20
FAIL: nptl/tst-cancelx21
FAIL: nptl/tst-cancelx3
FAIL: nptl/tst-cancelx4
FAIL: nptl/tst-cancelx5
FAIL: nptl/tst-cancelx6
FAIL: nptl/tst-cancelx7
FAIL: nptl/tst-cancelx8
FAIL: nptl/tst-cancelx9
FAIL: nptl/tst-cleanup0
FAIL: nptl/tst-cleanup0-cmp
FAIL: nptl/tst-cleanup1
FAIL: nptl/tst-cleanup3
FAIL: nptl/tst-cleanup4
FAIL: nptl/tst-cleanupx0
FAIL: nptl/tst-cleanupx1
FAIL: nptl/tst-cleanupx3
FAIL: nptl/tst-cleanupx4
FAIL: nptl/tst-cnd-basic
FAIL: nptl/tst-cnd-broadcast
FAIL: nptl/tst-cnd-timedwait
FAIL: nptl/tst-cond-except
FAIL: nptl/tst-cond22
FAIL: nptl/tst-cond25
FAIL: nptl/tst-cond7
FAIL: nptl/tst-cond8
FAIL: nptl/tst-default-attr
FAIL: nptl/tst-exec5
FAIL: nptl/tst-execstack
FAIL: nptl/tst-exit2
FAIL: nptl/tst-exit3
FAIL: nptl/tst-fini1
FAIL: nptl/tst-join1
FAIL: nptl/tst-join10
FAIL: nptl/tst-join11
FAIL: nptl/tst-join12
FAIL: nptl/tst-join13
FAIL: nptl/tst-join5
FAIL: nptl/tst-join6
FAIL: nptl/tst-join8
FAIL: nptl/tst-join9
FAIL: nptl/tst-key3
FAIL: nptl/tst-minstack-cancel
FAIL: nptl/tst-minstack-exit
FAIL: nptl/tst-minstack-throw
FAIL: nptl/tst-mtx-basic
FAIL: nptl/tst-mtx-timedlock
FAIL: nptl/tst-mtx-trylock
FAIL: nptl/tst-mutex10
FAIL: nptl/tst-mutex8
FAIL: nptl/tst-mutexpi8
FAIL: nptl/tst-once3
FAIL: nptl/tst-once4
FAIL: nptl/tst-oncex3
FAIL: nptl/tst-oncex4
FAIL: nptl/tst-robust1
FAIL: nptl/tst-robust2
FAIL: nptl/tst-robust3
FAIL: nptl/tst-robust4
FAIL: nptl/tst-robust5
FAIL: nptl/tst-robust6
FAIL: nptl/tst-robust7
FAIL: nptl/tst-robustpi1
FAIL: nptl/tst-robustpi2
FAIL: nptl/tst-robustpi3
FAIL: nptl/tst-robustpi4
FAIL: nptl/tst-robustpi5
FAIL: nptl/tst-robustpi6
FAIL: nptl/tst-robustpi7
FAIL: nptl/tst-sem11
FAIL: nptl/tst-sem12
FAIL: nptl/tst-sem16
FAIL: nptl/tst-stack4
FAIL: nptl/tst-thrd-detach
FAIL: nptl/tst-thrd-sleep
FAIL: nptl/tst-thread-exit-clobber
FAIL: nptl/tst-thread_local1
FAIL: nptl/tst-tsd5
FAIL: nptl/tst-tss-basic
FAIL: nptl/tst-unwind-thread
FAIL: nss/tst-cancel-getpwuid_r
FAIL: nss/tst-nss-files-hosts-long
UNSUPPORTED: posix/tst-cet-vfork-1
FAIL: posix/tst-getopt-cancel
UNSUPPORTED: resolv/tst-resolv-ai_idn
UNSUPPORTED: resolv/tst-resolv-ai_idn-latin1
FAIL: rt/tst-cpuclock2
FAIL: rt/tst-mqueue8
FAIL: rt/tst-mqueue8x
FAIL: rt/tst-shm-cancel
FAIL: stdlib/tst-quick_exit
FAIL: stdlib/tst-thread-quick_exit
Summary of test results:
149 FAIL
4202 PASS
16 UNSUPPORTED
17 XFAIL
2 XPASS
Select detailed failed test results
tst-backtrace2
Obtained backtrace with 0 functions Failure on line 44
tst-backtrace3
Obtained backtrace with 0 functions Failure on line 49
dlfcn/bug-atexit3
dlopen failed: libstdc++.so.6: cannot open shared object file: No such file or directory
elf/check-abi-libc
--- ../sysdeps/unix/sysv/linux/x86_64/64/libc.abilist 2021-02-01 12:15:33.000000000 -0500 +++ /home/sandy/Projects/BuildToolchain/Build/libc.symlist 2021-07-12 11:42:58.693499635 -0400 @@ -499 +499 @@ GLIBC_2.2.5 _mcount F -GLIBC_2.2.5 _nl_default_dirname D 0x12 +GLIBC_2.2.5 _nl_default_dirname D 0x39
misc/tst-gettid-kill
Didn't expect signal from child: got `Aborted'
nptl/tst-basic3
starting 20 + 1 threads 20 left Incorrect signal from child: got `Aborted', need `User defined signal 1'
nss/tst-nss-files-hosts-long (This test passes if the
--prefix
commandline option is not used)error: tst-nss-files-hosts-long.c:35: ahostsv4 failed error: 1 test failures
posix/tst-getopt-cancel
begin: no errors Didn't expect signal from child: got `Aborted'
rt/tst-cpuclock2
live thread clock ffffffffff031f26 resolution 0.000000001 live thread before sleep => 0.000115540 self thread before sleep => 0.000294453 live thread after sleep => 0.500264022 self thread after sleep => 0.000336234 Didn't expect signal from child: got `Aborted'
stdlib/tst-quick_exit
(empty)
stdlib/tst-thread-quick_exit
(empty)