[SciPy-Dev] scipy error compiling csr_wrap under Python 2.7

Bruce Southey bsouthey@gmail....
Thu Jul 8 10:55:25 CDT 2010


On 07/08/2010 06:33 AM, Ralf Gommers wrote:
>
>
> On Wed, Jul 7, 2010 at 5:27 AM, Bruce Southey <bsouthey@gmail.com 
> <mailto:bsouthey@gmail.com>> wrote:
>
>     Hi,
>     I failed to get the scipy 0.8 rc1 and SVN to build under Python2.7
>     with
>     numpy '2.0.0.dev8469' and gcc version 4.4.4 20100503 (Red Hat 4.4.4-2)
>     (GCC) . But scipy does compile with Python 2.6.
>
> If this is easy to fix on linux (and someone comes up with that fix) 
> it makes sense to do so. On OS X the problems are more serious and it 
> looks like they require changes to numpy.distutils first, so it's not 
> going to work with numpy 1.4.1 in any case. So full support for 2.7 on 
> all platforms is not going to happen for the 0.8.0 release.
>
> This is http://projects.scipy.org/scipy/ticket/1180 by the way.
>
> Ralf
>
>
>     building 'scipy.sparse.sparsetools._csr' extension
>     compiling C++ sources
>     C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g
>     -fwrapv
>     -O3 -Wall -fPIC
>
>     compile options:
>     '-I/usr/local/lib/python2.7/site-packages/numpy/core/include
>     -I/usr/local/include/python2.7 -c'
>     g++: scipy/sparse/sparsetools/csr_wrap.cxx
>     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
>     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
>
>     The error is possibly related the variable 'NPY_INTP_FMT' (defined in
>     numpy/core/include/numpy/ndarraytypes.h). A grep shows these files:
>     scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/coo_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>     scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/bsr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>     scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/numpy.i: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>     scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/csr_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>     scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/csc_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>     scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     size[i]);
>     scipy/sparse/sparsetools/dia_wrap.cxx: sprintf(s,"%" NPY_INTP_FMT ",",
>     array_size(ary,i));
>
>     Note that the scipy/sparse/sparsetools/numpy.i contains tabs in some
>     places instead of spaces.
>
>     The ndarraytypes.h is present in
>     /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/
>
>     Bruce
>
>
>
>     _______________________________________________
>     SciPy-Dev mailing list
>     SciPy-Dev@scipy.org <mailto:SciPy-Dev@scipy.org>
>     http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>    
Okay,
This is specific numpy error is not new just keeps returning!

Aug 2008:
http://www.mail-archive.com/numpy-discussion@scipy.org/msg11614.html

June 2009:
http://mail.scipy.org/pipermail/scipy-user/2009-June/021436.html


Scipy builds when make David's hack:
http://mail.scipy.org/pipermail/scipy-user/2009-June/021438.html

However, I do not know the specific cause.

Bruce

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100708/36bf59ea/attachment-0001.html 


More information about the SciPy-Dev mailing list