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

Bug #1799955 reported by toby schneider
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-7 (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned

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

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi,

These packages are official Ubuntu packages [1], they are not from the PPA provided by this team. You should report the issue against the gcc-7 package [2] Ubuntu package.

[1] https://launchpad.net/ubuntu/+source/gcc-7/7.3.0-27ubuntu1~18.04
[2] https://launchpad.net/ubuntu/+source/gcc-7

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Packages mentioned in the bug description comes from official Ubuntu gcc-7 source package. Reassigning there.

affects: gcc-arm-embedded → gcc-7 (Ubuntu)
Revision history for this message
Matthias Klose (doko) wrote :

please attach the diff for that file

Revision history for this message
Matthias Klose (doko) wrote :

ahh, that's a diff from the linaro branch

Matthias Klose (doko)
Changed in gcc-7 (Ubuntu):
status: New → Confirmed
Revision history for this message
toby schneider (tes) wrote :

--- random-amd64 2018-10-30 16:08:18.195414933 +0000
+++ random-armhf 2018-10-30 16:08:58.225789786 +0000
@@ -184,6 +184,11 @@
 #ifdef __SSE2__
  __m128i _M_state[_M_nstate];
 #endif
+#ifdef __ARM_NEON
+#ifdef __aarch64__
+ __Uint32x4_t _M_state[_M_nstate];
+#endif
+#endif
  uint32_t _M_state32[_M_nstate32];
  result_type _M_stateT[state_size];
       } __attribute__ ((__aligned__ (16)));

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-7 - 7.3.0-30ubuntu1

---------------
gcc-7 (7.3.0-30ubuntu1) disco; urgency=medium

  * Backport the libstdc++ mersenne twister optimization for AArch64, so that
    the random header is the same on all architectures (Ubuntu only).
    LP: #1799955.

gcc-7 (7.3.0-30) unstable; urgency=medium

  * Update to SVN 20181030 (r265622) from the gcc-7-branch.
    - Fix PR middle-end/86542, PR middle-end/86539, PR middle-end/86660,
      PR libstdc++/87749, PR libstdc++/87704, PR libstdc++/79433,
      PR libstdc++/87641, PR libstdc++/86751, PR libstdc++/78595,
      PR libstdc++/87061, PR libstdc++/70966, PR libstdc++/77854,
      PR libstdc++/87538, PR tree-optimization/87473, PR middle-end/87623,
      PR target/87511 (AArch64), PR target/87550 (x86), PR middle-end/87248,
      PR rtl-optimization/87065, PR middle-end/86627, PR middle-end/86542,
      PR middle-end/86539, PR middle-end/86660, PR middle-end/87024,
      PR middle-end/86505, PR target/87370 (x86), PR target/87517 (x86),
      PR target/87522 (x86), PR other/87353, PR target/87467 (x86),
      PR target/87033 (PPC), PR debug/86687, PR c++/3698, PR c++/86208,
      PR fortran/86421.
  * Don't configure native builds with --with-sysroot. Apparently this cannot
    be completely overridden with the command line option --sysroot.
  * Update VCS attributes in the control file.

gcc-7 (7.3.0-29) unstable; urgency=medium

  * Update to SVN 20180904 (r264075) from the gcc-7-branch.
    - Fix PR sanitizer/86022, PR tree-optimization/85859, PR target/86662,
      PR target/87014 (x86), PR c++/86763.

 -- Matthias Klose <email address hidden> Tue, 04 Sep 2018 17:28:42 +0200

Changed in gcc-7 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello toby, or anyone else affected,

Accepted gcc-7 into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-7/7.4.0-1ubuntu1~18.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-7 (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello toby, or anyone else affected,

Accepted gcc-7 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-7/7.4.0-1ubuntu1~18.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-7 (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (10.0 KiB)

This bug was fixed in the package gcc-7 - 7.4.0-1ubuntu1~18.10

---------------
gcc-7 (7.4.0-1ubuntu1~18.10) cosmic-proposed; urgency=medium

  * SRU: LP: #1814369.
  * Fix target/88856, taken from the gcc-7-branch. LP: #1815057.
  * Fix PR tree-optimization/89505, taken from the gcc-8 branch.

gcc-7 (7.4.0-1ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-7 (7.4.0-1) unstable; urgency=medium

  * GCC 7.4.0 release.
  * Back-out the gcc-search-prefixed-as-ld patch. See #915194.

gcc-7 (7.3.0-31ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-7 (7.3.0-31) unstable; urgency=medium

  * GCC 7.4.0 release candidate 1.
  * Update to SVN 20181129 (r266612) from the gcc-7-branch.
    - Fix PR libstdc++/88199, PR libstdc++/87822, PR tree-optimization/79351,
      PR bootstrap/81033, PR target/81733, PR target/52795,
      PR middle-end/87645, PR middle-end/87610, PR tree-optimization/87665,
      PR tree-optimization/87745, PR tree-optimization/87665,
      PR middle-end/86139, PR middle-end/86076, PR target/88051 (x86),
      PR target/82961, PR target/87867 (ARM), PR tree-optimization/84777,
      PR rtl-optimization/84003, PR target/87853 (x86), PR target/87928 (x86),
      PR rtl-optimization/85925, PR debug/88006, PR debug/87462,
      PR middle-end/58372, PR c++/84281, PR c++/87075, PR fortran/88073,
      PR fortran/88143, PR fortran/87597.
  * Backport the libstdc++ mersenne twister optimization for AArch64, so that
    the random header is the same on all architectures (Ubuntu only).
    LP: #1799955.
  * Fix VCS attribute in the control file. Addresses: #912405.

gcc-7 (7.3.0-30ubuntu1) disco; urgency=medium

  * Backport the libstdc++ mersenne twister optimization for AArch64, so that
    the random header is the same on all architectures (Ubuntu only).
    LP: #1799955.

gcc-7 (7.3.0-30) unstable; urgency=medium

  * Update to SVN 20181030 (r265622) from the gcc-7-branch.
    - Fix PR middle-end/86542, PR middle-end/86539, PR middle-end/86660,
      PR libstdc++/87749, PR libstdc++/87704, PR libstdc++/79433,
      PR libstdc++/87641, PR libstdc++/86751, PR libstdc++/78595,
      PR libstdc++/87061, PR libstdc++/70966, PR libstdc++/77854,
      PR libstdc++/87538, PR tree-optimization/87473, PR middle-end/87623,
      PR target/87511 (AArch64), PR target/87550 (x86), PR middle-end/87248,
      PR rtl-optimization/87065, PR middle-end/86627, PR middle-end/86542,
      PR middle-end/86539, PR middle-end/86660, PR middle-end/87024,
      PR middle-end/86505, PR target/87370 (x86), PR target/87517 (x86),
      PR target/87522 (x86), PR other/87353, PR target/87467 (x86),
      PR target/87033 (PPC), PR debug/86687, PR c++/3698, PR c++/86208,
      PR fortran/86421.
  * Don't configure native builds with --with-sysroot. Apparently this cannot
    be completely overridden with the command line option --sysroot.
  * Update VCS attributes in the control file.

gcc-7 (7.3.0-29) unstable; urgency=medium

  * Update to SVN 20180904 (r264075) from the gcc-7-branch.
    - Fix PR sanitizer/86022, PR tree-optimization/85859, P...

Changed in gcc-7 (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.2 KiB)

This bug was fixed in the package gcc-7 - 7.4.0-1ubuntu1~18.04

---------------
gcc-7 (7.4.0-1ubuntu1~18.04) bionic-proposed; urgency=medium

  * SRU: LP: #1814369.
  * Fix target/88856, taken from the gcc-7-branch. LP: #1815057.
  * Fix PR tree-optimization/89505, taken from the gcc-8 branch.

gcc-7 (7.4.0-1ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-7 (7.4.0-1) unstable; urgency=medium

  * GCC 7.4.0 release.
  * Back-out the gcc-search-prefixed-as-ld patch. See #915194.

gcc-7 (7.3.0-31ubuntu1) disco; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-7 (7.3.0-31) unstable; urgency=medium

  * GCC 7.4.0 release candidate 1.
  * Update to SVN 20181129 (r266612) from the gcc-7-branch.
    - Fix PR libstdc++/88199, PR libstdc++/87822, PR tree-optimization/79351,
      PR bootstrap/81033, PR target/81733, PR target/52795,
      PR middle-end/87645, PR middle-end/87610, PR tree-optimization/87665,
      PR tree-optimization/87745, PR tree-optimization/87665,
      PR middle-end/86139, PR middle-end/86076, PR target/88051 (x86),
      PR target/82961, PR target/87867 (ARM), PR tree-optimization/84777,
      PR rtl-optimization/84003, PR target/87853 (x86), PR target/87928 (x86),
      PR rtl-optimization/85925, PR debug/88006, PR debug/87462,
      PR middle-end/58372, PR c++/84281, PR c++/87075, PR fortran/88073,
      PR fortran/88143, PR fortran/87597.
  * Backport the libstdc++ mersenne twister optimization for AArch64, so that
    the random header is the same on all architectures (Ubuntu only).
    LP: #1799955.
  * Fix VCS attribute in the control file. Addresses: #912405.

gcc-7 (7.3.0-30ubuntu1) disco; urgency=medium

  * Backport the libstdc++ mersenne twister optimization for AArch64, so that
    the random header is the same on all architectures (Ubuntu only).
    LP: #1799955.

gcc-7 (7.3.0-30) unstable; urgency=medium

  * Update to SVN 20181030 (r265622) from the gcc-7-branch.
    - Fix PR middle-end/86542, PR middle-end/86539, PR middle-end/86660,
      PR libstdc++/87749, PR libstdc++/87704, PR libstdc++/79433,
      PR libstdc++/87641, PR libstdc++/86751, PR libstdc++/78595,
      PR libstdc++/87061, PR libstdc++/70966, PR libstdc++/77854,
      PR libstdc++/87538, PR tree-optimization/87473, PR middle-end/87623,
      PR target/87511 (AArch64), PR target/87550 (x86), PR middle-end/87248,
      PR rtl-optimization/87065, PR middle-end/86627, PR middle-end/86542,
      PR middle-end/86539, PR middle-end/86660, PR middle-end/87024,
      PR middle-end/86505, PR target/87370 (x86), PR target/87517 (x86),
      PR target/87522 (x86), PR other/87353, PR target/87467 (x86),
      PR target/87033 (PPC), PR debug/86687, PR c++/3698, PR c++/86208,
      PR fortran/86421.
  * Don't configure native builds with --with-sysroot. Apparently this cannot
    be completely overridden with the command line option --sysroot.
  * Update VCS attributes in the control file.

gcc-7 (7.3.0-29) unstable; urgency=medium

  * Update to SVN 20180904 (r264075) from the gcc-7-branch.
    - Fix PR sanitizer/86022, PR tree-optimization/85859, P...

Read more...

Changed in gcc-7 (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.