[cfe-dev] Prebuilt Clang 5 libc paths

Andreas Bergmeier via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 1 13:36:49 PDT 2017


I am trying to use the prebuilt Clang 5 on Ubuntu 16.04. In the end it
fails where Clang seems to not find the c standard library:
> clang <...> -nostdinc++ -isystem clang_prebuilt/include/c++/v1
...
In file included from clang_prebuilt/include/c++/v1/cstdio:100:
In file included from clang_prebuilt/include/c++/v1/stdio.h:108:
In file included from /usr/include/stdio.h:33:
clang_prebuilt/include/c++/v1/stddef.h:18:15: fatal error: 'stddef.h' file
not found
#include_next <stddef.h>
              ^~~~~~~~~~

Searching on my system for that header I get:

> find /usr -name stddef.h
/usr/include/linux/stddef.h <- empty
/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h
/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
/usr/src/linux-headers-4.4.0-96/include/linux/stddef.h
/usr/src/linux-headers-4.4.0-96/include/uapi/linux/stddef.h
/usr/src/linux-headers-4.4.0-97/include/linux/stddef.h
/usr/src/linux-headers-4.4.0-97/include/uapi/linux/stddef.h
/usr/src/linux-headers-4.4.0-98/include/linux/stddef.h
/usr/src/linux-headers-4.4.0-98/include/uapi/linux/stddef.h

so I am wondering where stddef.h is supposed to be found on the Ubuntu
system?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171101/5177616c/attachment.html>


More information about the cfe-dev mailing list