Bug#643959: clang cannot find standard include files

Jeremiah H. Savage jeremiahsavage at gmail.com
Sat Oct 1 20:51:56 UTC 2011


I have the same issue:

Here's the working output with 2.9-12:

$ clang++ -v -c main.cc
clang version 2.9 (tags/RELEASE_29/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -main-file-name
main.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.21.53.20110910 -momit-leaf-frame-pointer -v
-resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19
-fmessage-length 80 -fcxx-exceptions -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o main.o -x c++ main.cc
clang -cc1 version 2.9 based upon llvm 2.9 hosted on x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.6//x86_64-linux-gnu/64"
ignoring nonexistent directory "/usr/include/c++/4.5"
ignoring nonexistent directory "/usr/include/c++/4.5/x86_64-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.5/backward"
ignoring duplicate directory "/usr/include/c++/4.6"
ignoring duplicate directory "/usr/include/c++/4.6//backward"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6//backward
 /usr/include/c++/4.6//x86_64-linux-gnu
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/bin/../lib/clang/2.9/include
 /usr/include
End of search list.



Followed by 2.9-13:


$ clang++ -v -c main.cc
Debian clang version 2.9-13 (tags/RELEASE_29/final) (based on LLVM 2.9)
Target: x86_64-pc-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -main-file-name
main.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-linker-version 2.21.53.20110922 -momit-leaf-frame-pointer -v
-resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19
-fmessage-length 80 -fcxx-exceptions -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o main.o -x c++ main.cc
clang -cc1 version 2.9 based upon llvm 2.9 hosted on x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.6//x86_64-linux-gnu/64"
ignoring nonexistent directory "/usr/include/c++/4.5"
ignoring nonexistent directory "/usr/include/c++/4.5/x86_64-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.5/backward"
ignoring nonexistent directory "/usr/bin/../lib/clang/2.9/include"
ignoring duplicate directory "/usr/include/c++/4.6"
ignoring duplicate directory "/usr/include/c++/4.6//backward"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6//backward
 /usr/include/c++/4.6//x86_64-linux-gnu
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
In file included from main.cc:1:
In file included from /usr/include/c++/4.6/iostream:39:
In file included from /usr/include/c++/4.6/ostream:39:
In file included from /usr/include/c++/4.6/ios:38:
In file included from /usr/include/c++/4.6/iosfwd:41:
In file included from /usr/include/c++/4.6/bits/postypes.h:41:
In file included from /usr/include/c++/4.6/cwchar:45:
/usr/include/wchar.h:40:11: fatal error: 'stdarg.h' file not found
# include <stdarg.h>
          ^
1 error generated.


-- 
Jeremiah





More information about the Pkg-llvm-team mailing list