[llvm-dev] Linker errors after installing/compiling LLVM/CLANG
Joan Lluch via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 5 05:46:31 PDT 2019
Hi All,
I am looking for the best way to install LLVM+clang, but I do not seem to find a way that works for me.
I followed the steps in this document Getting Started with the LLVM System — LLVM 9 documentation <https://llvm.org/docs/GettingStarted.html> except that I created the following folder structure as I do not want clang and llc to go to /usr/local
LLVM-9
llvm-project (cloned from github)
install
I ran the following command line from the build directory in llvm-project as described in the doc, but added the DLLVM_OPTIMIZED_TABLEGEN=On variable :
cmake -G Xcode -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=/Users/joan/LLVM-9/install -DLLVM_OPTIMIZED_TABLEGEN=On ../llvm
The cmake command above seems to work ok, but after that, when I compile the “install” or “build_all” schemes I get a lot of linker errors. Such as these ones and more:
clang: error: no such file or directory: '/Users/joan/LLVM-9/llvm-project/build/Debug/lib/libclangAST.a'
clang: error: no such file or directory: '/Users/joan/LLVM-9/llvm-project/build/Debug/lib/libclangLex.a'
clang: error: no such file or directory: '/Users/joan/LLVM-9/llvm-project/build/Debug/lib/libclangBasic.a'
Up until recently, I have worked with LLVM 7.0 and all what I did was downloading both llvm and clang from llvm.org, copied clang into llvm/tools, and ran the cmake application (not command line). That kind of worked except for some minor glitches but of course I didn’t get the benefits of git.
So what am I doing wrong now? Why I’m getting such linker errors?
It seems that a few required libraries are not created, but I do not understand why. Any ideas?
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190705/81c683ed/attachment.html>
More information about the llvm-dev
mailing list