Bug#1040844: /usr/bin/clang++: fails to compile due to missing system headers like iostream
Marius Mikucionis
mmikucionis at gmail.com
Tue Jul 11 14:23:33 BST 2023
Package: clang-14
Version: 1:14.0.6-12
Severity: normal
File: /usr/bin/clang++
Dear Maintainer,
* What led up to the situation?
system upgrade (apt update & apt upgrade)
* What exactly did you do (or not do) that was effective (or
ineffective)?
Cannot compile a single C++ program which includes system headers like iostream, vector etc.
For example:
clang++ main.cpp
main.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^~~~~~~~~~
1 error generated.
clang-tidy also fails the same way.
* What outcome did you expect instead?
Compile cleanly.
The problem is that the latest clang-14 depends on libstdc++-13-dev but it is not required, consequently was not installed on my system.
After installing it everything works!
Please add this dependency to clang packages.
Thank you!
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (900, 'testing'), (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-9-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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 clang-14 depends on:
ii binutils 2.40.90.20230705-1
ii libc6 2.37-5
ii libc6-dev 2.37-5
ii libclang-common-14-dev 1:14.0.6-12
ii libclang-cpp14 1:14.0.6-12
ii libclang1-14 1:14.0.6-12
ii libgcc-12-dev 12.3.0-5
ii libgcc-s1 13.1.0-6
ii libllvm14 1:14.0.6-12
ii libobjc-12-dev 12.3.0-5
ii libstdc++-12-dev 12.3.0-5
ii libstdc++6 13.1.0-6
ii llvm-14-linker-tools 1:14.0.6-12
Versions of packages clang-14 recommends:
ii llvm-14-dev 1:14.0.6-12
ii python3 3.11.2-1+b1
Versions of packages clang-14 suggests:
pn clang-14-doc <none>
pn wasi-libc <none>
-- debconf-show failed
More information about the Pkg-llvm-team
mailing list