jckarter / clay

The Clay programming language
http://claylabs.com/clay
Other
403 stars 34 forks source link

LLVM_CONFIG-NOTFOUND failed #496

Open pmor13 opened 10 years ago

pmor13 commented 10 years ago

Trying to use Clay for the first time, but cmake says: -- Using llvm-config: LLVM_CONFIG-NOTFOUND CMake Error at CMakeLists.txt:32 (message): LLVM_CONFIG-NOTFOUND failed

jckarter commented 10 years ago

You may need to use -DLLVM_CONFIG=/path/to/llvm-config to point cmake in the right direction.

pmor13 commented 10 years ago

Joe, currently I have "llvm-config: command not found". One should install LLVM first, right?

jckarter commented 10 years ago

Yes, you'll need LLVM and Clang 3.2 installed before building Clay. Note that later versions of LLVM and Clang aren't source-compatible, so it has to be 3.2.

pmor13 commented 10 years ago

Joe, it seems one needs an advice. I have on my OS X machine LLVM with Clang, that I have built one month ago. It is not finally installed, because I just played with it. All binaries are still in the build directory. Today I checked versions: "./llvm-config --version" gives me "3.5svn" "./clang --version" gives me "clang version 3.5 (trunk) Target: x86_64-apple-darwin13.2.0 Thread model: posix"

If I understand you correctly, I need to build LLVM with Clang ver. 3.2 and then install it. But by default I have Clang 5.1 (clang-503.0.40) (based on LLVM 3.4svn) on my machine. So, how I can use ver. 3.2 without override default installation to finally build Clay?

jckarter commented 10 years ago

LLVM and Clang installations can coexist in different locations. You should be able to install the 3.2 packages from http://llvm.org/releases/download.html#3.2 in, say, /usr/local/llvm-3.2, and point Clay's cmake config at /usr/local/llvm-3.2/bin/llvm-config, without disrupting your ToT installation.