[MacPorts] #14454: mono 1.2.6 fails to build (darwin_stop_world.c)

MacPorts trac at macosforge.org
Mon Feb 25 14:48:05 PST 2008


#14454: mono 1.2.6 fails to build (darwin_stop_world.c)
----------------------------------------------+-----------------------------
  Reporter:  opendarwin.nospam at vercruesse.de  |       Owner:  macports-tickets at lists.macosforge.org
      Type:  defect                           |      Status:  new                                  
  Priority:  Normal                           |   Milestone:  Port Bugs                            
 Component:  ports                            |     Version:  1.6.0                                
Resolution:                                   |    Keywords:                                       
----------------------------------------------+-----------------------------
Comment (by daniel at lorch.cc):

 I can reproduce this problem with OS X Leopard. My solution was to open
 the file

 {{{
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_mono/work/mono-1.2.6/libgc/darwin_stop_world.c
 }}}

 by hand and jump to line 106. I removed the whole block enclosed by

 {{{
   #if defined(_STRUCT_X86_EXCEPTION_STATE32)
         lo = state.__esp;

         GC_push_one(state.__eax);
         GC_push_one(state.__ebx);
         GC_push_one(state.__ecx);
         GC_push_one(state.__edx);
         GC_push_one(state.__edi);
         GC_push_one(state.__esi);
         GC_push_one(state.__ebp);
   #elif
 }}}

 It seems to work with the following code:

 {{{
         lo = state.esp;

         GC_push_one(state.eax);
         GC_push_one(state.ebx);
         GC_push_one(state.ecx);
         GC_push_one(state.edx);
         GC_push_one(state.edi);
         GC_push_one(state.esi);
         GC_push_one(state.ebp);
 }}}

 Of course then you'll just run into the next problem:

 {{{
 exceptions-x86.c: In function 'mono_arch_sigctx_to_monoctx':
 exceptions-x86.c:711: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:712: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:713: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:714: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:715: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:716: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:717: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:718: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:719: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c: In function 'mono_arch_monoctx_to_sigctx':
 exceptions-x86.c:741: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:742: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:743: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:744: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:745: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:746: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:747: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:748: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:749: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c: In function 'mono_arch_ip_from_context':
 exceptions-x86.c:770: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c: In function 'mono_arch_handle_altstack_exception':
 exceptions-x86.c:837: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:845: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:846: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:849: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:869: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:874: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:881: error: 'struct mcontext32' has no member named
 '__ss'
 exceptions-x86.c:882: error: 'struct mcontext32' has no member named
 '__ss'
 make[4]: *** [exceptions-x86.lo] Error 1
 make[3]: *** [all] Error 2
 make[2]: *** [all-recursive] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2
 }}}

 Then I opened mono/mini/mini-x86.h and deleted the block

 {{{
 #elif defined(__APPLE__) && defined(_STRUCT_MCONTEXT)
         #define UCONTEXT_REG_EAX(ctx) ((ctx)->uc_mcontext->__ss.__eax)
         #define UCONTEXT_REG_EBX(ctx) ((ctx)->uc_mcontext->__ss.__ebx)
         #define UCONTEXT_REG_ECX(ctx) ((ctx)->uc_mcontext->__ss.__ecx)
         #define UCONTEXT_REG_EDX(ctx) ((ctx)->uc_mcontext->__ss.__edx)
         #define UCONTEXT_REG_EBP(ctx) ((ctx)->uc_mcontext->__ss.__ebp)
         #define UCONTEXT_REG_ESP(ctx) ((ctx)->uc_mcontext->__ss.__esp)
         #define UCONTEXT_REG_ESI(ctx) ((ctx)->uc_mcontext->__ss.__esi)
         #define UCONTEXT_REG_EDI(ctx) ((ctx)->uc_mcontext->__ss.__edi)
         #define UCONTEXT_REG_EIP(ctx) ((ctx)->uc_mcontext->__ss.__eip)
 }}}

 and replaced

 {{{
 #elif defined(__APPLE__) && !defined(_STRUCT_MCONTEXT)
 }}}

 by

 {{{
 #elif defined(__APPLE__)
 }}}

 To summarize, it seems that the switches _STRUCT_X86_EXCEPTION_STATE32 and
 _STRUCT_MCONTEXT don't have the right values for OS X Leopard.

-- 
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14454#comment:1>
MacPorts </projects/macports>
Ports system for Mac OS


More information about the macports-tickets mailing list