Package: libstdc++-12-dev Version: 12.2.0-14+rpi1 Severity: important X-Debbugs-Cc: debian-...@lists.debian.org User: debian-...@lists.debian.org Usertags: armhf
The _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY setting differs between Debian and Raspberry Pi OS, causing programs cross-compiled for Debian Bookworm armhf to appear to run on Rasbperry Pi OS Bookworm armhf, then later crash for no obvious reason. For details, see the (now closed) upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119627 I'm not sure whether the Debian or Raspberry Pi OS version is correct, but the Debian GCC Maintainers are listed as the maintainer for both, so either way I assume this is the right place to report this issue. # STEPS TO REPLICATE 1. Download and extract Debian's libstdc++-12-dev and libstdc++-12-dev-armhf- cross, plus Raspberry Pi OS's libstdc++-12-dev: wget 'http://ftp.debian.org/debian/pool/main/g/gcc-12/libstdc++-12-dev_12.2.0-14_armhf.deb' \ 'http://ftp.debian.org/debian/pool/main/g/gcc-12-cross/libstdc++-12-dev- armhf-cross_12.2.0-14cross1_all.deb' \ 'http://raspbian.raspberrypi.com/raspbian/pool/main/g/gcc-12/libstdc++-12-dev_12.2.0-14+rpi1_armhf.deb' dpkg -x libstdc++-12-dev_12.2.0-14_armhf.deb main dpkg -x libstdc++-12-dev-armhf-cross_12.2.0-14cross1_all.deb cross dpkg -x libstdc++-12-dev_12.2.0-14+rpi1_armhf.deb rpi 2. Observe the value for _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY in all three packages: grep _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY \ main/usr/include/arm-linux-gnueabihf/c++/12/bits/c++config.h \ cross/usr/arm-linux-gnueabihf/include/c++/12/arm-linux- gnueabihf/bits/c++config.h \ rpi/usr/include/arm-linux-gnueabihf/c++/12/bits/c++config.h Expected: The Raspberry Pi value is the same as the armhf cross-compile version. Observed: main/usr/include/arm-linux-gnueabihf/c++/12/bits/c++config.h:#define _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY 1 cross/usr/arm-linux-gnueabihf/include/c++/12/arm-linux- gnueabihf/bits/c++config.h:#define _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY 1 rpi/usr/include/arm-linux-gnueabihf/c++/12/bits/c++config.h:/* #undef _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY */ -- System Information: Debian Release: trixie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.12.17-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libstdc++-12-dev depends on: ii gcc-12-base 12.4.0-5 ii libc6-dev 2.41-6 ii libgcc-12-dev 12.4.0-5 ii libstdc++6 14.2.0-19 libstdc++-12-dev recommends no packages. Versions of packages libstdc++-12-dev suggests: pn libstdc++-12-doc <none>