[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-list
Subject:    Re: [Mono-list] Cannot run or build Mono on SPARC V8 / Solaris 9
From:       Jonathan Zimmerman <tyrius () verizon ! net>
Date:       2006-06-29 14:02:34
Message-ID: 44A3DD7A.3020607 () verizon ! net
[Download RAW message or body]

Whoops.. here is the patch I referred to in my previous post:

--- ./mono/arch/sparc/sparc-codegen.h.orig
+++ ./mono/arch/sparc/sparc-codegen.h
@@ -661,7 +661,11 @@
 #define sparc_flush(ins,base,disp) 
sparc_encode_format3a((ins),2,0,(base),(disp),59,0)
 #define sparc_flush_imm(ins,base,disp) 
sparc_encode_format3b((ins),2,(base),(disp),59,0)
 
+#ifdef SPARCV9
 #define sparc_flushw(ins) sparc_encode_format3a((ins),2,0,0,0,43,0)
+#else
+#define sparc_flushw(ins) sparc_ta(ins, ST_FLUSH_WINDOWS)
+#endif
 
 #define sparc_membar(ins,flags) sparc_encode_format3b ((ins), 2, 0xf, 
(flags), 0x28, 0)
 
--- ./mono/mini/exceptions-sparc.c.orig
+++ ./mono/mini/exceptions-sparc.c
@@ -14,6 +14,8 @@
 #include <string.h>
 #include <sys/ucontext.h>
 
+#include <sys/trap.h>
+
 #include <mono/arch/sparc/sparc-codegen.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/tabledefs.h>
--- ./mono/mini/mini-sparc.h.orig
+++ ./mono/mini/mini-sparc.h
@@ -1,6 +1,8 @@
 #ifndef __MONO_MINI_SPARC_H__
 #define __MONO_MINI_SPARC_H__
 
+#include <sys/trap.h>
+
 #include <mono/arch/sparc/sparc-codegen.h>
 
 #include <glib.h>
--- ./mono/mini/tramp-sparc.c.orig
+++ ./mono/mini/tramp-sparc.c
@@ -11,6 +11,8 @@
 #include <config.h>
 #include <glib.h>
 
+#include <sys/trap.h>
+
 #include <mono/arch/sparc/sparc-codegen.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/marshal.h>

tyrius@verizon.net wrote:
> When I try to use the prepared Mono 1.1.13.8 package on a SPARCStation 5/170 \
> running Solaris 9 I get this error: cannot execute binary file.
> 
> file `which mono` produces this output:
> ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, \
> stripped 
> I believe the problem here is that the mono executable was compiled on a SPARC V8+, \
> but the cpu on my machine is a V8. 
> I have attempted to rebuild Mono on my own (a very slow process on this machine), \
> but that fails with a different problem.  During the build process I get the \
> following (note the Illegal Instruction - core dumped): gmake[6]: Entering \
>                 directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> *** The compiler 'mcs' doesn't appear to be usable.
> *** Trying the 'monolite' directory.
> gmake[7]: Entering directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> Illegal Instruction - core dumped
> gmake[8]: *** [build/deps/basic-profile-check.exe] Error 132
> gmake[8]: Entering directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> *** The contents of your 'monolite' directory may be out-of-date
> *** You may want to try 'make get-monolite-latest'
> gmake[8]: *** [do-profile-check-monolite] Error 1
> gmake[8]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[7]: *** [do-profile-check] Error 2
> gmake[7]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[6]: *** [do-profile-check-monolite] Error 2
> gmake[6]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[5]: *** [do-profile-check] Error 2
> gmake[5]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[4]: *** [profile-do--basic--all] Error 2
> gmake[4]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[3]: *** [profiles-do--all] Error 2
> gmake[3]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/mcs'
> gmake[2]: *** [all-local] Error 2
> gmake[2]: Leaving directory `/home/tyrius/src/mono-1.1.13.8/runtime'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/home/tyrius/src/mono-1.1.13.8'
> gmake: *** [all] Error 2
> 
> I find it a little puzzling: I've tried to use GDB to see where the illegal \
> instruction is coming from, but in sigill_signal_handler info->si_code == 0. 
> Here is the backtrace from GDB:
> #0  sigill_signal_handler (_dummy=4, info=0xefffebd0, context=0xefffea10) at \
> mini.c:9924 #1  0xef2c5b14 in __sighndlr () from /usr/lib/libthread.so.1
> #2  0xef2bf80c in call_user_handler () from /usr/lib/libthread.so.1
> #3  <signal handler called>
> #4  0xef1f0010 in ?? ()
> #5  0xee8628b4 in ?? ()
> #6  0xee8627e8 in ?? ()
> #7  0x0016e544 in mono_jit_runtime_invoke (method=0x308910, obj=0x271f90, \
> params=0xeffff4e8, exc=<incomplete type>) at mini.c:9869 #8  0x000a3800 in \
> mono_runtime_invoke (method=0x308910, obj=0x271f90, params=0xeffff4e8, \
> exc=<incomplete type>) at object.c:1352 #9  0x000d3f1c in \
> mono_exception_from_name_two_strings (image=0x271f90, name_space=0x0, name=0x31b360 \
> "", a1=0x30bfc8, a2=0x0) at exception.c:142 #10 0x000d4894 in mono_runtime_init \
> (domain=<incomplete type>, start_cb=0x166e48 <mono_thread_start_cb>, \
> attach_cb=0x166ef4 <mono_thread_attach_cb>) at appdomain.c:123 #11 0x0016f8bc in \
> mini_init (filename=0xeffff975 \
> "/home/tyrius/src/mono-1.1.13.8/mcs/class/lib/monolite/mcs.exe") at mini.c:10492 \
> #12 0x000263e8 in mono_main (argc=6, argv=0xeffff7cc) at driver.c:867 #13 \
> 0x00023ba0 in main (argc=6, argv=0xeffff7cc) at main.c:6 
> the box I'm doing this on is a hobbyist box and I don't have the luxury of \
> replacing it with something that has a SPARC V9 cpu, so I'd really like to get this \
> working on a SPARC V8. 
> Thank you,
> 
> Jonathan Zimmerman
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic