[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt upgrade problem with libgcc4 and libgcc-s4



On 2020-03-09 3:33 p.m., Frank Scheiner wrote:
> 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?
I didn't encounter it but I've had gcc-10 installed for some time.

As Adrian noted, problems like this occur from time to time and should be reported to package
maintainer.  I tended to try to keep things up-to-date as dependencies sometimes disappear...

As you have discovered, the main libraries for gcc on debian are derived from builds using the latest
release.  In this case, that is gcc-10 although technically it hasn't been officially released yet.    Nominally,
gcc-10-base pulls the base dependencies.

There have been some bug fixes in libgcc on hppa but no ABI changes in several years.  So, it's safe
to overwrite it with latest version.

Dave

-- 
John David Anglin  dave.anglin@bell.net



Reply to: