Hi, I cannot install the latest scipy (r2500) due to g++: Lib/sparse/sparsetools/sparsetools_wrap.cxx Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2000: Fehler: ungültige Umwandlung von »const char*« in »char*« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int require_size(PyArrayObject*, int*, int)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2677: Warnung: format »%d« erwartet Typ »int«, aber Argument 3 hat Typ »long int« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:21614: Fehler: ungültige Umwandlung von »const char*« in »char*« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2000: Fehler: ungültige Umwandlung von »const char*« in »char*« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int require_size(PyArrayObject*, int*, int)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2677: Warnung: format »%d« erwartet Typ »int«, aber Argument 3 hat Typ »long int« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:21614: Fehler: ungültige Umwandlung von »const char*« in »char*« error: Command "g++ -pthread -fno-strict-aliasing -DNDEBUG -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC -I/usr/local/lib64/python2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c Lib/sparse/sparsetools/sparsetools_wrap.cxx -o build/temp.linux-x86_64-2.5/Lib/sparse/sparsetools/sparsetools_wrap.o" failed with exit status 1 Nils
On 1/6/07, Nils Wagner <nwagner@iam.uni-stuttgart.de> wrote:
Hi,
I cannot install the latest scipy (r2500) due to
g++: Lib/sparse/sparsetools/sparsetools_wrap.cxx Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2000: Fehler: ungültige Umwandlung von »const char*« in »char*« Lib/sparse/sparsetools/sparsetools_wrap.cxx: In function »int require_size(PyArrayObject*, int*, int)«: Lib/sparse/sparsetools/sparsetools_wrap.cxx:2677: Warnung: format »%d« erwartet Typ »int«, aber Argument 3 hat Typ »long int«
This appears to be a problem with require_size() in numpy.i http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/sparse/sparsetools/n... The sparsetools numpy.i was taken from the file of the same name in the numpy/doc/swig http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/doc/swig/numpy.i The problem seems to be that require_size() assumes npy_intp to be a C int, but on other platforms it may be a long int. I think what we really want here is NPY_INTP_FMT which is #defined correctly. http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/core/include/numpy... I'm not completely comfortable with the magic in numpy.i, so I'll wait for others to weigh-in before making any changes. -- Nathan Bell wnbell@gmail.com
I've made the necessary changes to numpy.i and regenerated sparsetools_wrap.cxx in ver 2502. Please let us know if that clears things up. -- Nathan Bell wnbell@gmail.com
Nathan Bell wrote:
I've made the necessary changes to numpy.i and regenerated sparsetools_wrap.cxx in ver 2502. Please let us know if that clears things up.
Please use SWIG CVS to generate those files. Most of the errors that Nils reported are from non-const-preserving assignments in the SWIG runtime functions. g++ 4 is stricter about those than g++ 3. SWIG CVS corrects those problems. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
On 1/7/07, Robert Kern <robert.kern@gmail.com> wrote:
Please use SWIG CVS to generate those files. Most of the errors that Nils reported are from non-const-preserving assignments in the SWIG runtime functions. g++ 4 is stricter about those than g++ 3. SWIG CVS corrects those problems.
Hrm, I've had no problems with mine[1], even g++ -Wall runs silently on sparsetools_wrap.cxx. Anyway, thanks for the heads-up. I've regenerated the files w/ SWIG 1.3.32 (current SVN version). [1] g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) -- Nathan Bell wnbell@gmail.com
Nathan Bell wrote:
On 1/7/07, Robert Kern <robert.kern@gmail.com> wrote:
Please use SWIG CVS to generate those files. Most of the errors that Nils reported are from non-const-preserving assignments in the SWIG runtime functions. g++ 4 is stricter about those than g++ 3. SWIG CVS corrects those problems.
Hrm, I've had no problems with mine[1], even g++ -Wall runs silently on sparsetools_wrap.cxx.
Anyway, thanks for the heads-up. I've regenerated the files w/ SWIG 1.3.32 (current SVN version).
[1] g++ (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
Maybe they backed off after 4.0. i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) Anyways, thank you. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (3)
-
Nathan Bell -
Nils Wagner -
Robert Kern