尝试编译 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
出现以下错误:
[...]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
但cstddef
确实存在(在/usr/local/include/c++/4.8.0/
)。添加--includedir=/usr/local/include/c++/4.8.0/
到配置中也无济于事。
这可能是什么原因?