Bug#997804: libstdc++-11-dev: Link error when libtbb-dev is installed
Package: libstdc++-11-dev
Version: 11.2.0-9
Severity: normal
If libtbb-dev is installed (<tbb/tbb.h> is present on the system), any
program using the <execution> header from C++17 or otherwise causing
<pstl/parallel_backend.h> to be included fails to link with this error:
/usr/bin/ld: /tmp/cc8b8juf.o: in function `tbb::interface7::task_arena::current_thread_index()':
foo.cpp:(.text._ZN3tbb10interface710task_arena20current_thread_indexEv[_ZN3tbb10interface710task_arena20current_thread_indexEv]+0x5): undefined reference to `tbb::interface7::internal::task_arena_base::internal_current_slot()'
collect2: error: ld returned 1 exit status
Adding -ltbb makes it succeed, but I would not expect the C++ stdlib to
require explicitly linking additional libraries.
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.11.10-k8 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages libstdc++-11-dev depends on:
ii gcc-11-base 11.2.0-9
ii libc6-dev 2.32-4
ii libgcc-11-dev 11.2.0-9
ii libstdc++6 11.2.0-9
libstdc++-11-dev recommends no packages.
Versions of packages libstdc++-11-dev suggests:
pn libstdc++-11-doc <none>
-- no debconf information
Reply to: