Building Python with icc on 64-bit Linux

Andrew MacIntyre andymac at bullseye.apana.org.au
Thu May 28 07:19:13 EDT 2009


Konrad Hinsen wrote:

> /home/shr/khinsen/tmp/Python-2.6.2/Modules/_ctypes/libffi/src/x86/ffi64.c(43): 
> \
> error: identifier "__int128_t" is undefined
>     __int128_t sse[MAX_SSE_REGS];
>     ^
> compilation aborted for 
> /home/shr/khinsen/tmp/Python-2.6.2/Modules/_ctypes/libf\
> fi/src/x86/ffi64.c (code 2)

That seems like a libffi configure failure (not properly handling 128bit
integers on this compiler/platform).

> and failed test:
> 
> test test_cmath failed -- Traceback (most recent call last):
>   File "/home/shr/khinsen/tmp/Python-2.6.2/Lib/test/test_cmath.py", line 
> 366, i\
> n test_specific_values
>     self.fail(error_message)
> AssertionError: acos0000: acos(complex(0.0, 0.0))
> Expected: complex(1.5707963267948966, -0.0)
> Received: complex(1.5707963267948966, 0.0)
> Received value insufficiently close to expected value.

I've seen this on other compilers/platforms.  The floating point support 
in 2.6 is being more rigorously tested.  This compiler/platform/math lib
doesn't seem to be explicitly handling -0.0 as different from 0.0.
test_math has other similar failures.

> Adding optimization yields even more failed tests. My configuration 
> options are:
> 
>     configure --prefix=$HOME CC=icc CXX=icc OPT=-O0
> 
> Did anyone encounter these problems before? Any solutions?

For the FP issues I wonder whether there's a compiler option that affects
how -0.0 is handled, or possibly a different math library?

The libffi issue would require delving into the libffi source and 
adjusting its configure script to properly handle the problematic case.
Unless you need ctypes, this may be something you can skip over...

-- 
-------------------------------------------------------------------------
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen ACT 2616
Web:    http://www.andymac.org/               |        Australia



More information about the Python-list mailing list