[Mono-list] Mono 2.0 RC1 is out!!

Andreas Färber planche2k at googlemail.com
Fri Oct 3 10:15:28 EDT 2008


Hi,

Am 09.09.2008 um 11:51 schrieb Yury Serdyuk:

> I have tried to build Mono 2.0 RC1 from the sources on PowerPC
> architecture, namely on Cell BE processor

> Then, I've tried to configure as
>
>> ./configure --prefix=/home/user002/m-2.0rc1 CFLAGS="-mminimal-toc"
>
> and got the following
>
>> inssel.c:3158: warning: cast to pointer from integer of different  
>> size
>> LD      libmono.la
>> LD      libmono-static.la
>> CC      main.o
>> LD      mono
>> ./.libs/libmono-static.a(driver.o): In function  
>> `parse_optimizations':
>> /home/user002/mono-2.0/mono/mini/driver.c:145: undefined reference to
>> `mono_arch_cpu_optimizazions'
>> ./.libs/libmono-static.a(debug-mini.o): In function `print_var_info':
>>                            .
>> .                         .
>> ./.libs/libmono-static.a(mini-codegen.o): In function  
>> `mono_regname_full':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:130: undefined
>> reference to `mono_arch_fregname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:132: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o): In function
>> `mono_print_ins_index':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:359: undefined
>> reference to `mono_arch_regname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:361: undefined
>> reference to `mono_arch_regname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:370: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o): In function  
>> `print_regtrack':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:400: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o): In function
>> `get_register_spilling':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:523: undefined
>> reference to `mono_arch_fregname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:537: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o): In function
>> `mono_local_regalloc':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1064: undefined
>> reference to `mono_arch_regname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1095: undefined
>> reference to `mono_arch_regname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1095: undefined
>> reference to `mono_arch_regname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1260: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o):/home/user002/mono-2.0/ 
>> mono/mini/mini-codegen.c:1267:
>> more undefined references to `mono_arch_regname' follow
>> ./.libs/libmono-static.a(mini-codegen.o): In function
>> `mono_local_regalloc':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1416: undefined
>> reference to `mono_arch_fregname'
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:1569: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o): In function  
>> `alloc_int_reg':
>> /home/user002/mono-2.0/mono/mini/mini-codegen.c:643: undefined
>> reference to `mono_arch_regname'
>> ./.libs/libmono-static.a(mini-codegen.o):(.toc1+0x30): undefined
>> reference to `ppcg4_idx'
>> ./.libs/libmono-static.a(mini-codegen.o):(.toc1+0x38): undefined
>> reference to `ppcg4'
>> collect2: ld returned 1 exit status
>> make[4]: *** [mono] Error 1
>

Which likely means you're trying to compile for ppc64, which isn't  
ready - the sources are not yet being compiled in, so there are  
undefined symbols. I will shortly apply part of a patch, so that it  
should error out in case someone unknowingly runs into it.

> Finally, I have tried to configure Mono for ppc32 as
>
>> ./configure --prefix=/home/user002/m-2.0rc1
>> --target=powerpc-redhat-linux CFLAGS="-mminimal-toc"
>
> but the result is the same:

...because you would need to use --build=powerpc-redhat-linux instead,  
since you cannot cross-compile from ppc64 to ppc either.

Most likely you do not need to pass --build or --target at all, just  
assure that gcc compiles 32-bit by default or set appropriate options,  
e.g., CPPFLAGS="-m32" or CC="gcc -m32" if necessary. The pointer size  
in a test program is used to decide if the ppc64 or 32-bit ppc path is  
taken.

Andreas



More information about the Mono-list mailing list