[Bug 1799955] Re: Cannot install multiarch libstdc++-7-dev:armhf and libstdc++-7-dev:amd64 on Ubuntu 18.04

Matthias Klose doko at ubuntu.com
Tue Oct 30 16:09:17 UTC 2018


** Changed in: gcc-7 (Ubuntu)
       Status: New => Confirmed

** Also affects: gcc-7 (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: gcc-7 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1799955

Title:
  Cannot install multiarch libstdc++-7-dev:armhf and
  libstdc++-7-dev:amd64 on Ubuntu 18.04

Status in gcc-7 package in Ubuntu:
  Confirmed
Status in gcc-7 source package in Bionic:
  New
Status in gcc-7 source package in Cosmic:
  New

Bug description:
  The Ubuntu packages of libstdc++-7-dev:amd64 and libstdc++-7-dev:armhf
  do not correctly co-install due to a differing shared file in
  /usr/include/c++/7/ext/random. This issue is not present in Debian
  stable or unstable as far as I can tell, nor is it in Ubuntu 16.04.

  The error is:

  dpkg: error processing archive /tmp/apt-dpkg-install-8t5R5l/13-libstdc++-7-dev_7.3.0-27ubuntu1~18.04_armhf.deb (--unpack):
   trying to overwrite shared '/usr/include/c++/7/ext/random', which is different from other instances of package libstdc++-7-dev:armhf
  dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
  Errors were encountered while processing:
   /tmp/apt-dpkg-install-8t5R5l/13-libstdc++-7-dev_7.3.0-27ubuntu1~18.04_armhf.deb

  To reproduce:

  docker run -it ubuntu:bionic /bin/bash
  apt update && apt install clang libstdc++-7-dev-armhf-cross
  echo -e "#include <string>\nint main() { std::string a; }" > test.cpp
  dpkg --add-architecture armhf
  sed -i 's/deb /deb [arch=amd64] /' /etc/apt/sources.list && egrep "^deb " /etc/apt/sources.list | sed 's/amd64/armhf/' | sed 's|http://.*.ubuntu.com/ubuntu/|http://ports.ubuntu.com/|' >> /etc/apt/sources.list

  apt update && apt install libstdc++-7-dev:armhf

  # here is the bug
  dpkg: error processing archive /tmp/apt-dpkg-install-8t5R5l/13-libstdc++-7-dev_7.3.0-27ubuntu1~18.04_armhf.deb (--unpack):
   trying to overwrite shared '/usr/include/c++/7/ext/random', which is different from other instances of package libstdc++-7-dev:armhf
  dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
  Errors were encountered while processing:
   /tmp/apt-dpkg-install-8t5R5l/13-libstdc++-7-dev_7.3.0-27ubuntu1~18.04_armhf.deb

  # manually removing "random" allows package to install
  rm /usr/include/c++/7/ext/random
  apt -f install

  clang++ -target arm-linux-gnueabihf test.cpp
  # WORKS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1799955/+subscriptions



More information about the foundations-bugs mailing list