[MMTK] netCDF problem during installation

Ramon Crehuet rcrehuet at gmail.com
Fri Jan 25 18:43:55 UTC 2008


Dear all,
I'm having a problem during the installation of Scientific. When buiding I
get:

Using netCDF installation in  /usr
/usr/lib/python2.5/distutils/dist.py:263: UserWarning: Unknown distribution
option: 'options'
  warnings.warn(msg)
running build
running build_py
running build_ext
building 'Scientific_netcdf' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mtune=i686
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -fPIC
-IInclude -I/usr/include -I/usr/include/python2.5 -c Src/Scientific_netcdf.c
-o build/temp.linux-i686-2.5/Src/Scientific_netcdf.o
Src/Scientific_netcdf.c:19:33: error: Numeric/arrayobject.h: No such file or
directory
In file included from Src/Scientific_netcdf.c:25:
Include/Scientific/netcdfmodule.h:235: error: expected '=', ',', ';', 'asm'
or '__attribute__' before '*' token
Src/Scientific_netcdf.c:187: error: 'PyArray_SBYTE' undeclared here (not in
a function)
Src/Scientific_netcdf.c:189: error: 'PyArray_CHAR' undeclared here (not in a
function)
Src/Scientific_netcdf.c:190: error: 'PyArray_SHORT' undeclared here (not in
a function)
Src/Scientific_netcdf.c:191: error: 'PyArray_INT' undeclared here (not in a
function)
Src/Scientific_netcdf.c:192: error: 'PyArray_FLOAT' undeclared here (not in
a function)
Src/Scientific_netcdf.c:193: error: 'PyArray_DOUBLE' undeclared here (not in
a function)
Src/Scientific_netcdf.c: In function 'typecode':
Src/Scientific_netcdf.c:349: error: 'PyArray_UBYTE' undeclared (first use in
this function)
Src/Scientific_netcdf.c:349: error: (Each undeclared identifier is reported
only once
Src/Scientific_netcdf.c:349: error: for each function it appears in.)
Src/Scientific_netcdf.c:361: error: 'PyArray_LONG' undeclared (first use in
this function)
Src/Scientific_netcdf.c: In function 'netcdf_type_from_type':
Src/Scientific_netcdf.c:429: error: 'PyArray_UBYTE' undeclared (first use in
this function)
Src/Scientific_netcdf.c:443: error: 'PyArray_LONG' undeclared (first use in
this function)
Src/Scientific_netcdf.c: In function 'collect_attributes':
Src/Scientific_netcdf.c:477: warning: comparison between pointer and integer
Src/Scientific_netcdf.c:500: warning: implicit declaration of function
'PyArray_FromDims'
Src/Scientific_netcdf.c:500: warning: initialization makes pointer from
integer without a cast
Src/Scientific_netcdf.c:505: error: 'PyArrayObject' undeclared (first use in
this function)
Src/Scientific_netcdf.c:505: error: expected expression before ')' token
Src/Scientific_netcdf.c:505: error: invalid operands to binary *
Src/Scientific_netcdf.c:505: error: request for member 'data' in something
not a structure or union
Src/Scientific_netcdf.c:508: warning: implicit declaration of function
'PyArray_Return'
Src/Scientific_netcdf.c:508: error: expected expression before ')' token
Src/Scientific_netcdf.c:508: error: invalid operands to binary *
Src/Scientific_netcdf.c:508: warning: assignment makes pointer from integer
without a cast
Src/Scientific_netcdf.c: In function 'set_attribute':
Src/Scientific_netcdf.c:554: error: 'PyArrayObject' undeclared (first use in
this function)
Src/Scientific_netcdf.c:554: error: 'array' undeclared (first use in this
function)
Src/Scientific_netcdf.c:554: error: invalid operands to binary *
Src/Scientific_netcdf.c:555: error: expected expression before ')' token
Src/Scientific_netcdf.c:555: error: invalid operands to binary *
Src/Scientific_netcdf.c:555: warning: statement with no effect
Src/Scientific_netcdf.c:557: error: request for member 'nd' in something not
a structure or union
Src/Scientific_netcdf.c:557: error: request for member 'dimensions' in
something not a structure or union
Src/Scientific_netcdf.c:558: error: request for member 'descr' in something
not a structure or union
Src/Scientific_netcdf.c:558: error: request for member 'type' in something
not a structure or union
Src/Scientific_netcdf.c:558: warning: passing argument 1 of
'netcdf_type_from_code' makes integer from pointer without a cast
Src/Scientific_netcdf.c:559: error: request for member 'descr' in something
not a structure or union
Src/Scientific_netcdf.c:559: error: request for member 'type_num' in
something not a structure or union
Src/Scientific_netcdf.c:559: warning: comparison between pointer and integer
Src/Scientific_netcdf.c:560: error: 'array2' undeclared (first use in this
function)
Src/Scientific_netcdf.c:560: error: invalid operands to binary *
Src/Scientific_netcdf.c:560: error: expected expression before ')' token
Src/Scientific_netcdf.c:560: error: invalid operands to binary *
Src/Scientific_netcdf.c:561: warning: statement with no effect
Src/Scientific_netcdf.c:562: error: request for member 'ob_refcnt' in
something not a structure or union
Src/Scientific_netcdf.c:562: error: lvalue required as decrement operand
Src/Scientific_netcdf.c:563: warning: statement with no effect
Src/Scientific_netcdf.c:569: error: request for member 'data' in something
not a structure or union
Src/Scientific_netcdf.c: In function 'netcdf_file_init':
Src/Scientific_netcdf.c:776: warning: passing argument 4 of 'nc_inq_dim'
from incompatible pointer type
Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_value':
Src/Scientific_netcdf.c:1349: warning: implicit declaration of function
'PyNetCDFVariable_ReadAsArray'
Src/Scientific_netcdf.c:1349: warning: return makes pointer from integer
without a cast
Src/Scientific_netcdf.c: At top level:
Src/Scientific_netcdf.c:1528: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '*' token
Src/Scientific_netcdf.c: In function 'PyNetCDFVariable_ReadAsString':
Src/Scientific_netcdf.c:1647: warning: comparison between pointer and
integer
Src/Scientific_netcdf.c: In function 'PyNetCDFVariable_WriteArray':
Src/Scientific_netcdf.c:1687: error: 'PyArrayObject' undeclared (first use
in this function)
Src/Scientific_netcdf.c:1687: error: 'array' undeclared (first use in this
function)
Src/Scientific_netcdf.c:1687: error: invalid operands to binary *
Src/Scientific_netcdf.c:1687: warning: statement with no effect
Src/Scientific_netcdf.c:1741: error: expected expression before ')' token
Src/Scientific_netcdf.c:1741: error: invalid operands to binary *
Src/Scientific_netcdf.c:1741: warning: statement with no effect
Src/Scientific_netcdf.c:1750: error: request for member 'data' in something
not a structure or union
Src/Scientific_netcdf.c:1782: error: request for member 'nd' in something
not a structure or union
Src/Scientific_netcdf.c:1782: warning: assignment makes integer from pointer
without a cast
Src/Scientific_netcdf.c:1789: error: request for member 'dimensions' in
something not a structure or union
Src/Scientific_netcdf.c:1792: error: request for member 'dimensions' in
something not a structure or union
Src/Scientific_netcdf.c:1793: error: request for member 'dimensions' in
something not a structure or union
Src/Scientific_netcdf.c:1794: error: request for member 'dimensions' in
something not a structure or union
Src/Scientific_netcdf.c:1823: error: request for member 'data' in something
not a structure or union
Src/Scientific_netcdf.c:1863: error: request for member 'ob_refcnt' in
something not a structure or union
Src/Scientific_netcdf.c:1863: error: lvalue required as decrement operand
Src/Scientific_netcdf.c: In function 'PyNetCDFVariable_WriteString':
Src/Scientific_netcdf.c:1879: warning: comparison between pointer and
integer
Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_item':
Src/Scientific_netcdf.c:1919: warning: return makes pointer from integer
without a cast
Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_slice':
Src/Scientific_netcdf.c:1937: warning: return makes pointer from integer
without a cast
Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_subscript':
Src/Scientific_netcdf.c:1960: warning: return makes pointer from integer
without a cast
Src/Scientific_netcdf.c:1997: warning: return makes pointer from integer
without a cast
Src/Scientific_netcdf.c: In function 'initScientific_netcdf':
Src/Scientific_netcdf.c:2235: warning: implicit declaration of function
'import_array'
Src/Scientific_netcdf.c:2256: error: 'PyNetCDFVariable_ReadAsArray'
undeclared (first use in this function)
error: command 'gcc' failed with exit status 1


But I believe netCDF was found during Scientific compilation, and there is
/usr/include/netcdf.h and /usr/lib/libnetcdf.so. So I do not know what is
going wrong.

A final information. I have used:
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Numeric-23.8.2
ScientificPython-2.7.8
netcdf 4.0.0

Thanks for your help!
Cheers,
Ramon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://starship.python.net/pipermail/mmtk/attachments/20080125/5a7f9b44/attachment.htm 


More information about the mmtk mailing list