I'm trying to compile glibc-2.33 on RHEL-7.9
As part of this, I'm using a custom gcc built in house that is deployed down /opt/custom/
I'm able to compile and use tools down the custom path properly until running make check
to check everything out. Make check reports the following:
Summary of test results:
138 FAIL
4090 PASS
57 UNSUPPORTED
16 XFAIL
2 XPASS
Upon inspection of multiple tests, I keep seeing this error message:
libgcc_s.so.1 must be installed for pthread_cancel to work
and upon reviewing how the test itself is called, I was able to determine that the path to the custom gcc location is not being added in to the --library-path
call. Example:
/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/elf/ld-linux-x86-64.so.2 --library-path /disk01/dgardner/rpms/rpms/glibc/SOURCES/build:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/math:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/elf:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/dlfcn:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/nss:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/nis:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/rt:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/resolv:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/mathvec:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/support:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/crypt:/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/nptl /disk01/dgardner/rpms/rpms/glibc/SOURCES/build/nptl/tst-robust1
This errors out.
If I add on to the --library-path
manually with the custom gcc install location, the test works - e.g.
/disk01/dgardner/rpms/rpms/glibc/SOURCES/build/elf/ld-linux-x86-64.so.2 --library-path ${PREVIOUS_FROM_ABOVE}:/opt/custom/lib64 /disk01/dgardner/rpms/rpms/glibc/SOURCES/build/nptl/tst-robust1
I have so far unable to figure out a way to specify this extra library path during tests.
Does anyone know a way to add this custom library path to the --library-path
passed in during "make check"?
I've read through the INSTALL guide & README given with glibc, as well as have played around with some of the environment variables specified in configure to no luck.
I have also read through the glibc FAQ for compiling, also to no luck.
After doing more digging, I was able to find a suitable answer under the glibc release notes wiki for 2.33
Specifically, this snippet:
If the test system does not have suitable copies of libgcc_s.so and libstdc++.so installed in system library directories, it is necessary to copy or symlink them into the build directory before testing (see https://sourceware.org/ml/libc-alpha/2012-04/msg01014.html regarding the use of system library directories here).