[cfe-dev] Help with compiling clang 3.4 standalone with cmake and already installed LLVM+compiler-rt 3.4
Zack Perry
zack.perry at sbcglobal.net
Fri Mar 14 13:24:06 PDT 2014
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.
zperry at node1:~/work/llvm/clang3.4/_tars/clang-3.4/build$ make -j 2
Scanning dependencies of target ClangDriverOptions
Scanning dependencies of target clang-tblgen
[ 0%] Building Options.inc...
[ 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'
include "llvm/Option/OptParser.td"
^
/home/zperry/work/llvm/clang3.4/_tars/clang-3.4/include/clang/Driver/Options.td:15:9: error: Unexpected input at top level
include "llvm/Option/OptParser.td"
^
make[2]: *** [include/clang/Driver/Options.inc.tmp] Error 1
make[1]: *** [include/clang/Driver/CMakeFiles/ClangDriverOptions.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 0%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o
Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTNodesEmitter.cpp.o
[ 0%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentCommandInfoEmitter.cpp.o
[ 0%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o
[ 1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o
[ 1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o
[ 1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangSACheckersEmitter.cpp.o
[ 1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o
[ 1%] Building CXX object utils/TableGen/CMakeFiles/clang-tblgen.dir/TableGen.cpp.o
Linking CXX executable /home/zperry/work/llvm/clang3.4/_tars/llvm-3.4/build/bin/clang-tblgen
But, the "missing" include file is on the system:
zperry at node1:~/work/llvm/clang3.4/_tars/clang-3.4/build$ ls -l /usr/include/llvm/Option/OptParser.td
-rw-r--r-- 1 root root 4803 Aug 13 2013 /usr/include/llvm/Option/OptParser.td
I played with both CXXFLAGS and the LLVM_MAIN_SRC_DIR to no avail and would appreciate any hints.
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?
-- Zack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140314/ae213e41/attachment.html>
More information about the cfe-dev
mailing list