Make error with python

Hello ROOT experts,

I have a problem when building ROOT 6 with python, when doing make I get:

bindings/pyroot/src/Pythonize.o: In function `(anonymous namespace)::StlSequenceIter(_object*)': Pythonize.cxx:(.text+0x10d6): undefined reference to `PyUnicodeUCS4_FromString' collect2: error: ld returned 1 exit status /home/wesmail/EXO/root-6.06.08/bindings/pyroot/Module.mk:97: recipe for target 'lib/libPyROOT.so' failed make: *** [lib/libPyROOT.so] Error 1 make: *** Waiting for unfinished jobs....

I did ./configure --enable-python --with-python-incdir=/usr/include/python2.7/ --with-python-libdir=/usr/local/lib/ --enable-mathcore --enable-mathmore --enable-roofit --enable-minuit2 --enable-gdml --enable-table

and this is the ouput of configure [code]Checking for source directory … /home/wesmail/EXO/root-6.06.08
Configuring for linuxx8664gcc
INFO: --enable-python: already enabled by default.
WARNING: option --enable-mathcore is deprecated and ignored!
INFO: --enable-mathmore: already enabled by default.
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … gcc
Checking for C++ compiler … g++
Checking for linker (LD) … g++
Checking for F77 compiler … gfortran
Checking whether compiler can generate dependencies … yes
Checking whether c++11 mode is supported … yes
Checking for string_view implementation … using builtin string_view
Checking for Python version >= 2.7 … yes
Checking for libX11 … /usr/lib64
Checking for X11/Xlib.h … /usr/include
Checking for X11/xpm.h … /usr/include
Checking for X11/Xft/Xft.h … /usr/include
Checking for X11/extensions/shape.h … /usr/include
Checking for libXpm … /usr/lib64
Checking for libXft … /usr/lib64
Checking for libXext … /usr/lib64
Checking for freetype-config … /usr/bin/freetype-config
Checking for libfreetype version >= 9.3.0 … ok
Checking whether to build included libfreetype6 … no
Checking for pcre-config … /usr/bin/pcre-config
Checking for libpcre version >= 3.9 … ok
Checking whether to build included libpcre … no
Checking for zlib.h … /usr/include
Checking for libz … /usr/lib64
Checking whether to build included zlib … no
Checking for lzma.h … /usr/include
Checking for liblzma … /usr/lib64
Checking whether to build included lzma … no
Checking for GL/gl.h, or gl.h … /usr/include
Checking for libGL, or libMesaGL … /usr/lib64
Checking for libGLU, or libMesaGLU … /usr/lib64
Checking for GL/glew.h … /usr/include
Checking for libGLEW … /usr/lib64
Checking whether to build included GLEW … no
Checking for pkg-config … /usr/bin/pkg-config
Checking for libftgl … ok
Checking for ftgl version > 2.1.2 … ok
Checking whether to build included libftgl … no
Checking for mysql_config … /usr/bin/mysql_config
Checking for libmysqlclient version >= 3.23.* … ok
Checking for mysql.h … /usr/include/mysql
Checking for occi.h … no
Checking for libclntsh, or oci … no
Checking for libocci, or oraocci10 … no
Checking for libpq-fe.h … no
Checking for libpq … no
Checking for sqlite3.h … no
Checking for libsqlite3 … no
Checking for sql.h … no
Checking for libsqlod … no
Checking for sqlext.h … no
Checking for libiodbc, libodbc, or odbc32 … /usr/lib64
Checking for rfio_api.h … no
Checking for librfio, libdpm, libcastorrfio, libshift, shiftmd, or shift … no
Checking for rfio_api.h … no
Checking for stager_api.h … no
Checking for libcastorrfio, libshift, shiftmd, or shift … no
Checking for gfal_api.h … no
Checking for libgfal … no
Checking for gfal_srm_ifce_types.h … no
Checking for ApMon.h … no
Checking for libapmoncpp … no
Checking for fftw3.h … /usr/include
Checking for libfftw3, or libfftw3-3 … /usr/lib64
Checking for fitsio.h … /usr/include/cfitsio
Checking for libcfitsio, or cfitsio … /usr/lib64
Checking for gvc.h … /usr/include/graphviz
Checking for libgvc, or gvc … /usr/lib64
Checking for libgraph, graph, libcgraph, or cgraph … /usr/lib64
Checking for libcdt, or cdt … /usr/lib64
Checking for libpathplan, or pathplan … /usr/lib64
Checking for libexpat, or expat … /usr/lib64
Checking for libgvplugin_dot_layout, or gvplugin_dot_layout … /usr/lib64/graphviz
Checking for libPythia6 … no
Checking for Pythia8/Pythia.h … no
Checking for libpythia8 … no
Checking for dcap.h … no
Checking for libdcap … no
Checking for davix.hpp … no
Checking for libdavix … no
Checking for chirp_reli.h … no
Checking for libchirp_client … no
Checking for hdfs.h … no
Checking for jni.h … no
Checking for libhdfs … no
Checking for libjvm … no
Checking for dns_sd.h … /usr/include
Checking for libdns_sd … /usr/lib64
Checking for avahi-client/client.h … /usr/include
Checking for avahi-common/strlst.h … /usr/include
Checking for avahi-core/core.h … /usr/include
Checking for libavahi-client … /usr/lib64
Checking for libavahi-common … /usr/lib64
Checking for libavahi-core … /usr/lib64
Checking for libglite-api-wrapper … no
Checking for gapiUI.h … no
Checking for libgapiUI … no
Checking for jpeglib.h … no
Checking for png.h … /usr/include
Checking for tiffio.h … no
Checking for libjpeg … no
Checking for libtiff … no
Checking for libz … /usr/lib64
Checking for libpng … /usr/lib64
Checking whether to build included libAfterImage … yes
Checking for ldap.h … /usr/include
Checking for libldap … /usr/lib64
Checking for liblber … /usr/lib64
Checking for PyROOT prerequisites … yes
Checking for Python.h … /usr/include/python2.7/
Checking for python2.7, libpython2.7, libpython, python, or Python … /usr/local/lib/
Checking for xml2-config … /usr/bin/xml2-config
Checking for libxml2 version >= 2.4.x … ok
Checking for XrdVersion.hh … no
Checking for libssl … /usr/lib64
Checking for libcrypto … /usr/lib64
Checking for openssl/bio.h … /usr/include
Checking for openssl/blowfish.h … /usr/include
Checking for openssl/err.h … /usr/include
Checking for openssl/pem.h … /usr/include
Checking for openssl/rand.h … /usr/include
Checking for openssl/rsa.h … /usr/include
Checking for t_server.h … no
Checking for libsrp … no
Checking for libgmp … /usr/lib64
Checking for libmisc … no
Checking for pwauth.h … no
Checking for krb5.h … /usr/include
Checking for krb5.h redirect … /usr/include/krb5/krb5.h
Checking for krb5_c_valid_cksumtype in krb5.h … yes
Checking for valid_cksumtype in krb5.h … no
Checking for libk5crypto … /usr/lib64
Checking whether we’re using MIT Kerberos … yes
Checking for krb5_c_valid_cksumtype in /usr/lib64/libk5crypto.so … ok
Checking for valid_cksumtype in /usr/lib64/libk5crypto.so … ok
Checking for libkrb5 … /usr/lib64
Checking for kinit … /usr/bin/kinit
Checking for libcom_err … /usr/lib64
Checking for shadow passwords … yes
Checking for gsl/gsl_version.h … /usr/include
Checking for GSL version >= 1.10 … ok
Checking for libgsl, gslML, or gsl … /usr/lib64
Checking for libgslcblas, gslcblasML, gslcblas, or cblas … /usr/lib64
Checking whether to build libMathMore … yes
Checking whether to build libRInterface … no
Checking whether to build libGenVector … yes
Checking whether to build libRooFit … yes
Checking whether to build libMinuit2 … yes
Checking whether to build libUnuran … no
Checking whether to build libVc … no
Checking whether to install VDT … yes
Checking whether to build libGdml … yes
Checking whether to build libTable … yes
Checking whether to build libTMVA … yes
Checking whether to build libRHTTP … no
Checking whether to build libMemStat … yes
Checking whether to build afdsmgrd … no
Checking whether setresuid declared in /usr/include/unistd.h … yes
Writing config/Makefile.config … done
Writing config/Makefile.comp … done
Writing include/RConfigure.h … done
Writing include/RConfigOptions.h … done
Writing bin/root-config … done
Writing etc/system.rootrc … done
Writing etc/system.rootauthrc … done
Writing etc/system.rootdaemonrc … done
Writing etc/root.mimes … done
Writing etc/daemons/rootd.rc.d … done
Writing etc/daemons/rootd.xinetd … done
Writing etc/daemons/proofd.rc.d … done
Writing etc/daemons/proofd.xinetd … done
Writing main/src/proofserv.sh … done
Writing main/src/roots.sh … done
Writing bin/memprobe … done
Writing build/misc/root-help.el … done
Writing macros/html.C … done
Writing bin/thisroot.sh … done
Writing bin/thisroot.csh … done
Writing bin/setxrd.sh … done
Writing bin/setxrd.csh … done
Writing config.status … done

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_llvm, explicitlink, fftw3, fitsio, gviz, gdml, genvector, krb5, ldap, mathmore, memstat, minuit2, mysql, opengl, python, roofit, search_usrlocal, shadowpw, shared, ssl, table, tmva, vdt, x11, xft, xml.

To build ROOT type:

make

[/code]

I use fedora 23, ROOT6.06.08

Thank You in Adcance

Can you please test if you have the same/similar error when building with CMake. See instructions at root.cern.ch/building-root

Hi,

the unicode scheme to use is a Python build-time configuration option. Missing ‘PyUnicodeUCS4_FromString’ means your Python.h and libpython.so don’t match.

You do: "–with-python-incdir=/usr/include/python2.7/ --with-python-libdir=/usr/local/lib/ " meaning that you pick Python.h from the system Python, and libpython.so from a later installed local Python. Either pick both from /usr or both from /usr/local. Don’t mix them.

Cheers,
Wim