Compilation with Intel icc 11.1 fails

David Chin david.w.h.chin@gmail.com
Fri Dec 23 15:43:00 GMT 2011


I discovered this while trying to compile Python-2.7.2 with icc 11.1,
so I downloaded libffi-3.0.10 separately and tried compiling that. The
compilation fails with this:

    libtool: compile:  icc -DHAVE_CONFIG_H -I. -I.. -I. -I../include
-Iinclude -I../src -g -O3 -ansi_alias -Wall -fexceptions -MT
src/x86/ffi64.lo -MD -MP -MF src/x86/.deps/ffi64.Tpo -c
../src/x86/ffi64.c  -fPIC -DPIC -o src/x86/.libs/ffi64.o
    ../src/x86/ffi64.c(44): error: identifier "__int128_t" is undefined
        __int128_t sse[MAX_SSE_REGS];
        ^

I found an old thread from 2009 discussing this:
    http://sourceware.org/ml/libffi-discuss/2009/msg00051.html

I also found a post at Intel's forum suggesting a workaround:
    http://software.intel.com/en-us/forums/showthread.php?t=56652

> Engineering team is still working on this feature.  Here is a workaround:
>
> do
>
> typedef struct { int64_t m[2]; } __int128_t;
>
> and then change where the uint64_t is assigned to this to be:
>
> sse[x].m[0] = *(uint64_t*) v;
> sse[x].m[1] = 0;
>
> and where the uint32_t is assigned to:
>
> sse[x].m[0] = *(uint32_t*) v;
> sse[x].m[1] = 0;

Are there plans to modify libffi to work around this deficiency in Intel icc?

Thanks!
--Dave Chin
Email: david.w.h.chin AT gmail.com
http://www.wfu.edu/~chindw/Work



More information about the Libffi-discuss mailing list