Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/util: ldd lists files not accessible in scratch container
Starting in glibc 2.33, new hwcaps functionality was added which allows the dynamic linker to load optimized versions of libraries within a new "glibc-hwcaps" directory in the library search path. The crio and podman tests use `ldd` to get a list of the shared libraries dependencies and copies them into a scratch container. On power9, some of the libraries are symlinked to versioned filenames of the optimized libraries. This is problematic inside the scratch container because the binaries are looking for the non-versioned library name but cannot find it. For example a snippet of `ldd /usr/bin/ping` shows: ``` libm.so.6 => /lib64/glibc-hwcaps/power9/libm-2.28.so ``` When the scratch container runs, it cannot find libm.so.6 because only libm-2.28.so is copied into the scratch container. I found the removing /etc/ld.so.cache corrects the `ldd` output to have the same filename as the shared library name allowing the scratch container to find the shared libraries. `ldd` output after deleting the cache: ``` libm.so.6 => /lib64/glibc-hwcaps/power9/libm.so.6 ``` This has probably been an issue for a bit now but we were not building on power9.
- Loading branch information