• apt upgrade problem with libgcc4 and libgcc-s4

    From Frank Scheiner@21:1/5 to All on Mon Mar 9 20:50:02 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Frank Scheiner on Mon Mar 9 21:10:04 2020
    Hi Frank!

    Long time no see.

    On 3/9/20 8:33 PM, Frank Scheiner wrote:
    ```
    [...]
    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`.
    (...)
    Did anybody else run into this issue?
    There were some breaking changes in the gcc packages [1]. You can fix this
    with apt with:

    $ apt install -f -o Dpkg::Options::="--force-overwrite" [2]

    Adrian

    [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950525
    [2] https://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Scheiner@21:1/5 to John Paul Adrian Glaubitz on Mon Mar 9 21:40:03 2020
    Hi Adrian,

    On 09.03.20 21:09, John Paul Adrian Glaubitz wrote:
    Hi Frank!

    Long time no see.

    Indeed. Change of interest, but it looks like I finally again gained a
    taste for tinkering with my machinery - at least I hope so... :-)

    On 3/9/20 8:33 PM, Frank Scheiner wrote:
    Did anybody else run into this issue?
    There were some breaking changes in the gcc packages [1]. You can fix this with apt with:

    $ apt install -f -o Dpkg::Options::="--force-overwrite" [2]

    Ah, that's useful. Thanks for the pointers, I'll give them a read.

    Cheers,
    Frank


    Adrian

    [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950525
    [2] https://raphaelhertzog.com/2011/08/01/understanding-dpkgs-file-overwrite-error/

    P.S.
    It's awesome that the hppa port still runs like a clockwork on my c8000
    after more than half a year of downtime. Many thanks to all involved in
    keeping that in shape!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John David Anglin@21:1/5 to Frank Scheiner on Mon Mar 9 22:10:01 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)