[Scipy-tickets] [SciPy] #1322: 64 bit implementation fails compilation on NPY__INTP_FMT in csr_wrap.cxx

SciPy Trac scipy-tickets@scipy....
Thu Nov 4 19:55:21 CDT 2010


#1322: 64 bit implementation fails compilation on NPY__INTP_FMT in csr_wrap.cxx
----------------------+-----------------------------------------------------
 Reporter:  daktari3  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  0.9.0   
Component:  Other     |     Version:  0.8.0   
 Keywords:            |  
----------------------+-----------------------------------------------------
 I am trying to install numpy and scipy on a 64-bit Centos system.
 Compiling with Linux current compilers, gcc, g++, etc. and gfortran.
 Python 2.7.

 {{{
 Operating system        CentOS Linux 5.5
 Kernel and CPU  Linux 2.6.18-164.el5 on x86_64
 Processor information   Intel(R) Xeon(R) CPU X5550 @ 2.67GHz, 2 cores
 }}}

 lapack-3.2.2
 ATLAS3.9.32 compiled with -b 64 and -fFIP and based on tarfile of lapack
 above
 numpy-1.5.1rc1 looks like it installed OK

 Trying to install
 scipy-0.8.0

 It gets down to an error trying to compile csr_wrap.cxx, which contains
 two lines that seem to be invalid unless there is a substitution macro.
 The messages are below, but they are mysterious.

 The invalid code lines look like this:

 {{{
  sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i));
 }}}

 which is invalid. This was put in with Change Set #2502, 1/07/07, with the
 comment that it was necessary for 64-bit systems. The diff shows that it
 used to have "%d".

 A note on the internet mentions that this might work in Python 2.6, and
 the token NPY_INTP_FMT is defined in numpy/ndarraytypes.h.


 {{{
 scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments
 for format
 scipy/sparse/sparsetools/csr_wrap.cxx: In function ‘int
 require_size(PyArrayObject*, npy_intp*, int)’:
 scipy/sparse/sparsetools/csr_wrap.cxx:2910: error: expected `)' before
 ‘PRIdPTR’
 scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: spurious trailing ‘%’
 in format
 scipy/sparse/sparsetools/csr_wrap.cxx:2910: warning: too many arguments
 for format
 scipy/sparse/sparsetools/csr_wrap.cxx:2917: error: expected `)' before
 ‘PRIdPTR’
 scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: spurious trailing ‘%’
 in format
 scipy/sparse/sparsetools/csr_wrap.cxx:2917: warning: too many arguments
 for format
 error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g
 -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python2.7/site-
 packages/numpy/core/include -I/usr/local/include/python2.7 -c
 scipy/sparse/sparsetools/csr_wrap.cxx -o
 build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/csr_wrap.o" failed
 with exit status 1

 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1322>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list