[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem building gerris on armel: Illegal instruction



On Mon, 2009-04-13 at 17:06 +0300, Riku Voipio wrote:
> On Sat, Apr 11, 2009 at 01:24:57AM +1000, Drew Parsons wrote:
> > Dear armel experts,
> > cc: Debian Science, Gerris upstream
> > 
> > gerris is FTBFS failing to build from source on armel, see
> > https://buildd.debian.org/build.php?pkg=gerris
> > https://buildd.debian.org/fetch.cgi?&pkg=gerris&ver=0.9.2%
> > 2Bdarcs081022-dfsg.1-3&arch=armel&stamp=1238595409&file=log
> 
> I didnt see this on my rebuild attempt (on a different machine).
> You can try to reproduce this on allegri.debian.org - Ask Debian
> admins[1] to install gerris build-dependencies into unstable
> chroot.

I built gerris on Martin Guy's armel box (thanks Martin).  The problem
is in FPU_SETCW, so it's certainly related to Debian patch
fpucontrol-bug350595.patch.

The illegal instruction is generated by
gerris/doc/examples/.libs/lt-classes, invoked by the call to ./classes
in doc/examples.

A backtrace yields:

Program received signal SIGILL, Illegal instruction.
0x40067d8c in gfs_init (argc=<value optimized out>, argv=<value
optimized out>)
    at init.c:274
274	   _FPU_SETCW (fpu_trap_exceptions);
(gdb) bt
#0  0x40067d8c in gfs_init (argc=<value optimized out>, 
    argv=<value optimized out>) at init.c:274
#1  0x00008890 in main ()
(gdb) print fpu_trap_exceptions
$1 = 7424


In the patch, fpu_trap_exceptions is set to ~(_FPU_MASK_ZM ) unless
otherwise specified.  __mc68000__ uses ~(_FPU_MASK_DZ) while mips uses
~(_FPU_MASK_Z ).

The variable is only used if both HAVE_FPU_SETCW and _FPU_IEEE are
defined.

So evidently ~(_FPU_MASK_ZM ) is wrong for armel. _FPU_MASK_ZM is
described as the "divide by zero" mask, so I understand ~(_FPU_MASK_ZM )
means the Gerris authors want no interrupt on divide-by-zero.

 _FPU_MASK_ZM is defined in /usr/include/fpu_control.h (provided by
libc6-dev) along with _FPU_IEEE and FPU_GETCW.

On x86-64, libc6-dev is v2.9, while on armel it's 2.7.  Might this be
related to the problem?

I'm not sure that ~(_FPU_MASK_ZM ) is 7424. Should I be worried by this?

Can you suggest how best to proceed?

Drew





Reply to: