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

Zoltan Varga vargaz at gmail.com
Wed Dec 23 14:09:09 EST 2009


Hi,

  So x86 might not work after all, because you can run into this problem:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-December/027999.html

for which there is no workaround.

                                    Zoltan

On Wed, Dec 23, 2009 at 7:59 PM, Zoltan Varga <vargaz at gmail.com> wrote:

> Hi,
>
>
> This seems to be caused by MONO_ARCH_LLVM_SUPPORTED not being set,
>
>> bringing me back to a previous question: is Mono + LLVM supported on
>> 32-bit x86? As I see this:
>>
>
> This should be fixed now in SVN. LLVM is not yet supported on any platform,
> because
> it is still experimental code, but it should mostly work on x86.
>
>                      Zoltan
>
>>
>> 17:42|melis at juggle2:~/c/mono-svn/mono/mono/mini> grep
>> MONO_ARCH_LLVM_SUPPORTED *
>> mini-amd64.h:#define MONO_ARCH_LLVM_SUPPORTED 1
>> mini-arm.h:#define MONO_ARCH_LLVM_SUPPORTED 1
>>
>>
>> Paul
>>
>> >
>> >             Zoltan
>> >
>> > On Wed, Dec 23, 2009 at 12:04 PM, Paul Melis
>> > <mono-devel at assumetheposition.nl
>> > <mailto:mono-devel at assumetheposition.nl>> wrote:
>> >
>> >     [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
>> >     <mailto:mono-devel at assumetheposition.nl>>
>> >     To:     Zoltan Varga <vargaz at gmail.com <mailto:vargaz at gmail.com>>
>> >     References:     <4B2FADE6.5070902 at assumetheposition.nl
>> >     <mailto:4B2FADE6.5070902 at assumetheposition.nl>>
>> >     <295e750a0912210927q6f5ad07djf672ea87f0e006c7 at mail.gmail.com
>> >     <mailto:295e750a0912210927q6f5ad07djf672ea87f0e006c7 at mail.gmail.com
>> >>
>> >     <4B2FB6AB.5030604 at assumetheposition.nl
>> >     <mailto:4B2FB6AB.5030604 at assumetheposition.nl>>
>> >     <CAE38A17-05D9-4F57-94E2-A482F4890078 at novell.com
>> >     <mailto:CAE38A17-05D9-4F57-94E2-A482F4890078 at novell.com>>
>> >     <4B311727.3000704 at assumetheposition.nl
>> >     <mailto:4B311727.3000704 at assumetheposition.nl>>
>> >     <295e750a0912221101w2dc4898cn3353e62dd393dd40 at mail.gmail.com
>> >     <mailto: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 <http://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>
>> >     > <mailto: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>
>> >     >     <mailto:Mono-devel-list at lists.ximian.com
>> >     <mailto:Mono-devel-list at lists.ximian.com>>
>> >     >     >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> >     >     >>
>> >     >     >
>> >     >     >
>> >     >     >
>> >     >
>> >     >
>> >
>> >
>> >     _______________________________________________
>> >     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
>> >
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091223/b8c4ece0/attachment.html 


More information about the Mono-devel-list mailing list