The build of cppinsights fails on Arch Linux.
The error message is:
In file included from /usr/include/c++/8.3.0/ext/string_conversions.h:41,
from /usr/include/c++/8.3.0/bits/basic_string.h:6400,
from /usr/include/c++/8.3.0/string:52,
from /usr/include/c++/8.3.0/stdexcept:39,
from /usr/include/c++/8.3.0/array:39,
from /usr/include/c++/8.3.0/tuple:39,
from /usr/include/c++/8.3.0/bits/unique_ptr.h:37,
from /usr/include/c++/8.3.0/memory:80,
from /usr/include/llvm/Support/Casting.h:21,
from /usr/include/clang/Basic/LLVM.h:22,
from /usr/include/clang/AST/APValue.h:17,
from /usr/include/clang/AST/Decl.h:17,
from /usr/include/clang/AST/ASTTypeTraits.h:20,
from /usr/include/clang/AST/ASTContext.h:19,
from /usr/include/clang/AST/AST.h:18,
from ../Insights.cpp:8:
/usr/include/c++/8.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
The build of cppinsights fails on Arch Linux.
The error message is:
I've looked around a bit and found that this is somehow related to the
-isystem/usr/includearguments that is used in the generated build.ninja file. Replacing all the-isystemparts with-Ifixed the issue for me:sed -i "s/-isystem/-I/g" build.ninja, but this should be fixed in the CMake files somehow I think.