[Mono-dev] [Fwd: Re: LLVM backend won't compile]

Paul Melis mono-devel at assumetheposition.nl
Wed Dec 23 06:04:17 EST 2009


[Resending as it only went to Zoltan]

-------- Original Message --------
Subject: 	Re: [Mono-dev] LLVM backend won't compile
Date: 	Wed, 23 Dec 2009 11:49:53 +0100
From: 	Paul Melis <mono-devel at assumetheposition.nl>
To: 	Zoltan Varga <vargaz at gmail.com>
References: 	<4B2FADE6.5070902 at assumetheposition.nl>
<295e750a0912210927q6f5ad07djf672ea87f0e006c7 at mail.gmail.com>
<4B2FB6AB.5030604 at assumetheposition.nl>
<CAE38A17-05D9-4F57-94E2-A482F4890078 at novell.com>
<4B311727.3000704 at assumetheposition.nl>
<295e750a0912221101w2dc4898cn3353e62dd393dd40 at mail.gmail.com>



Right, I just tried compiling against LLVM 2.6 and I get the following
linker error:

[...]
make[3]: Entering directory `/home/melis/c/mono-2.6-svn/mono/mono/mini'
make  all-am
make[4]: Entering directory `/home/melis/c/mono-2.6-svn/mono/mono/mini'
LD    libmono.la
.libs/mini-trampolines.o: In function `mono_create_llvm_imt_trampoline':
/home/melis/c/mono-2.6-svn/mono/mono/mini/mini-trampolines.c:1377:
undefined reference to `mono_arch_get_llvm_imt_trampoline'
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld:
.libs/libmono.so.0.0.0: hidden symbol
`mono_arch_get_llvm_imt_trampoline' isn't defined
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld:
final link failed: Nonrepresentable section on output

That symbol seems to exist only in the AMD64 code:

11:47|melis at juggle2:~/c/mono-2.6-svn/mono> grep
mono_arch_get_llvm_imt_trampoline mono/mini/*.c
mono/mini/mini-trampolines.c:    return
mono_arch_get_llvm_imt_trampoline (domain, m, vt_offset);
mono/mini/tramp-amd64.c:mono_arch_get_llvm_imt_trampoline (MonoDomain
*domain, MonoMethod *m, int vt_offset)

Is Mono's LLVM support only available on x86_64?

Paul


Zoltan Varga wrote:
> Hi,
>
>   mono 2.6 should work with llvm 2.6, mono svn can work with llvm 2.6/svn.
>
>                     Zoltan
>
> On Tue, Dec 22, 2009 at 7:59 PM, Paul Melis
> <mono-devel at assumetheposition.nl
> <mailto:mono-devel at assumetheposition.nl>> wrote:
>
>     Miguel de Icaza wrote:
>     > Hello,
>     >
>     >     I noticed this problem on trunk, and I was fixing the
>     Makefiles, but I forgot to commit the code before I left.
>     >
>     >     The fix is simple, just add the LLVM_CFLAGS to the
>     Makefile.am's definitions.
>     >
>     Zoltan seems to have committed a fix already. Btw, what version of
>     LLVM
>     does Mono 2.6 require? It seems current LLVM svn is not usable due to
>     changed APIs
>
>     Paul
>     > On Dec 21, 2009, at 12:55 PM, Paul Melis wrote:
>     >
>     >
>     >> 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
>     >> _______________________________________________
>     >> Mono-devel-list mailing list
>     >> Mono-devel-list at lists.ximian.com
>     <mailto:Mono-devel-list at lists.ximian.com>
>     >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>     >>
>     >
>     >
>     >
>
>




More information about the Mono-devel-list mailing list