<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div><span style="font-family: 'Times New Roman'; font-size: 12pt; background-color: transparent;">I have been attempting to build clang 3.4 standalone as hinted in comments embedded in its top-level CMakeLists.txt with cmake on a Ubuntu 12.04 LTS 64bit host without success.  The build host already has LLVM 3.4 + compiler-rt 3.4 installed with our self-built DEB. Both were built using clang 3.3 that we built last year.  Everything is linked with libc++, no libstdc++ dependency anywhere.  libc++abi is used throughout.</span><br></div><div style="font-family: 'Times New Roman'; font-size: medium;"><br></div><div style="font-family: 'Times New Roman';"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0,
 0);">zperry@node1:~/work/llvm/clang3.4/_tars/clang-3.4/build$ make -j 2</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">Scanning dependencies of target ClangDriverOptions</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">Scanning dependencies of target clang-tblgen</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  0%] Building Options.inc...</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  0%]
 /home/zperry/work//llvm/clang3.4/_tars/clang-3.4/include/clang/Driver/Options.td:15:9: error: Could not find include file 'llvm/Option/OptParser.td'</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">include "llvm/Option/OptParser.td"</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">        ^</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">/home/zperry/work/llvm/clang3.4/_tars/clang-3.4/include/clang/Driver/Options.td:15:9: error: Unexpected input at top level</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span
 style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">include "llvm/Option/OptParser.td"</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">        ^</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">make[2]: *** [include/clang/Driver/Options.inc.tmp] Error 1</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">make[1]: *** [include/clang/Driver/CMakeFiles/ClangDriverOptions.dir/all] Error 2</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New',
 courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">make[1]: *** Waiting for unfinished jobs....</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  0%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTNodesEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  0%] Building CXX object
 utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentCommandInfoEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  0%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  1%] Building CXX object
 utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangSACheckersEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">[  1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/TableGen.cpp.o</span></div><div style="font-family: 'Times New Roman';
 font-size: medium;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; color: rgb(192, 0, 0);">Linking CXX executable /home/zperry/work/llvm/clang3.4/_tars/llvm-3.4/build/bin/clang-tblgen</span></div><div><span><br></span></div><div style="font-family: 'Times New Roman'; background-color: transparent;"><span style="font-family: arial, helvetica, sans-serif;">But, the "missing" include file is on the system:</span></div><div style="background-color: transparent; font-family: arial, helvetica, sans-serif;"><span><br></span></div><div style="font-family: 'Times New Roman'; font-size: medium; background-color: transparent;"><span style="color: rgb(192, 0, 0); font-family: 'Courier New', courier, monaco, monospace, sans-serif;">zperry@node1:~/work/llvm/clang3.4/_tars/clang-3.4/build$ ls -l /usr/include/llvm/Option/OptParser.td </span></div><div style="font-family: 'Times New Roman'; font-size: medium; background-color:
 transparent;"><span style="color: rgb(192, 0, 0); font-family: 'Courier New', courier, monaco, monospace, sans-serif;">-rw-r--r-- 1 root root 4803 Aug 13  2013 /usr/include/llvm/Option/OptParser.td</span></div><div style="font-family: 'Times New Roman'; font-size: medium;"><br></div><div style="font-family: 'Times New Roman'; background-color: transparent;"><span style="font-family: arial, helvetica, sans-serif;">I played with both CXXFLAGS and the LLVM_MAIN_SRC_DIR to no avail and would appreciate any hints.</span></div><div style="font-family: arial, helvetica, sans-serif; background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-style: normal;"><span style="font-family: arial, helvetica, sans-serif;"><br></span></div><div style="font-family: arial, helvetica, sans-serif; background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-style: normal;"><span style="font-family: arial, helvetica, sans-serif;">A related
 question: is using cmake to build LLVM projects going to be supported in the future at all?  So far, using cmake for building various project is not as extensively documented as GNU autotools based approach?</span></div><div style="font-family: 'Times New Roman'; background-color: transparent;"><span style="font-family: arial, helvetica, sans-serif;"><br></span></div><div style="font-family: 'Times New Roman'; background-color: transparent;"><span style="font-family: arial, helvetica, sans-serif;">-- Zack</span></div><div><span style="font-family: arial, helvetica, sans-serif;"><br></span></div></div></body></html>