From: Thierry L. <thi...@in...> - 2010-03-03 11:04:50
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> Hi all,<br> <br> I'm currently in trouble to run a gcc4cli compiled CLI code (compiled on Linux/x86 machine) on a Linux/SPARC64 box with Mono (hello.exe simply printf "Hello World"):<br> <blockquote><font color="#993300"><tt>$ ls<br> gcc4net.dll hello.exe libstd.dll MSCorelibWrapper.dll<br> $ mono hello.exe<br> <br> Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object<br> at libstd.Obj?10?COBJ?init () [0x00000] in <filename unknown>:0<br> at libstd..init () [0x00000] in <filename unknown>:0<br> at hello..init () [0x00000] in <filename unknown>:0<br> at hello..start (System.String[] args) [0x00000] in <filename unknown>:0</tt></font><br> </blockquote> All the DLLs come from gcc4cli compiled on the x86 box. I thought these DLLs would work fine but this is not the case.<br> So I tried to compile gcc4cli on the SPARC64 box in order to get these DLLs fine. But the build failed:<br> <blockquote><font color="#993300"><tt>$ ../../gcc-src/gcc/configure --target=cil32 --enable-languages=c --disable-bootstrap --prefix=/local/lafage/gcc/image --with-local-prefix=/local/lafage/gcc/image/cil32 --with-mpfr=/local/lafage/misc --with-gmp=/local/lafage/misc<br> [...]<br> $ make<br> [...]<br> if /udd/lafage/local/gcc/gcc-build/gcc/./gcc/xgcc -B/udd/lafage/local/gcc/gcc-build/gcc/./gcc/ -B/local/lafage/gcc/image/cil32/bin/ -B/local/lafage/gcc/image/cil32/lib/ -isystem /local/lafage/gcc/image/cil32/include -isystem /local/lafage/gcc/image/cil32/sys-include -DHAVE_CONFIG_H -I. -I../../../../../gcc-src/gcc/libstd/src -I.. -nostdinc -iwithprefix include -I../../../../../gcc-src/gcc/libstd/include -g -O2 -MT libstd_dll-__io_fout.o -MD -MP -MF ".deps/libstd_dll-__io_fout.Tpo" -c -o libstd_dll-__io_fout.o `test -f '__io_fout.c' || echo '../../../../../gcc-src/gcc/libstd/src/'`__io_fout.c; \</tt><br> <tt> then mv -f ".deps/libstd_dll-__io_fout.Tpo" ".deps/libstd_dll-__io_fout.Po"; else rm -f ".deps/libstd_dll-__io_fout.Tpo"; exit 1; fi</tt><br> <tt>/tmp/ccKF1tBh.s (2014, 36):</tt><br> <tt>Unhandled Exception: System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length.</tt><br> <tt> at System.BitConverter.PutBytes (System.Byte* dst, System.Byte[] src, Int32 start_index, Int32 count) [0x00000] in <filename unknown>:0</tt><br> <tt> at System.BitConverter.ToDouble (System.Byte[] value, Int32 startIndex) [0x00000] in <filename unknown>:0</tt><br> <tt> at Mono.ILASM.ILParser.yyparse (yyInput yyLex) [0x00000] in <filename unknown>:0</tt><br> <tt> at Mono.ILASM.ILParser.yyparse (yyInput yyLex, System.Object yyd) [0x00000] in <filename unknown>:0</tt><br> <tt> at Mono.ILASM.Driver+DriverMain.ProcessFile (System.String file_path) [0x00000] in <filename unknown>:0</tt><br> <tt>make[4]: *** [libstd_dll-__io_fout.o] Error 1</tt></font><br> </blockquote> Note that I recompiled mpfr and gmp in 32-bit mode.<br> <br> So I have 2 questions:<br> <ol> <li>Is it normal that gcc4li DLLs are not portable since they are .NET assemblies?</li> <li>Are there special configuration options to compile gcc4cli on SPARC64?</li> </ol> Thanks for any help,<br> <pre class="moz-signature" cols="72">Thierry Lafage. </pre> </body> </html> |