GCC failure when updating from 1.1.0 to 1.1.1

Not sure if this is an issue with an out-of-date GCC or if something else is wrong. I’ve got 1.1.0 on no problem.

$python setup.py build


gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/software/Python/272/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/software/Python/272/include/python2.7 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.7/src/ft2font.o

In file included from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:7,
from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,

             from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:14,
             from src/ft2font.cpp:7:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:120:2: error: #error npy_cdouble definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:127:2: error: #error npy_cfloat definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:134:2: error: #error npy_clongdouble definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

In file included from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:26,
from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:14,

             from src/ft2font.cpp:7:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h: In function ‘int _import_array()’:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1226: error: ‘NPY_ABI_VERSION’ was not declared in this scope

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1232: error: ‘NPY_API_VERSION’ was not declared in this scope

error: command ‘gcc’ failed with exit status 1

$ gcc --version

gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)
Copyright © 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards,
Joseph David Borġ
http://www.jdborg.com

Joe,

This appears to be a problem with NumPy. I would suggest sending this email to the numpy-discussion list. Be sure to include detailed information about your compiler, OS, and your machine.

Cheers!
Ben Root

···

On Wed, Aug 22, 2012 at 12:31 PM, Joe Borġ <mail@…4179…> wrote:

Not sure if this is an issue with an out-of-date GCC or if something else is wrong. I’ve got 1.1.0 on no problem.

$python setup.py build


gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/software/Python/272/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/software/Python/272/include/python2.7 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.7/src/ft2font.o

In file included from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:7,
from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,

             from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:14,
             from src/ft2font.cpp:7:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:120:2: error: #error npy_cdouble definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:127:2: error: #error npy_cfloat definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:134:2: error: #error npy_clongdouble definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform

In file included from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:26,
from /software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:14,

             from src/ft2font.cpp:7:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h: In function ‘int _import_array()’:

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1226: error: ‘NPY_ABI_VERSION’ was not declared in this scope

/software/Python/272/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1232: error: ‘NPY_API_VERSION’ was not declared in this scope

error: command ‘gcc’ failed with exit status 1

$ gcc --version

gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)
Copyright © 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.