<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello,<br><br>I'm trying to install Clang, using CMake with Ninja suport, according to this tutorial:<br><br><blockquote>clang.llvm.org/docs/LibASTMatchersTutorial.html<br></blockquote><br>The problem comes when building Clang. I uses this comand:<br><br><blockquote><div align="left"><pre style="word-wrap:break-word;white-space:pre-wrap;">cmake .. -GNinja -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++Esto es lo que creo que finalmente he puesto:cmake -G Ninja ../llvm -DLLVM_BUILD_TESTS=ON -DCMAKE_C_COMPILER=/usr/local/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++<br><br></pre></div></blockquote><div align="left"><pre style="word-wrap:break-word;white-space:pre-wrap;">instead of what the tutorial says by someone recommendation. But when I run Ninja (whith -v option) again i get this:<br><br> [1/2256] /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/Errno.cpp<br>[2/2256] /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/APFloat.cpp<br>[3/2256] /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/APSInt.cpp<br>FAILED: /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/APFloat.cpp<br>In file included from /home/daniel/clang-llvm/llvm/lib/Support/APFloat.cpp:15:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/APFloat.h:20:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/APInt.h:19:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/ArrayRef.h:14:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/SmallVector.h:17:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/Support/AlignOf.h:19:<br>/usr/lib/gcc/i686-linux-gnu/4.7/../../../../include/c++/4.7/cstddef:43:10: fatal error: 'bits/c++config.h' file not found<br>#include <bits/c++config.h><br> ^<br>1 error generated.<br>FAILED: /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/Errno.cpp<br>In file included from /home/daniel/clang-llvm/llvm/lib/Support/Errno.cpp:14:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/Support/Errno.h:17:<br>/usr/lib/gcc/i686-linux-gnu/4.7/../../../../include/c++/4.7/string:40:10: fatal error: 'bits/c++config.h' file not found<br>#include <bits/c++config.h><br> ^<br>1 error generated.<br>FAILED: /usr/local/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fcolor-diagnostics -fno-rtti -Ilib/Support -I/home/daniel/clang-llvm/llvm/lib/Support -Iinclude -I/home/daniel/clang-llvm/llvm/include -fno-exceptions -MMD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -MF "lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o.d" -o lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -c /home/daniel/clang-llvm/llvm/lib/Support/APSInt.cpp<br>In file included from /home/daniel/clang-llvm/llvm/lib/Support/APSInt.cpp:15:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/APSInt.h:18:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/APInt.h:19:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/ArrayRef.h:14:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/ADT/SmallVector.h:17:<br>In file included from /home/daniel/clang-llvm/llvm/include/llvm/Support/AlignOf.h:19:<br>/usr/lib/gcc/i686-linux-gnu/4.7/../../../../include/c++/4.7/cstddef:43:10: fatal error: 'bits/c++config.h' file not found<br>#include <bits/c++config.h><br> ^<br>1 error generated.<br>ninja: build stopped: subcommand failed.<br><br>Using locate c++config.h i get this directory, which is not where clang++ y searching for it:<br><br></pre><blockquote>/usr/include/i386-linux-gnu/c++/4.7/bits/c++config.h<br><br></blockquote><pre style="word-wrap:break-word;white-space:pre-wrap;">I think it's because g++ look for it in a directory by default, by clang++ search for it in another location. How could I tell clang where to find it?<br><br>I'm using LinuxMint 15 32-bit.<br></pre></div> </div></body>
</html>