[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1065359: marked as done (libstdc++-13-dev: missing libstdc++_libbacktrace.a for stacktrace)



Your message dated Sat, 23 Mar 2024 12:52:15 +0000
with message-id <E1ro0r9-0037g6-Is@fasolo.debian.org>
and subject line Bug#1065359: fixed in gcc-13 13.2.0-20
has caused the Debian Bug report #1065359,
regarding libstdc++-13-dev: missing libstdc++_libbacktrace.a for stacktrace
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1065359: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065359
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libstdc++-13-dev
Version: 13.2.0-13
Severity: normal

Dear maintainer,

I'm trying a stacktrace feature from C++23:
g++-13 can compile my program because <stacktrace> is present,
but fails to link with errors:
undefined reference to `__glibcxx_backtrace_create_state'
undefined reference to `__glibcxx_backtrace_pcinfo'
undefined reference to `__glibcxx_backtrace_syminfo'
undefined reference to `__glibcxx_backtrace_simple'

Minimal working example can be found here (from cppreference.com):
https://godbolt.org/z/8zc59Y1Wv

Copy-paste it here:

//g++ -std=c++23 -lstdc++_libbacktrace -O1 -Wall -o bt bt.cpp
#include <stacktrace>
#include <iostream>

int nested_func(int c)
{
    std::cout << std::stacktrace::current() << '\n';
    return c + 1;
}

int func(int b)
{
    return nested_func(b + 1);
}

int main()
{
    std::cout << func(777);
}

I found that libstdc++_libbacktrace.a is absent even though libstdc++-13-dev is installed.

I see that libstdc++-13-dev for other architectures include the support:
lib32stdc++-13-dev: /usr/lib/gcc/x86_64-linux-gnu/13/32/libstdc++_libbacktrace.a
libx32stdc++-13-dev: /usr/lib/gcc/x86_64-linux-gnu/13/x32/libstdc++_libbacktrace.a

But there is no equivalent static library for the default x86_64 (amd64).
It's very strange that 32 and x32 have it (even some GCC cross compilers ship it), but not the default.

Also the supporting C library is already installed:
libgcc-13-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/13/libbacktrace.a

So it seems that most of the hard work (libbacktrace) is done, but the standard C++ part is missing.

I guess the root cause is that --enable-backtrace was not present when building libstdc++-13-dev.
I hope it can be easily fixed by just adding that extra argument to your build scripts.

Thank you for the hard work and best regards,
Marius

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'stable-updates'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.6.15-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libstdc++-13-dev depends on:
ii  gcc-13-base    13.2.0-13
ii  libc6-dev      2.37-15
ii  libgcc-13-dev  13.2.0-13
ii  libstdc++6     14-20240201-3

libstdc++-13-dev recommends no packages.

Versions of packages libstdc++-13-dev suggests:
pn  libstdc++-13-doc  <none>

-- debconf-show failed

--- End Message ---
--- Begin Message ---
Source: gcc-13
Source-Version: 13.2.0-20
Done: Matthias Klose <doko@debian.org>

We believe that the bug you reported is fixed in the latest version of
gcc-13, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1065359@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-13 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 23 Mar 2024 11:38:07 +0100
Source: gcc-13
Architecture: source
Version: 13.2.0-20
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 1065359
Changes:
 gcc-13 (13.2.0-20) unstable; urgency=medium
 .
   * Update to git 20240323 from the gcc-13 branch.
     - Fix PR other/109668, PR tree-optimization/114231,
       PR tree-optimization/112793, PR tree-optimization/113670,
       PR middle-end/113622, PR tree-optimization/114203, PR middle-end/114070,
       PR middle-end/114070, PR tree-optimization/114027, PR debug/112718,
       PR tree-optimization/113910, PR tree-optimization/111736,
       PR tree-optimization/114396, PR target/113950 (PPC),
       PR target/111822 (x86), PR target/114160 (RISCV), PR sanitizer/112709,
       PR sanitizer/112709, PR target/114339 (x86), PR middle-end/113907,
       PR target/114310 (AArch64), PR rtl-optimization/110079,
       PR rtl-optimization/114211, PR target/114184 (x86), PR fortran/114001,
       PR fortran/103715, PR fortran/110826, PR fortran/100988,
       PR fortran/104819, PR libstdc++/66146, PR libstdc++/114316,
       PR libstdc++/114147.
   * Make vhdl known to the PPC backend.
   * Use the proposed patch to fix PR ada/114064, 64bit definitions for
     time_t_bits type on 32bit archs.
   * libsanitizer: Remove crypt and crypt_r interceptors for releases
     with glibc (>= 2.31). Remove the build hacks for crypt.h.
   * libstdc++-dev: Install libstdc++_libbacktrace.a. Note that all Filesystem TS
     and std::stacktrace symbols were added to libstdc++exp.a and GCC 14 stops
     shipping libstdc++_libbacktrace.a. Closes: #1065359.
Checksums-Sha1:
 4b773219fc86abcfb28bcee115c33a08455133f7 39018 gcc-13_13.2.0-20.dsc
 72d4fde5bc4b2a5e7bb701415b7f2e7f8d6b7da8 1912544 gcc-13_13.2.0-20.debian.tar.xz
 aae3b965d3ff405d28cc6a7f39a0e0524c953501 9596 gcc-13_13.2.0-20_source.buildinfo
Checksums-Sha256:
 1a7266b178cf02c0ad6ec92cf0feba059d35670953f1df7c95d41aab146043ad 39018 gcc-13_13.2.0-20.dsc
 cb43954844cce654cfa3a31a10a729f756865328b8d4e6d6178db84c121af578 1912544 gcc-13_13.2.0-20.debian.tar.xz
 89b1d89ef3361bee98bf2eb8d260167ebc5718bf9ed217968f68f9f165704b08 9596 gcc-13_13.2.0-20_source.buildinfo
Files:
 76293aed5306a5d7ef3359dde36b3b2a 39018 devel optional gcc-13_13.2.0-20.dsc
 689c262a241353dbab9f16a26a794948 1912544 devel optional gcc-13_13.2.0-20.debian.tar.xz
 11f2310be9420db0ecd07c7234f22b0d 9596 devel optional gcc-13_13.2.0-20_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmX+yRsQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9eJIEADTdbxuxQCE21SG9ztHYbCD+sXH7SpLEnAu
30D0lWNgaCaLiqwLM7YBXfEdnCFi30qB6RPY/RdMVNhcolHSvvXG/cPb3GJL1As0
GE2Jxl38t9uLVFrw8Vb1qtesEKTazn9okgkHR9Z3dLK5ZznAQWzgi7HkTBldi7Pk
lB7XTJrYDsjFubmlPa358Md2VLm+T6tz7a2ibLkZM5nP1F7X49DeH4RLPinM/L+G
9W0x1itrYWAsErHzS1LAbIjyu5jEIIMMhsbQZ5+uFzETPhyluMIDy5hrgeRkj+5K
XPrmziJXGaCmbX+Ro61GQKGSdiN924dt97VY0ixNyhVfBR1MH5Wawe4Ddsx8EdRt
mpH2+AUWHiSJqvTKQKZRRIBGIB0I7su2qE6T91hqNoNUVwWOpV3sNbrxvQxSZL7X
KzkUOup31p1gTNb1c//Ocg8M7tMuMwiyLEO3MTEbUyhoPKdHNGBK/0qsLkj8FiCe
BDEIFfMFopX//ACIJzPLFIgSiKr0Rk3NRImdqxoCw0MpAcQh66ItWmUPrxpYAaHz
Hm/WvvHywtKpDlLO2mxmL1428/PvUPRcbiEMfZ+zZDaGQcABWFT0LSZqnsU1WUvQ
TuwMFt2oQXnvQwH8e31H2h1ptZntsfSufHKH5e7Xo8a7S/ucuJnEJrdQiWllm2bK
iksKqemPJA==
=kL+B
-----END PGP SIGNATURE-----

Attachment: pgpmJ9ZpQ4qAu.pgp
Description: PGP signature


--- End Message ---

Reply to: