Bug#755183: clang-3.4: Uses include paths from libstdc++-4.8-dev but depends on libstdc++-4.9-dev
James McCoy
jamessan at debian.org
Fri Jul 18 15:17:31 UTC 2014
Package: clang-3.4
Version: 1:3.4.2-4
Severity: serious
It seems like the root cause of this might be related to #754963, but I
filed a separate issue just in case it isn't.
As noted in my "System Information" below, clang-3.4 Depends on
libstdc++-4.9-dev, however when trying to compile a C++ file, this
happens:
┌───────────
│$ clang++ -v -o foo foo.cpp
│Debian clang version 3.4.2-4 (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
│Target: i386-pc-linux-gnu
│Thread model: posix
│Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8
│Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8.3
│Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8
│Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8.3
│Selected GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8
│ "/usr/lib/llvm-3.4/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name foo.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -target-linker-version 2.24.51.20140617 -v -resource-dir /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2 -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++ -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/i486-linux-gnu -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/backward -internal-isystem /usr/include/clang/3.4.2/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2/include -internal-externc-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/include -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/mccoyj1 -ferror-limit 19 -fmessage-length 113 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/foo-50315f.o -x c++ foo.cpp
│clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target i386-pc-linux-gnu
│ignoring nonexistent directory "/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/i486-linux-gnu"
│ignoring nonexistent directory "/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/backward"
│ignoring nonexistent directory "/include"
│ignoring duplicate directory "/usr/include/clang/3.4.2/include"
│#include "..." search starts here:
│#include <...> search starts here:
│ /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++
│ /usr/include/clang/3.4.2/include
│ /usr/local/include
│ /usr/bin/../lib/gcc/i486-linux-gnu/4.8/include
│ /usr/include/i386-linux-gnu
│ /usr/include
│End of search list.
│foo.cpp:1:10: fatal error: 'algorithm' file not found
│#include <algorithm>
│ ^
│1 error generated.
│$
└───────────
That is, it's only looking for GCC 4.8 paths when it Depends on GCC 4.9
packages. Installing libstdc++-4.8-dev causes the compile to succeed.
┌───────────
│$ clang++ -v -o foo foo.cpp
│Debian clang version 3.4.2-4 (tags/RELEASE_34/dot2-final) (based on LLVM 3.4.2)
│Target: i386-pc-linux-gnu
│Thread model: posix
│Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8
│Found candidate GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8.3
│Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8
│Found candidate GCC installation: /usr/lib/gcc/i486-linux-gnu/4.8.3
│Selected GCC installation: /usr/bin/../lib/gcc/i486-linux-gnu/4.8
│ "/usr/lib/llvm-3.4/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name foo.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -target-linker-version 2.24.51.20140617 -v -resource-dir /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2 -internal-isystem /usr/include//c++/4.8 -internal-isystem /usr/include//c++/4.8/i386-linux-gnu -internal-isystem /usr/include//c++/4.8/backward -internal-isystem /usr/include//i386-linux-gnu/c++/4.8 -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/4.8/i486-linux-gnu -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/i486-linux-gnu/c++/4.8 -internal-isystem /usr/include/clang/3.4.2/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.4/bin/../lib/clang/3.4.2/include -internal-externc-isystem /usr/bin/../lib/gcc/i486-linux-gnu/4.8/include -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/mccoyj1 -ferror-limit 19 -fmessage-length 113 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/foo-3b4ac3.o -x c++ foo.cpp
│clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target i386-pc-linux-gnu
│ignoring nonexistent directory "/usr/include//c++/4.8/i386-linux-gnu"
│ignoring nonexistent directory "/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/c++/4.8/i486-linux-gnu"
│ignoring nonexistent directory "/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../../include/i486-linux-gnu/c++/4.8"
│ignoring nonexistent directory "/include"
│ignoring duplicate directory "/usr/include//c++/4.8"
│ignoring duplicate directory "/usr/include//c++/4.8/backward"
│ignoring duplicate directory "/usr/include/clang/3.4.2/include"
│#include "..." search starts here:
│#include <...> search starts here:
│ /usr/include//c++/4.8
│ /usr/include//c++/4.8/backward
│ /usr/include//i386-linux-gnu/c++/4.8
│ /usr/include/clang/3.4.2/include
│ /usr/local/include
│ /usr/bin/../lib/gcc/i486-linux-gnu/4.8/include
│ /usr/include/i386-linux-gnu
│ /usr/include
│End of search list.
│ "/usr/bin/ld" --hash-style=both --build-id --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o foo /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/bin/../lib/gcc/i486-linux-gnu/4.8/crtbegin.o -L/usr/bin/../lib/gcc/i486-linux-gnu/4.8 -L/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu -L/usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../.. -L/lib -L/usr/lib /tmp/foo-3b4ac3.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/i486-linux-gnu/4.8/crtend.o /usr/bin/../lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o
│$
└───────────
Cheers,
James
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.14-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages clang-3.4 depends on:
ii libc6 2.19-7
ii libc6-dev 2.19-7
ii libclang-common-3.4-dev 1:3.4.2-4
ii libclang1-3.4 1:3.4.2-4
ii libffi6 3.1-2
ii libgcc-4.9-dev 4.9.1-1
ii libgcc1 1:4.9.1-1
ii libllvm3.4 1:3.4.2-4
ii libobjc-4.9-dev 4.9.1-1
ii libstdc++-4.9-dev 4.9.1-1
ii libstdc++6 4.9.1-1
ii libtinfo5 5.9+20140118-1
Versions of packages clang-3.4 recommends:
ii llvm-3.4-dev 1:3.4.2-4
ii python 2.7.8-1
Versions of packages clang-3.4 suggests:
pn gnustep <none>
pn gnustep-devel <none>
-- no debconf information
More information about the Pkg-llvm-team
mailing list