[SciPy-User] Compiling scipy.sparse.sparsetools extension throws g++ internal error&In-Reply-To=

Ralf Gommers ralf.gommers at googlemail.com
Sun Oct 24 20:09:35 EDT 2010


On Sun, Oct 24, 2010 at 7:24 AM, Krzysztof Bartoszek <krzbar at chalmers.se> wrote:
> Hi,
>
> I don't know whether anyone has done any follow up since March but I came across the exact same problem whilst installing scipy 0.8.0 under Python 2.7, the error output I got was :

This was fixed just after 0.8.0 was released, please try the 0.8.x
branch from svn.

Cheers,
Ralf

>
> 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
>
> Disabling the sparse package worked as said in the previous message, but I managed to identify the lines which cause the problem :
> They are
>  sprintf(s,"%" NPY_INTP_FMT ",", size[i]);
> and
>  sprintf(s,"%" NPY_INTP_FMT ",", array_size(ary,i));
> in the function
> int require_size(PyArrayObject* ary, npy_intp* size, int n)
> in the files  :
> scipy/sparse/sparsetools/csc_wrap.cxx
> scipy/sparse/sparsetools/coo_wrap.cxx
> scipy/sparse/sparsetools/bsr_wrap.cxx
> scipy/sparse/sparsetools/dia_wrap.cxx
> scipy/sparse/sparsetools/csr_wrap.cxx
> Commenting these two lines in these files makes scipy build fine, though I have not run it so I don't know what effect this will have on the functionality.
> I hope this helps someone and is useful.
>
> Cheers
>
> Krzysztof
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list