apt upgrade problem with libgcc4 and libgcc-s4

Frank Scheiner <[email protected]>
Newsgroups gmane.linux.debian.ports.hppa
Message-ID <[email protected]>
Hi all,

I just ran into an issue during upgrading an NFS root FS with Debian Sid
not touched for quite a while:

I originally had gcc-7 and gcc-8 installed and `apt upgrade` gave me the
following list for "NEW packages" to be installed:

```
cpp-9 gcc-10-base gcc-9 gcc-9-base gfortran-9 libapt-pkg6.0 libcbor0
libcrypt-dev libcrypt1 libctf-nobfd0 libctf0
   libdns-export1109 libevent-2.1-7 libffi7 libfido2-1 libgcc-9-dev
libgcc-s4 libgfortran-9-dev libhogweed5 libicu63
   libip4tc2 libip6tc2 libisc-export1105 libisl22 libjson-c4 libnettle7
libnftables1 libperl5.30 libprocps8
   libpython3.8-minimal libpython3.8-stdlib libreadline8
linux-image-5.4.0-4-parisc logsave pci.ids perl-modules-5.30
   python3.8 python3.8-minimal
```

...but during upgrading the packages a problem surfaced:

```
[...]
Unpacking libgcc-s4:hppa (10-20200222-1) ...
dpkg: error processing archive
/var/cache/apt/archives/libgcc-s4_10-20200222-1_hppa.deb (--unpack):
  trying to overwrite '/lib/hppa-linux-gnu/libgcc_s.so.4', which is also
in package libgcc4:hppa 1:8.3.0-3
Errors were encountered while processing:
  /var/cache/apt/archives/libgcc-s4_10-20200222-1_hppa.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
[...]
```

...which I was unable to solve with `apt`.

In the end I could solve it by manually installing libgcc4 from [1]
together with libgcc-s4 from [2] with `dpkg -i [...]`.

[1]:
http://snapshot.debian.org/archive/debian-ports/20200229T090821Z/pool-hppa/main/g/gcc-10/libgcc4_10-20200222-1_hppa.deb

[2]:
http://snapshot.debian.org/archive/debian-ports/20200229T090821Z/pool-hppa/main/g/gcc-10/libgcc-s4_10-20200222-1_hppa.deb

To me it looks like libgcc-s4 is related to gcc-10 and is a dependency
of newer libgcc4 versions related to gcc-10 and if dependencies are
installed earlier then their dependents - which would make sense - this
problem seems to be unsolvable if the originally installed libgcc4
version "shares" files with a dependency of its newer version. Am I
correct here?

OTOH gcc-10 wasn't installed during this upgrade - I only installed it
manually later for a test - so maybe some other package out of:

```
root@c8000:~# apt-cache rdepends --installed libgcc-s4
libgcc-s4
Reverse Depends:
   libgcc-10-dev
   zstd
   libstdc++6
   libgcc4
   libcc1-0
   libapt-pkg6.0
   gcc-10
   apt
   apt-utils
```

...was pulling in libgcc-s4 during the upgrade process (zstd,
libstdc++6, libcc1-0, apt and apt-utils were upgraded in this process,
libapt-pkg6.0 was newly installed). Not sure if that is actually a bug
in the dependencies of one of these packages, as an upgrade seems to not
work for a case like mine then.

Did anybody else run into this issue?

Cheers
Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.