After the work done for bug 7827, cenbuild refused to bootstrap inside the docker-cenbuild container with the following error when building `cendio-build-gcc-x86_64-5.5.0-2':
> /opt/cendio-build/arch/x86_64/usr/lib64/../lib64/libm.so: undefined reference to `__get_cpu_features@GLIBC_PRIVATE'
> collect2: error: ld returned 1 exit status
It is hard to make out in which context the error happens since make has scrambled things up (see attached repo/rpmbuild/build.log).
This happens even after applying the attached patch which attempts to reproduce the last successful Jenkins build #187 (using the same base image, repos, and cenbuild revision). This was using Fedora 35 with Docker version 20.10.12 (and not podman).
Some potential clues:
- The build server was restarted the day after the last successful build for applying updates (though the build server was updated automatically at regular intervals).
- cendio-build-gcc-<arch> builds perfectly fine for all platforms except x86_64.
Perhaps bug 7790 that decided to break this build now for some reason?
I can reproduce this issue in a RHEL 8 VM, so it's not something specific to our container.
The libm referenced is from our glibc, not the system's. And the symbol __get_cpu_features is available in our libc, but not in the system's. So there is some mix of libraries going on here.
Working theory is that this bug has been around forever but was invisible because the symbol used to be available in the system's libc, but it went missing in some recent upgrade.
Theory confirmed. I can see from our build logs that the image used glibc-2.28-101 at the time the builds still worked. If I download that then I can still find the symbol (although in ld-2.28.so rather than libc).
Our next build contained glibc-2.28-189, which has dropped the symbol. The intermediate version 2.28-151 also lacks it.
There is nothing obvious in the change log for this. The closest is this:
> * Mon Jan 04 2021 Florian Weimer <firstname.lastname@example.org> - 2.28-145
> - Update glibc-hwcaps fix from upstream (#1817513)
The current theory is that bug 7790 is the root cause of this. So see that bug for more details.
Fixing bug 7790 did indeed resolve this.
The build system now bootstraps as expected and the changes in bug 7790 looks good. Closing!