[pymvpa] Issues installing the libsvm wrapper
Emanuele Olivetti
emanuele at relativita.com
Wed Mar 7 15:19:12 UTC 2012
Hi
I am helping a colleague in installing PyMVPA on a Linux CentOS
- where the libraries/software are not very updated. So we started manually
installing Python2.7, NumPy1.6.1, SciPy0.10, Matplotlib1.1, nibabel and
all went well. We had the following issue while installing PyMVPA,
specifically on the libsvm wrapper part. Following doc/source/installation.rst
we did "make 3rd" and then "python setup.py build_ext" but the
second one failed on libsvm_wrap.cpp as reported below. Could it be
that the g++ compiler is a bit too old (g++ v4.1)? We tried also
"python setup.py build_ext --with-libsvm" with the same result.
Note that libsvm was not already installed on the system so we want
to use the one shipped with PyMVPA.
By the way we are using the latest tarball of PyMVPA from GitHub.
Best,
Emnauele
-----
$ make 3rd
/bin/sh: git: command not found
find 3rd -mindepth 1 -maxdepth 1 -type d | \
while read d; do \
[ -f "$d/Makefile" ] && make -C "$d" || :; \
done
make[1]: Entering directory
`/mnt/tier2/urihas/Software/local/src/PyMVPA-PyMVPA-cf805ce/3rd/libsvm'
mkdir -p ../../build/libsvm
touch prep-stamp
g++ -Wall -O2 -fPIC -c svm.cpp -o ../../build/libsvm/svm.o
ar cur ../../build/libsvm/libsvm.a ../../build/libsvm/svm.o
make[1]: Leaving directory
`/mnt/tier2/urihas/Software/local/src/PyMVPA-PyMVPA-cf805ce/3rd/libsvm'
touch 3rd-stamp
---------------------
$ python setup.py build_ext
running build_ext
running build_src
build_src
building extension "mvpa2.clfs.libsmlrc.smlrc" sources
building extension "mvpa2.clfs.libsvmc._svmc" sources
building data_files sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'mvpa2.clfs.libsvmc._svmc' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
compile options: '-I/usr/include/numpy -I3rd/libsvm
-I/mnt/tier2/urihas/Software/local/lib/python2.7/site-packages/numpy/core/include
-I/mnt/tier2/urihas/Software/local/include/python2.7 -c'
g++: 3rd/libsvm/svm.cpp
g++: build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘int
SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:2051: error: invalid
conversion from ‘const char*’ to ‘char*’
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘int
SWIG_AsCharPtrAndSize(PyObject*, char**, size_t*, int*)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:2862: error: cannot convert
‘int*’ to ‘Py_ssize_t*’ for argument ‘3’ to ‘int PyString_AsStringAndSize(PyObject*,
char**, Py_ssize_t*)’
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘void
SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:6322: error: invalid
conversion from ‘const char*’ to ‘char*’
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘int
SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:2051: error: invalid
conversion from ‘const char*’ to ‘char*’
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘int
SWIG_AsCharPtrAndSize(PyObject*, char**, size_t*, int*)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:2862: error: cannot convert
‘int*’ to ‘Py_ssize_t*’ for argument ‘3’ to ‘int PyString_AsStringAndSize(PyObject*,
char**, Py_ssize_t*)’
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp: In function ‘void
SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’:
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp:6322: error: invalid
conversion from ‘const char*’ to ‘char*’
error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-fPIC -I/usr/include/numpy -I3rd/libsvm
-I/mnt/tier2/urihas/Software/local/lib/python2.7/site-packages/numpy/core/include
-I/mnt/tier2/urihas/Software/local/include/python2.7 -c
build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.cpp -o
build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/mvpa2/clfs/libsvmc/svmc_wrap.o"
failed with exit status 1
More information about the Pkg-ExpPsy-PyMVPA
mailing list