[cfe-dev] fatal error: 'stdarg.h' file not found

Jordan Rose jordan_rose at apple.com
Fri Mar 7 09:43:46 PST 2014


On Mar 7, 2014, at 4:28 , Pedro Delgado Perez <pedro.delgadoperez at mail.uca.es> wrote:

> Hi,
> 
> I think I have a problem with my Clang installation. I know that this problem is not new, but I don't know how can I solve it in spite of reading some forums with the same issue. When I run my tool, I got the following error:
> 
> ...
> In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/string:42:
> In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/char_traits.h:42:
> In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/postypes.h:42:
> In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/cwchar:46:
> /usr/include/wchar.h:40:11: fatal error: 'stdarg.h' file not found
> # include <stdarg.h>
> ...
> 
> Clang is not searching in "/usr/local/lib/clang/3.4/include", where, for instance, the library "stdarg.h" is located. This is the result when executing "clang++ -v":
> 
> clang version 3.4 (192773)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6
> Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6.3
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
> Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3
> Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
> 
> 
> Therefore, the directory of clang is not being search isn't it?. Does anybody know how can I solve this problem in an easy way? I have no broad knowledge of Clang.
> 
> Thanks in advance,
> 
> Pedro.
> 
> 

Just to sanity check, is your tool in /usr/local/bin? Clang looks for these headers relative to the location of the binary.

Also, between the 3.4 and 3.5 releases, the headers moved to ../include/clang/3.x/include/, instead of lib/clang/... Maybe you picked up that commit by mistake?

Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140307/01f9a9e3/attachment.html>


More information about the cfe-dev mailing list