basic question about building ldc/calypso from source
Joakim via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Tue Feb 24 09:27:18 PST 2015
On Tuesday, 24 February 2015 at 16:33:31 UTC, Laeeth Isharc wrote:
> Hi.
>
> I am struggling with using cmake to build LDC. I have
> successfully built LLVM and clang following standard
> instructions, but I am not so familiar with cmake and do not
> know which directory LLVM_ROOT_DIR should point to.
>
> Ultimately I would like to build calypso, but I have the same
> problem with stock LDC.
>
> Running arch linux on a 64 bit machine. I have tried various
> iterations of pointing to build directory as well as llvm
> parent.
>
> [laeeth at console build]$ cmake .. -DLLVM_ROOT_DIR='../../llvm'
> -DCMAKE_BUILD_TYPE=Release
>
> [laeeth at console build]$ ls ../../llvm/
> autoconf configure LLVMBuild.txt README.txt
> bin CREDITS.TXT llvm.spec.in test
> bindings docs Makefile tools
> build examples Makefile.common unittests
> cmake include Makefile.config.in utils
> CMakeLists.txt lib Makefile.rules
> CODE_OWNERS.TXT LICENSE.TXT projects
> [laeeth at console build]$
>
>
> This is the error I receive:
>
> [laeeth at console build]$ cmake .. -DLLVM_ROOT_DIR='../../llvm'
> -DCMAKE_BUILD_TYPE=Release
> CMake Error at cmake/Modules/FindLLVM.cmake:140 (string):
> string sub-command REGEX, mode MATCHALL needs at least 5
> arguments total to
> command.
> Call Stack (most recent call first):
> cmake/Modules/FindLLVM.cmake:174 (llvm_set_libs)
> CMakeLists.txt:18 (find_package)
>
>
> CMake Error at
> /usr/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:138
> (message):
> Could NOT find LLVM: Found unsuitable version "", but
> required is at least
> "3.1" (found )
> Call Stack (most recent call first):
>
> /usr/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:372
> (_FPHSA_FAILURE_MESSAGE)
> cmake/Modules/FindLLVM.cmake:196
> (find_package_handle_standard_args)
> CMakeLists.txt:18 (find_package)
>
>
> -- Configuring incomplete, errors occurred!
> See also
> "/btrfs0/dlang/calypso/calypso/build/CMakeFiles/CMakeOutput.log".
Hmm, I tried pretty much the same command and it worked for me.
I did notice that the command output listed the llvm directory as
/usr, regardless of where my local llvm is, so maybe it also
depends on the system llvm being installed? It shows the actual
LLVM_ROOT_DIR in the generated CMakeCache.txt set to the right
local directory, so maybe try installing the system llvm also and
see if it makes a difference?
More information about the digitalmars-d-ldc
mailing list