Closed nisarg-ujjainkar closed 4 years ago
To start with it would help to know the following:
It might also help to see the output of this command, run this from the build
directory:
grep LLVM CMakeCache.txt
grep CLANG CMakeCache.txt
Thanks.
Output of
grep LLVM CMakeCache.txt
is
//The directory containing a CMake configuration file for LLVM.
LLVM_DIR:PATH=/usr/lib/llvm-10/cmake
//Include LLVM in Terra static libraries
TERRA_SLIB_INCLUDE_LLVM:BOOL=ON
//Statically link Terra against LLVM
TERRA_STATIC_LINK_LLVM:BOOL=ON
grep CLANG CMakeCache.txt
is
CLANG_EXECUTABLE:FILEPATH=/usr/bin/clang
CLANG_INCLUDE_DIRS:PATH=CLANG_INCLUDE_DIRS-NOTFOUND
CLANG_clangASTMatchers_LIB:FILEPATH=CLANG_clangASTMatchers_LIB-NOTFOUND
CLANG_clangAST_LIB:FILEPATH=CLANG_clangAST_LIB-NOTFOUND
CLANG_clangAnalysis_LIB:FILEPATH=CLANG_clangAnalysis_LIB-NOTFOUND
CLANG_clangBasic_LIB:FILEPATH=CLANG_clangBasic_LIB-NOTFOUND
CLANG_clangCodeGen_LIB:FILEPATH=CLANG_clangCodeGen_LIB-NOTFOUND
CLANG_clangDriver_LIB:FILEPATH=CLANG_clangDriver_LIB-NOTFOUND
CLANG_clangEdit_LIB:FILEPATH=CLANG_clangEdit_LIB-NOTFOUND
CLANG_clangFrontend_LIB:FILEPATH=CLANG_clangFrontend_LIB-NOTFOUND
CLANG_clangLex_LIB:FILEPATH=CLANG_clangLex_LIB-NOTFOUND
CLANG_clangParse_LIB:FILEPATH=CLANG_clangParse_LIB-NOTFOUND
CLANG_clangSema_LIB:FILEPATH=CLANG_clangSema_LIB-NOTFOUND
CLANG_clangSerialization_LIB:FILEPATH=CLANG_clangSerialization_LIB-NOTFOUND
os is Ubuntu 18.04 running on WSL2 I installed LLVM using apt.
Also, I have arch linux installed on a separate partition. On that installation, cmake configuration completes successfully on llvm/clang 10.
Can you try setting export CMAKE_PREFIX_PATH=/usr/lib/llvm-6
and try again (remove the build
directory first before you try this)? LLVM 10 support isn't fully working yet (#434), so we'll need to stick with a version <= 9 for the moment.
It may be that you'll need to install some extra packages, llvm-6.0-dev libclang-6.0-dev clang-6.0
should be sufficient to do in on Ubuntu. I've got a Dockerfile here that we run against Ubuntu 18.04, so we know this recipe should work:
https://github.com/terralang/terra/blob/master/docker/Dockerfile.ubuntu
export CMAKE_PREFIX_PATH=/usr/lib/llvm-6
did not work. However, removing clang/llvm 10 solved the issue.
Glad you were able to get it to work.
Just for posterity, I think I missed a .0
in that path, so it would be /usr/lib/llvm-6.0
.
Thanks for all the help.
Hi, I encountered following error while trying to build terra
How can I solve this issue? I have clang/llvm 6 and 10 installed on my system.