Bug#896017: "/usr/bin/ld: cannot find -lstdc++" when building with clang
Drew Parsons
dparsons at debian.org
Sun Feb 18 11:34:56 GMT 2024
Package: clang
Version: 1:16.0-57
Followup-For: Bug #896017
This bug is live again.
Tests of xtensor-blas report:
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ - broken
CMake Error at /usr/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/tmp/autopkgtest.BxR3Rk/autopkgtest_tmp/build/CMakeFiles/CMakeScratch/TryCompile-lvLS21'
Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_b5980/fast
/usr/bin/gmake -f CMakeFiles/cmTC_b5980.dir/build.make CMakeFiles/cmTC_b5980.dir/build
gmake[1]: Entering directory '/tmp/autopkgtest.BxR3Rk/autopkgtest_tmp/build/CMakeFiles/CMakeScratch/TryCompile-lvLS21'
Building CXX object CMakeFiles/cmTC_b5980.dir/testCXXCompiler.cxx.o
/usr/bin/clang++ -MD -MT CMakeFiles/cmTC_b5980.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_b5980.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_b5980.dir/testCXXCompiler.cxx.o -c /tmp/autopkgtest.BxR3Rk/autopkgtest_tmp/build/CMakeFiles/CMakeScratch/TryCompile-lvLS21/testCXXCompiler.cxx
Linking CXX executable cmTC_b5980
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b5980.dir/link.txt --verbose=1
/usr/bin/clang++ CMakeFiles/cmTC_b5980.dir/testCXXCompiler.cxx.o -o cmTC_b5980
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_b5980.dir/build.make:100: cmTC_b5980] Error 1
gmake[1]: Leaving directory '/tmp/autopkgtest.BxR3Rk/autopkgtest_tmp/build/CMakeFiles/CMakeScratch/TryCompile-lvLS21'
gmake: *** [Makefile:127: cmTC_b5980/fast] Error 2
The test passes if libstdc++-14-dev is installed. Does it mean clang
has been misbuilt against stdc++-14? Or should the stdc++
dependencies of the clang package be updated?
-- System Information:
Debian Release: trixie/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.6.15-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages clang depends on:
ii clang-16 1:16.0.6-19
clang recommends no packages.
clang suggests no packages.
-- no debconf information
More information about the Pkg-llvm-team
mailing list