How can I build LDC v1.18.0?

Jacob Carlborg doob at me.com
Tue Oct 29 13:21:49 UTC 2019


On 2019-10-29 08:04, Sobaya wrote:
> I'm working on building LDC in tag v1.18.0.
> 
> I cloned LDC with `--recursive`  option, checked out tag v1.18.0, and 
> execute cmake like below:
> 
> ```
> mkdir build
> cd build
> cmake ..
> ```
> 
> But I got the error in cmake execution:
> ```
> CMake Error at /usr/lib/cmake/llvm/LLVMExports.cmake:37 (message):
>    Some (but not all) targets in this export set were already defined.
> 
>    Targets Defined: FileCheck;not
> 
>    Targets not yet defined:
> ....
> ```
> 
> After investigating, I found the cause is that cmake target "FileCheck`" 
> and "not" are already defined in "ldc/utils/CMakeLists.txt`".
> I thought that "ldc/utils/CMakeLists.txt`" is written to be loaded after 
> including LLVMConfig because there are some checks for existence of 
> those targets, which is defined in LLVMConfig.
> But actually "ldc/utils/CMakeLists.txt`" is loaded before LLVMConfig.
> I cannot understand why this can be built.
> 
> What should I do for building LDC successfully?
> 
> My operating system is Arch Linux and LLVM version is 9.0.0.

Not sure if it's related, but you need to run "git submodule update 
--recursive" after checking out a tag.

-- 
/Jacob Carlborg


More information about the digitalmars-d-ldc mailing list