[LLVMdev] bugs in CMake build

HyperQuantum hyperquantum at gmail.com
Fri Nov 14 12:24:36 PST 2008


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, 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.

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
[ 93%] Checking for cyclic dependencies between LLVM libraries.
[ 93%] Building llvm-config script.
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/lib/colorgcc/bin/gcc
-- Check for working C compiler: /usr/lib/colorgcc/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++
-- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Perl: /usr/bin/perl
-- Configuring traditional style.
-- Looking for argz.h
(...)
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- 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?


Thanks,

Kevin André
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake_llvm_bug.patch
Type: application/octet-stream
Size: 2292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081114/bd1483a3/attachment.obj>


More information about the llvm-dev mailing list