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

Launchpad Bug Tracker 1799955 at bugs.launchpad.net
Tue Oct 30 15:43:26 UTC 2018


You have been subscribed to a public bug:

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

** Affects: gcc-7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Cannot install multiarch libstdc++-7-dev:armhf and libstdc++-7-dev:amd64 on Ubuntu 18.04
https://bugs.launchpad.net/bugs/1799955
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to gcc-7 in Ubuntu.



More information about the foundations-bugs mailing list