Bug#671913: clang: cannot find standard header files

Vincent Legout vincent at legout.info
Tue May 8 16:44:14 UTC 2012


Hi Miles,

Miles Bader <miles at gnu.org> writes:

> Package: clang
> Version: 3.1~+rc1-1
> Severity: important
>
>
>    $ cat hw.c
>    #include <stdio.h>
>
>    int main ()
>    {
>      printf ("hello world\n");
>      return 0;
>    }
>    $ env - PATH=/usr/bin:/bin gcc -o hw hw.c
>    $ ./hw
>    hello world
>    $ env - PATH=/usr/bin:/bin clang -o hw hw.c
>    In file included from hw.c:1:
>    /usr/include/stdio.h:34:11: fatal error: 'stddef.h' file not found
>    # include <stddef.h>
> 	     ^
>    1 error generated.
>    $

It seems you have clang 3.1~+rc1-1 and:

> ii  libclang-common-dev  3.0-6
> ii  libllvm3.1           3.1~+rc1-3
> ii  llvm-3.1-dev         3.1~+rc1-3

I also get this result with this configuration but upgrading
libclang-common-dev to 3.1~+rc1-1 seems to fix the problem.

I guess clang's dependency on libclang-common-dev could be more strict
so that clang and libclang-common-dev would be upgraded together.

Hope that helps,

Vincent





More information about the Pkg-llvm-team mailing list