Bug#645731: clang uses gcc header files, but cannot handle some of them
Sylvestre Ledru
sylvestre at debian.org
Thu Dec 8 09:12:29 UTC 2011
This is fixed with 3.0-2 (which I uploaded an hour ago)
S
Le jeudi 08 décembre 2011 à 10:04 +0100, Gabriel Corona a écrit :
> Hello,
>
> I guess there is a problem with the include path.
>
> Trying to compile a simple C++ file (using clang 3.0 in unstable) :
>
> $ clang++ -v test.cpp
> Debian clang version 3.0-1 (tags/RELEASE_30/final) (based on LLVM 3.0)
> Target: i386-pc-linux-gnu
> Thread model: posix
> "/usr/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all
> -disable-free -disable-llvm-verifier -main-file-name test.cpp
> -mrelocation-model static -mdisable-fp-elim -masm-verbose
> -mconstructor-aliases -target-cpu pentium4 -target-linker-version
> 2.21.90.20111025 -momit-leaf-frame-pointer -v -resource-dir
> /usr/bin/../lib/clang/3.0 -fmodule-cache-path
> /var/tmp/clang-module-cache -internal-isystem /usr/include/c++/4.6
> -internal-isystem /usr/include/c++/4.6/i486-linux-gnu -internal-isystem
> /usr/include/c++/4.6/backward -internal-isystem /usr/local/include
> -internal-isystem /usr/bin/../lib/clang/3.0/include
> -internal-externc-isystem /usr/include/i486-linux-gnu
> -internal-externc-isystem /usr/include -fdeprecated-macro -ferror-limit
> 19 -fmessage-length 156 -fgnu-runtime -fobjc-runtime-has-arc
> -fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions
> -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test-FtMXsE.o -x
> c++ test.cpp
> clang -cc1 version 3.0 based upon llvm 3.0 hosted on i386-pc-linux-gnu
> ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
> ignoring nonexistent directory "/usr/include/i486-linux-gnu"
> ignoring nonexistent directory "/usr/include/c++/4.6//i486-linux-gnu/32"
> ignoring nonexistent directory "/usr/include/i486-linux-gnu/"
> ignoring nonexistent directory "/usr/bin/../lib/clang/3.0/include"
> ignoring nonexistent directory "/usr/include/i486-linux-gnu"
> ignoring duplicate directory "/usr/include/c++/4.6"
> ignoring duplicate directory "/usr/include/c++/4.6/i486-linux-gnu"
> ignoring duplicate directory "/usr/include/c++/4.6/backward"
> ignoring duplicate directory "/usr/include/c++/4.6"
> ignoring duplicate directory "/usr/include/c++/4.6/backward"
> ignoring duplicate directory "/usr/include/c++/4.6"
> ignoring duplicate directory "/usr/include/c++/4.6/i486-linux-gnu"
> ignoring duplicate directory "/usr/include/c++/4.6/backward"
> ignoring duplicate directory "/usr/local/include"
> ignoring duplicate directory "/usr/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /usr/include/c++/4.6
> /usr/include/c++/4.6/i486-linux-gnu
> /usr/include/c++/4.6/backward
> /usr/local/include
> /usr/include
> /usr/lib/gcc/i486-linux-gnu/4.6/include/
> /usr/lib/gcc/i486-linux-gnu/4.6/include-fixed/
> End of search list.
> In file included from test.cpp:1:
> In file included from /usr/include/stdio.h:28:
> /usr/include/features.h:323:10: fatal error: 'bits/predefs.h' file not found
> #include <bits/predefs.h>
> ^
> 1 error generated.
>
> Notice :
>
> * /usr/bin/../lib/clang/3.0/include, does not exist.
> Instead, I have /usr/include/clang/3.0/include.
> It contains emmintrin.h and friends working with clang.
> I guess they should be used instead of the GCC ones.
> They are in the libclang-dev however which is not required by the clang
> package,
> it probably should.
>
> * /usr/include/i486-linux-gnu does not exist.
> Instead, I have /usr/include/i386-linux-gnu.
>
> Now compiling with :
>
> $ clang++ -c test.cpp -I /usr/include/clang/3.0/include -I
> /usr/include/i386-linux-gnu
>
> Working!
>
More information about the Pkg-llvm-team
mailing list