[LLVMdev] bugs in CMake build

Óscar Fuentes ofv at wanadoo.es
Fri Nov 14 12:57:18 PST 2008


Hello Kevin.

HyperQuantum <hyperquantum at gmail.com> writes:

> I am using LLVM as back end for my compiler, and until now I have used
> my own CMake build system for LLVM. But now LLVM has a CMake build
> system of its own,

Yes, and it was based on yours. cmake/config-ix.cmake still has a big
chunk taken from your implementation. Thank you!

> so when upgrading my LLVM version I decided to move
> to the 'official' one. It's not an easy transition, the build fails. I
> already found one bug: in some files the variable CMAKE_SOURCE_DIR is
> used for the LLVM top-level source directory, while LLVM_MAIN_SRC_DIR
> should be used instead. A small patch is attached for this.

CMAKE_SOURCE_DIR should be the same as LLVM_MAIN_SRC_DIR. If you know an
scenario where this is not true, please describe it.

It is not consistent to use the two, though, so I'll apply your patch.

> Now I get a failure for llvm-config:
>
>
> Scanning dependencies of target llvm-config.target
> [ 93%] Regenerating
> /home/kevin/Documents/ProgProj/hyper-llvm-new/build/compiler/llvm-2.4/tools/llvm-config/LibDeps.txt.tmp
> [ 93%] Generating LibDeps.txt
> Updated /home/kevin/Documents/ProgProj/hyper-llvm-new/build/compiler/llvm-2.4/tools/llvm-config/LibDeps.txt
> because dependencies changed

[snip]

> -- Check if the system is big endian - little endian
> -- Target triplet: i686-pc-linux-gnu
> llvm-config: unknown component name: powerpc
> CMake Error at cmake/modules/LLVMConfig.cmake:41 (message):
>   llvm-config failed for executable llc
> Call Stack (most recent call first):
>   cmake/modules/LLVMConfig.cmake:5 (nix_llvm_config)
>   cmake/modules/AddLLVM.cmake:16 (llvm_config)
>   cmake/modules/AddLLVM.cmake:36 (add_llvm_executable)
>   tools/llc/CMakeLists.txt:3 (add_llvm_tool)
>
> I'll see if I can find the cause of the problem myself, or does anyone
> have a suggestion about this?

The system still has a few places where dependencies are not rock
solid. The specific failure you are seeing should be fixed since a few
days ago. Which svn revision are you using? Please restart with a
pristine directory.

If you find more problems, please report them on
http://www.llvm.org/bugs/

Regards,

-- 
Oscar




More information about the llvm-dev mailing list