David Farler
2014-Sep-10 03:40 UTC
[LLVMdev] Can't build against LLVM-3.5 with CMake: CMakeExports.cmake broken?
On Sep 9, 2014, at 7:12 AM, Dan Liew <dan at su-root.co.uk> wrote:> This is happening because the ``LLVMConfigLibs`` makefile variable is > empty when used in ``cmake/modules/Makefile``. It is normally set in > Makefile.rules . However if you build with --enable-shared this > variable doesn't get set and so LLVMExports.cmake isn't generated > correctly. > > @David: Were you also compiling this way?The last time, yes. I built with OS X Homebrew (http://brew.sh) and it looks like their formulas use --enable-shared by default, although there is an option to turn it off (https://github.com/Homebrew/homebrew/blob/master/Library/Formula/llvm.rb). I was trying to work on a patch to update to 3.5.0 when I ran into the problem. I'll try --disable-shared with the Homebrew formula and see if that unblocks me on 3.5.0. Homebrew also has an option to pull build from trunk as well, IIRC. Perhaps we should advise the project to build with cmake if possible? It looks like this has been pretty much solved, sorry for the delay. I forgot that I had llvm-dev going to a dedicated mail folder. David
Dan Liew
2014-Sep-10 10:36 UTC
[LLVMdev] Can't build against LLVM-3.5 with CMake: CMakeExports.cmake broken?
>> @David: Were you also compiling this way? > > The last time, yes. I built with OS X Homebrew (http://brew.sh) and it looks like their formulas use --enable-shared by default, although there is an option to turn it off (https://github.com/Homebrew/homebrew/blob/master/Library/Formula/llvm.rb). I was trying to work on a patch to update to 3.5.0 when I ran into the problem. > > I'll try --disable-shared with the Homebrew formula and see if that unblocks me on 3.5.0. Homebrew also has an option to pull build from trunk as well, IIRC. > > Perhaps we should advise the project to build with cmake if possible?That would be nice but unfortunately there is not equivalent of --enable-shared in the CMake build right now. You can build shared libraries with CMake but it will build separate shared libraries (e.g. libLLVMSuport.so, libLLVMJIT.so, ...) instead of a single monolithic shared library (i.e. libLLVM.so) .> It looks like this has been pretty much solved, sorry for the delay. I forgot that I had llvm-dev going to a dedicated mail folder.I've committed the fix to trunk in r217484. Could you try trunk? If it works for you then I'll close PR20884 Thanks, Dan.