Bug 7841 - Cenbuild x86_64 gcc refuses to build inside docker container
Summary: Cenbuild x86_64 gcc refuses to build inside docker container
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Target Milestone: 4.15.0
Assignee: Pierre Ossman
Keywords: prosaic, wilsj_tester
Depends on: 7790
  Show dependency treegraph
Reported: 2022-02-22 13:42 CET by William Sjöblom
Modified: 2022-04-06 12:41 CEST (History)
0 users

See Also:
Acceptance Criteria:


Description William Sjöblom cendio 2022-02-22 13:42:47 CET
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.
Comment 3 Pierre Ossman cendio 2022-02-23 11:20:40 CET
Perhaps bug 7790 that decided to break this build now for some reason?
Comment 4 Pierre Ossman cendio 2022-03-24 16:06:44 CET
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.
Comment 5 Pierre Ossman cendio 2022-03-25 08:59:08 CET
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 <fweimer@redhat.com> - 2.28-145
> - Update glibc-hwcaps fix from upstream (#1817513)
Comment 6 Pierre Ossman cendio 2022-03-25 10:00:01 CET
The current theory is that bug 7790 is the root cause of this. So see that bug for more details.
Comment 7 Pierre Ossman cendio 2022-03-28 14:18:05 CEST
Fixing bug 7790 did indeed resolve this.
Comment 8 William Sjöblom cendio 2022-04-01 15:58:48 CEST
The build system now bootstraps as expected and the changes in bug 7790 looks good. Closing!

Note You need to log in before you can comment on or make changes to this bug.