Thanks to visit codestin.com
Credit goes to github.com

Skip to content

error npy_cdouble definition is not compatible with C99 complex definition (Trac #1337) #1935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thouis opened this issue Oct 19, 2012 · 5 comments

Comments

@thouis
Copy link
Contributor

thouis commented Oct 19, 2012

Original ticket http://projects.scipy.org/numpy/ticket/1337 on 2009-12-18 by trac user mayzel, assigned to unknown.

I've got the following errors after manual installation of numpy-1.4.0rc1

/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/npy_common.h:120:2: #error npy_cdouble definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/npy_common.h:127:2: #error npy_cfloat definition is not compatible with C99 complex definition ! Please contact Numpy maintainers and give detailed information about your compiler and platform
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/npy_common.h:134:2: #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 /home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:1258,
from /home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/arrayobject.h:14,
from cov.c:144:
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h: In function _import_array': /home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1202: error:NPY_ABI_VERSION' undeclared (first use in this function)
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1202: error: (Each undeclared identifier is reported only once
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1202: error: for each function it appears in.)
/home/nmr5/local/lib/python2.6/site-packages/numpy/core/include/numpy/__multiarray_api.h:1208: error: `NPY_API_VERSION' undeclared (first use in this function

Python version and numpy configuration are:
Python 2.6.4 (r264:75706, Dec 14 2009, 16:29:30)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import numpy
numpy.show_config()
atlas_threads_info:
libraries = ['lapack', 'clapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/home/nmr5/local/lib/']
language = f77
include_dirs = ['/home/nmr5/local/include']

blas_opt_info:
libraries = ['clapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/home/nmr5/local/lib/']
define_macros = [('ATLAS_INFO', '""3.9.19""')]
language = c
include_dirs = ['/home/nmr5/local/include']

atlas_blas_threads_info:
libraries = ['clapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/home/nmr5/local/lib/']
language = c
include_dirs = ['/home/nmr5/local/include']

lapack_opt_info:
libraries = ['lapack', 'clapack', 'f77blas', 'cblas', 'atlas']
library_dirs = ['/home/nmr5/local/lib/']
define_macros = [('ATLAS_INFO', '""3.9.19""')]
language = f77
include_dirs = ['/home/nmr5/local/include']

lapack_mkl_info:
NOT AVAILABLE

blas_mkl_info:
NOT AVAILABLE

mkl_info:
NOT AVAILABLE

gcc is
[email protected]:/home/nmr5/sampler> gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)

I'm using CentOS release 4.5 (Final) on cluster with
Linux version 2.6.9-55.ELsmp ([email protected]) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)) #1 SMP Wed May 2 14:04:42 EDT 2007

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@rgommers wrote on 2011-03-30

This looks like a build issue.

Pauli, CC'ing you as the resident C99 expert.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

Milestone changed to Unscheduled by @rgommers on 2011-03-30

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@pv wrote on 2011-03-30

The GCC version is quite venerable. Quickest fix would be to upgrade it.

The error message seems a bit misleading, since, reading numpy/core/setup.py, as far as I see this doesn't have much to do with C99 -- it's just a check to ensure that sizeof(struct { float_t real; float_t imag; }) == 2*sizeof(float_t). Essentially all Numpy functions dealing with complex numbers assume this.

One could maybe supplement Numpy's complex definitions with some (compiler-specific) packing pragmas. I'm not sure it would be enough, though.

@thouis
Copy link
Contributor Author

thouis commented Oct 19, 2012

@rgommers wrote on 2011-03-30

Sounds like that's effort better spent elsewhere. Close as wontfix?

@charris
Copy link
Member

charris commented Feb 18, 2014

Closing.

@charris charris closed this as completed Feb 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants