[Mono-devel-list] Compile error Mono 0.91 on PowerBook G4 YDL 3
Mikkel Kruse Johnsen
mikkel at linet.dk
Tue May 18 03:40:11 EDT 2004
Hi
I fixed it by upgrading to FC2 development glibc package for PPC.
/Mikkel
On Sat, 2004-05-15 at 22:48, rico at elctech.com wrote:
> I have not seen any resolution to this issue on the list and I wanted to
> provide more information to help solve the problem. I'm hoping I've given
> enough information for someone to make sense of the exceptions-ppc.c mapping
> to the YDL headers. If not, please let me know what else I can provide.
>
> I ran into this on my G3 YDL 3 system. Looking in:
> /usr/include/ucontext.h:
> ---------------
> /* Get machine dependent definition of data structures. */
> #include <sys/ucontext.h>
> ---------------
>
> /usr/include/sys/ucontext.h:
> ---------------
> typedef struct sigcontext mcontext_t;
> /* Userlevel context. */
> typedef struct ucontext
> {
> unsigned long int uc_flags;
> struct ucontext *uc_link;
> stack_t uc_stack;
> #if __WORDSIZE == 32
> mcontext_t uc_mcontext;
> __sigset_t uc_sigmask;
> #else
> sigset_t uc_sigmask;
> mcontext_t uc_mcontext; /* last for extensibility */
> #endif
> } ucontext_t;
> ---------------
>
> The failing code (in mono/mini/exceptions-ppc.c:1082) is caused by this
> lookup:
> uc->uc_mcontext.uc_regs->gregs [PT_NIP]
>
> Where uc is defined as:
> struct ucontext *uc = ctx;
>
> So a struct ucontext has a uc_mcontext field, but looking at the definition
> of sigcontext (mcontext_t) in /usr/include/asm/sigcontext.h:
> ---------------
> struct sigcontext_struct {
> unsigned long _unused[4];
> int signal;
> unsigned long handler;
> unsigned long oldmask;
> struct pt_regs *regs;
> };
> ---------------
>
> There is an entry for 'regs', but not for uc_regs. Furthermore, uc_regs does
> not seem to map to 'regs' since there is no 'gregs' field in struct pt_regs.
> From /usr/include/asm/ptrace.h:
> struct pt_regs {
> unsigned long gpr[32];
> unsigned long nip;
> unsigned long msr;
> unsigned long orig_gpr3; /* Used for restarting system calls
> */
> unsigned long ctr;
> unsigned long link;
> unsigned long xer;
> unsigned long ccr;
> unsigned long mq; /* 601 only (not used at present) */
> /* Used on APUS to hold IPL value.
> */
> unsigned long trap; /* Reason for being here */
> unsigned long dar; /* Fault registers */
> unsigned long dsisr;
> unsigned long result; /* Result of a system call */
> };
>
> I am at a loss on how to reconcile the code. Looking forward to the list's
> input.
>
> -Rico
>
> > -----Original Message-----
> > From: mono-devel-list-admin at lists.ximian.com
> > [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of
> > Paolo Molaro
> > Sent: Tuesday, May 04, 2004 10:59 AM
> > To: mono-devel-list at lists.ximian.com
> > Subject: Re: [Mono-devel-list] Compile error Mono 0.91 on
> > PowerBook G4 YDL 3
> >
> > On 05/04/04 Mikkel Kruse Johnsen wrote:
> > > I have a PB G4 running YDL 3 and garnome 2.5.91, ICU 2.6.2.
> > >
> > > The error is:
> > [...]
> > > exceptions-ppc.c: In function `mono_arch_handle_exception':
> > > exceptions-ppc.c:1082: structure has no member named `uc_regs'
> >
> > You need to poke inside /usr/include/ucontext.h and see how
> > the ucontext struct is defined there. It looks like on your
> > system it's different from mine (Debian/PPC).
> > Then, you either fix the function there to match, or you post
> > the full details of the ucontext structure on your system so
> > that I can fix it.
> >
> > lupus
> >
> > --
> > -----------------------------------------------------------------
> > lupus at debian.org debian/rules
> > lupus at ximian.com Monkeys do it better
> > _______________________________________________
> > Mono-devel-list mailing list
> > 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
> 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/20040518/ae79796c/attachment.html
More information about the Mono-devel-list
mailing list