GCC-10 library conflict on s390x

Bug #1872854 reported by Otto Kekäläinen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-10 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The upload

  gcc-10 10-20200405-0ubuntu1~18.04 Matthias Klose (2020-04-06)

to

  https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

Seems to have rendered certain combinations of GCC uninstallable on s390x. This is a test PPA yes, but it happens to be one of the default ones on Travis-CI so it matters.

Example scenario:

root@d5ba67a84ccb:/# apt-get install libgcc-7-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libcc1-0 libgcc-s1
The following NEW packages will be installed:
  libgcc-7-dev
0 upgraded, 1 newly installed, 2 to remove and 12 not upgraded.
Need to get 641 kB of archives.
After this operation, 5158 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main s390x libgcc-7-dev s390x 7.5.0-3ubuntu1~18.04 [641 kB]
Fetched 641 kB in 6s (110 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 10706 files and directories currently installed.)
Removing libcc1-0:s390x (10-20200405-0ubuntu1~18.04) ...
Removing libgcc-s1:s390x (10-20200405-0ubuntu1~18.04) ...
Selecting previously unselected package libgcc-7-dev:s390x.
(Reading database ... 10700 files and directories currently installed.)
Preparing to unpack .../libgcc-7-dev_7.5.0-3ubuntu1~18.04_s390x.deb ...
Unpacking libgcc-7-dev:s390x (7.5.0-3ubuntu1~18.04) ...
Setting up libgcc-7-dev:s390x (7.5.0-3ubuntu1~18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@d5ba67a84ccb:/# apt-get install gcc-7
/usr/bin/apt-get: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory

Revision history for this message
Steve Langasek (vorlon) wrote :

What do you mean, "one of the default ones on Travis-CI"? Travis-CI should not be enabling ANY ppas by default as part of an Ubuntu base.

Revision history for this message
Daniel Black (daniel-black) wrote :

Not enabled by default, but whitelisted https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json#L557 and one of the easiest ways to run CI on multiple gcc compiler versions, and architectures since fairly recently (https://docs.travis-ci.com/user/multi-cpu-architectures/).

Revision history for this message
Otto Kekäläinen (otto) wrote :

Sorry for sloppy bug report. Here are exact steps to reproduce on a Ubuntu 18.04 host (arch amd64) running s390x in a Docker container. The bug is not repeatable on amd64 since the s390x packages available on Bionic is slightly different.

# Install s390x emulators
sudo apt install qemu-user-static qemu-system-s390x

# Enable experimental mode in Docker
cat /etc/docker/daemon.json
{
"experimental": true
}
sudo systemctl restart docker

# Pull s390x Bionic
docker pull --platform linux/s390x ubuntu:bionic

# Prepare and build container
mkdir s390x; cd s390x
cp /usr/bin/qemu-s390x-static .
cat Dockerfile
FROM ubuntu:bionic
COPY ./qemu-s390x-static /usr/bin/qemu-s390x-static
RUN uname -a
RUN apt-get update -y && \
    apt-get install --yes --no-install-suggests --no-install-recommends software-properties-common curl gpg gpg-agent dirmngr ca-certificates && \
    echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main' >> /etc/apt/sources.list.d/toolchain.list && \
    apt-key adv --keyserver keyserver.ubuntu.com --recv 60C317803A41BA51845E371A1E9377A2BA9EF27F && \
    apt-get update -y
RUN apt-get --no-install-suggests --no-install-recommends install clang-7 clang-8 g++-5 g++-7 g++-8 g++-9

# Run
docker build --tag ubuntu:bionic-s390x .

# Result
Step 3/3 : RUN apt-get --no-install-suggests --no-install-recommends install clang-7 clang-8 g++-5 g++-7 g++-8 g++-9
 ---> Running in c3bd447b3aad
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 clang-7 : Depends: libstdc++-7-dev but it is not going to be installed
           Depends: libgcc-7-dev but it is not going to be installed
           Depends: libobjc-7-dev but it is not going to be installed
 clang-8 : Depends: libstdc++-7-dev but it is not going to be installed
           Depends: libgcc-7-dev but it is not going to be installed
           Depends: libobjc-7-dev but it is not going to be installed
 g++-7 : Depends: gcc-7 (= 7.5.0-3ubuntu1~18.04) but it is not going to be installed
         Depends: libstdc++-7-dev (= 7.5.0-3ubuntu1~18.04) but it is not going to be installed
 g++-9 : Depends: gcc-9 (= 9.2.1-17ubuntu1~18.04.1) but it is not going to be installed
         Depends: libstdc++-9-dev (= 9.2.1-17ubuntu1~18.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Revision history for this message
Otto Kekäläinen (otto) wrote :

Switching to the PPA ppa:ubuntu-toolchain-r/ppa fixes this for Bionic, since there is no gcc-10 there and this issue does not occur. That repo does however not contain GCC-9 for Xenial, and most of Travis-CI jobs still run on Xenial (their default distro at the moment), so recommending everybody to switch to the ppa:ubuntu-toolchain-r/ppa is not a full solution.

I think this bug report should however be kept open as a note for gcc-10 packagers, who might want to study this conflict on s390x.

Revision history for this message
Otto Kekäläinen (otto) wrote :

Seems this libcc1-0 binary package was built from the gcc-9 source package and it worked fine. With the introduction of gcc-10 into the PPA there was a new provider for this binary package and thus it stopped working.

Revision history for this message
Matthias Klose (doko) wrote :

I can't see yet, why this is only seen on s390x. the libgcc1 built from gcc-10 depends on
Depends: gcc-10-base (= 10-20200405-0ubuntu1~18.04), libgcc-s1 (>= 10-20200405-0ubuntu1~18.04), libc6
(>= 2.14)

Revision history for this message
Matthias Klose (doko) wrote :

I see what's going wrong. preparing an update for the PPA

Revision history for this message
Otto Kekäläinen (otto) wrote :

Yes, it is a pain sometimes to track down those apt errors since apt does not automatically resolve those dependency chains and clearly print out which breaks/replace/provides/depends it chokes on.

However there is a testcase Dockerfile and the same file run on amd64 does not yield the issue.

The Travis-CI pipeline we were running was fine until around beginning of April which matches the upload time of gcc-10 to the ubuntu-toolchain-r/test PPA.

Note that since http://ports.ubuntu.com/ubuntu-ports/ is by default enabled in Travis-CI and in official Bionic s390x images, they might also play some interaction here. But definitely everything worked in March and then in April CI that was running the same thing all of the time stopped working as described in this issue.

Right now I am working to upload separate gcc-7 and gcc-9 to custom PPA and use it instead of the toolchain test repo in the future (https://launchpad.net/~maria-captains/+archive/ubuntu/travis-ci-helper-repo/).

Revision history for this message
Otto Kekäläinen (otto) wrote :

> I see what's going wrong. preparing an update for the PPA

Ok, good!

Revision history for this message
Matthias Klose (doko) wrote :

now fixed

Changed in gcc-10 (Ubuntu):
status: New → Fix Released
Revision history for this message
Otto Kekäläinen (otto) wrote : Re: [Bug 1872854] Re: GCC-10 library conflict on s390x

I confirm this upload fixed it. Thanks!

Change:

+gcc-10 (10-20200416-0ubuntu1) focal; urgency=medium
+
+ * GCC snapshot, taken from the trunk (20200416, 44b326839d8).
+ * libgcc-sN: Don't add the libgcc-N-dev breaks for backports.
+
+ -- Matthias Klose <email address hidden> Thu, 16 Apr 2020 17:36:04 +0200

New build passes: https://travis-ci.org/github/ottok/mariadb/builds/676100296

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.