[Mono-dev] LLVM backend won't compile

Paul Melis mono-devel at assumetheposition.nl
Mon Dec 21 12:55:55 EST 2009


Zoltan Varga wrote:
> Hi,
>
>     Btw,  I can't seem to find the switch to make to have it output the
>     command it's executing (for checking -I flags)...
>
>
> Its make V=1, just like with the linux kernel.
Ah, didn't know that :)

Well, it seems the llvm include path is missing:

[...]
make[4]: Entering directory `/home/melis/c/mono-2.6.1/mono/mini'
../../doltcompile /home/melis/local/bin/gcc -DHAVE_CONFIG_H -I.
-I../..   -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP
-DUSE_MUNMAP -D_FILE_OFFSET_BITS=64 -DUSE_COMPILER_TLS -I../..
-I../../libgc/include -pthread -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include     -g -O2 -fno-strict-aliasing
-Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes
-Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings
-mno-tls-direct-seg-refs -MT mini-llvm.lo -MD -MP -MF
.deps/mini-llvm.Tpo -c -o mini-llvm.lo mini-llvm.c
mini-llvm.c:14:25: error: llvm-c/Core.h: No such file or directory
mini-llvm.c:15:36: error: llvm-c/ExecutionEngine.h: No such file or
directory
mini-llvm.c:17:27: error: mini-llvm-cpp.h: No such file or directory
mini-llvm.c:23: error: expected specifier-qualifier-list before
'LLVMModuleRef'
mini-llvm.c:39: error: expected specifier-qualifier-list before
'LLVMValueRef'
[...]

I do see the correct values in mono/mini/Makefile though:

LLVM_CONFIG = /home/melis/llvm/bin/llvm-config
LLVM_CXXFLAGS = -I/home/melis/llvm/include  -D_DEBUG -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fomit-frame-pointer
-fPIC
LLVM_LDFLAGS = -L/home/melis/llvm/lib  -lpthread -lffi -ldl -lm
LLVM_LIBS = -L/home/melis/llvm/lib  -lpthread -lffi -ldl -lm 
-lLLVMX86CodeGen -lLLVMX86Info -lLLVMX86Disassembler -lLLVMSelectionDAG
-lLLVMAsmPrinter -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen
-lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis
-lLLVMTarget -lLLVMMC -lLLVMBitWriter -lLLVMCore -lLLVMSupport
-lLLVMSystem -lstdc++

A bug in the build system?

Paul


More information about the Mono-devel-list mailing list