build error: xmmintrin.h target specific option mismatch building slepc 3.8 on i386
Can anyone make sense of the build error for SLEPc 3.8.2 on i386?
The log is at
https://buildd.debian.org/status/package.php?p=slepc&suite=experimental
i.e. https://buildd.debian.org/status/fetch.php?pkg=slepc&arch=i386&ver=3.8.2%2Bdfsg1-1exp1&stamp=1519726001&raw=0
A relevant snippet is
CXX installed-i386-linux-gnu-real/obj/src/sys/classes/fn/impls/fnutil.o
In file included from /usr/lib/petscdir/petsc3.8/i386-linux-gnu-real/include/petscsys.h:1960:0,
from /usr/lib/petscdir/petsc3.8/i386-linux-gnu-real/include/petscis.h:7,
from /usr/lib/petscdir/petsc3.8/i386-linux-gnu-real/include/petscvec.h:9,
from /usr/lib/petscdir/petsc3.8/i386-linux-gnu-real/include/petscmat.h:6,
from /<<BUILDDIR>>/slepc-3.8.2+dfsg1/include/slepcsys.h:34,
from /<<BUILDDIR>>/slepc-3.8.2+dfsg1/include/slepcfn.h:16,
from /<<BUILDDIR>>/slepc-3.8.2+dfsg1/include/slepc/private/fnimpl.h:14,
from /<<BUILDDIR>>/slepc-3.8.2+dfsg1/src/sys/classes/fn/impls/fnutil.c:14:
/usr/lib/gcc/i686-linux-gnu/7/include/xmmintrin.h: In function 'PetscErrorCode SlepcSetFlushToZero(unsigned int*)':
/usr/lib/gcc/i686-linux-gnu/7/include/xmmintrin.h:878:1: error: inlining failed in call to always_inline 'void _MM_SET_FLUSH_ZERO_MODE(unsigned int)': target specific option mismatch
_MM_SET_FLUSH_ZERO_MODE (unsigned int __mode)
...
/<<BUILDDIR>>/slepc-3.8.2+dfsg1/include/slepcmath.h:98:26: note: called from here
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
It seems to be saying there is something wrong in the way that
_MM_SET_FLUSH_ZERO_MODE from xmmintrin.h is being used on i386. It's
called by SlepcSetFlushToZero( ), a new function in slepc 3.8, at
slepc/include/slepcmath.h at l.98:
/*
SlepcSetFlushToZero - Set the FTZ flag in floating-point arithmetic.
*/
PETSC_STATIC_INLINE PetscErrorCode SlepcSetFlushToZero(unsigned int *state)
{
PetscFunctionBegin;
#if defined(PETSC_HAVE_XMMINTRIN_H)
#if defined(_MM_FLUSH_ZERO_ON)
*state = _MM_GET_FLUSH_ZERO_MODE();
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
#else
*state = 0;
#endif
#endif
PetscFunctionReturn(0);
}
xmmintrin.h is provided by libgcc-7-dev.
Does it mean i386 doesn't actually support FTZ (or _MM_FLUSH_ZERO_ON),
or does gcc need some C99 flags specified on i386 (or a bug fix)?
slepc 3.8 builds fine on all other arches.
It's in debian experimental,
or https://salsa.debian.org/science-team/slepc
Drew
Reply to: