Dechenjm / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

LLVM_DIR ignored #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to build crack-0.8. In INSTALL it says that if LLVM is installed in 
a funny place one should set the LLVM_DIR environment variable. But this didn't 
seem to work for me.

My system LLVM is version 3.4, which crack won't build against. Both the 
autotools and cmake builds fail to find version 3.3 of LLVM.

I have of course built LLVM-3.3 in my home directory and installed it in a 
directory there.

Original issue reported on code.google.com by goodwill...@googlemail.com on 27 Dec 2014 at 10:46

GoogleCodeExporter commented 9 years ago
Thanks, I'll try to reproduce this.

Original comment by mind...@gmail.com on 28 Dec 2014 at 5:03

GoogleCodeExporter commented 9 years ago
It looks like LLVM_DIR is only supposed to work for cmake.  For autoconf, there 
is no way to specify the location but you might be able to get it to work with 
a special directory by doing something like this:

  PATH=/llvm/install/root:$PATH ./configure

For cmake, can you confirm that LLVM_DIR specifies a directory containing 
"bin/llvm-config"?

Original comment by mind...@gmail.com on 31 Dec 2014 at 4:20

GoogleCodeExporter commented 9 years ago
The documentation in INSTALL it says:

"If your LLVM libraries are installed in a non-standard location, set the
LLVM_DIR environment variable to the root of the install tree before running
cmake."

Therefore I had LLVM_DIR set to ~/llvm-3.3 not ~/llvm-3.3/bin.

However, I can confirm that with LLVM_DIR set to ~/llvm-3.3/bin, which contains 
llvm-config, it still does not detect llvm-3.3 but uses the system llvm-3.4.

Original comment by goodwill...@googlemail.com on 31 Dec 2014 at 5:44

GoogleCodeExporter commented 9 years ago
~/llvm-3.3 is the correct value for the env var (apologies for the lack of 
clarity).  Getting our cmake guys involved :-)

Original comment by mind...@gmail.com on 1 Jan 2015 at 5:00

GoogleCodeExporter commented 9 years ago
For me this worked:
rm CMakeCache.txt
LLVM_DIR=$HOME/Downloads/llvm-3.3.src/Release+Asserts cmake .

or

export LLVM_DIR=$HOME/Downloads/llvm-3.3.src/Release+Asserts
rm CMakeCache.txt
cmake .

So it might be that the cmake cache needs to be removed for it to go look for 
the specified LLVM. 

Original comment by Conrad.S...@gmail.com on 1 Jan 2015 at 9:32