When trying to compile llvm/clang
../llvm/configure --enable-cxx11=yes --enable-libcpp=yes
--enable-optimized=yes --prefix=/usr/local --enable-targets=all
--with-gcc-toolchain=/usr/local/bin --enable-bindings=auto
the following error occurs:
[...]llvm/include/llvm/Support/AlignOf.h:19:10: fatal error: 'cstddef' file not found
#include <cstddef>
^
1 error generated.
rm: [...]/llvm_build/lib/Support/Release+Asserts/APFloat.d.tmp: No such file or directory
make[1]: *** [[...]/llvm_build/lib/Support/Release+Asserts/APFloat.o] Error 1
make: *** [all] Error 1
But cstddef
does indeed exist (in /usr/local/include/c++/4.8.0/
). Adding --includedir=/usr/local/include/c++/4.8.0/
to the configure does not help also.
What can be the cause for this?
-I<path>
, not--includedir<pat>
. In addition, at least at my OSX machine,cstddef
is in/usr/include/c++/...
, not in/usr/local/include/c++/...
, but YMMV.--includedir
, along with the other options, is what is mentioned in./configure --help
.cstddef
is in/usr/local/...
, because I also have installed the recent GCC to that location.