ROOT 5.32 build error with Python 2.7.2

Dear all,

when trying to build ROOT version 5.32 with PyROOT support and Python 2.7.2 on a 64-bit Ubuntu 10.04 machine, I encountered the following error which causes further errors and hence “make” to stop:

/d5/Python-2.7.2/python: In function _fini': (.fini+0x0): multiple definition of_fini’
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/…/…/…/…/lib/crti.o:(.fini+0x0): first defined here
/d5/Python-2.7.2/python: In function _edata': (*ABS*+0x601020): multiple definition of__bss_start’
/d5/Python-2.7.2/python: In function _end': (*ABS*+0x601030): multiple definition of_end’
/d5/Python-2.7.2/python: In function _edata': (*ABS*+0x601020): multiple definition of_edata’
/d5/Python-2.7.2/python: In function _init': (.init+0x0): multiple definition of_init’
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/…/…/…/…/lib/crti.o:(.init+0x0): first defined here
/usr/bin/ld: error in /d5/Python-2.7.2/python(.eh_frame); no .eh_frame_hdr table will be created.

This happens after the following make lines:

g++ -shared -Wl,-soname, -m64 -O2 -Wl,–no-undefined -o lib/ bindings/pyroot/src/Adapters.o bindings/pyroot/src/ClassMethodHolder.o bindings/pyroot/src/ConstructorHolder.o bindings/pyroot/src/Converters.o bindings/pyroot/src/Executors.o bindings/pyroot/src/FunctionHolder.o bindings/pyroot/src/MemoryRegulator.o bindings/pyroot/src/MethodHolder.o bindings/pyroot/src/MethodProxy.o bindings/pyroot/src/ObjectProxy.o bindings/pyroot/src/PropertyProxy.o bindings/pyroot/src/PyBufferFactory.o bindings/pyroot/src/PyRootType.o bindings/pyroot/src/PyStrings.o bindings/pyroot/src/Pythonize.o bindings/pyroot/src/RootModule.o bindings/pyroot/src/RootWrapper.o bindings/pyroot/src/TCustomPyTypes.o bindings/pyroot/src/TemplateProxy.o bindings/pyroot/src/TPyClassGenerator.o bindings/pyroot/src/TPyDispatcher.o bindings/pyroot/src/TPyException.o bindings/pyroot/src/TPyFitFunction.o bindings/pyroot/src/TPyReturn.o bindings/pyroot/src/TPyROOTApplication.o bindings/pyroot/src/TPySelector.o bindings/pyroot/src/TPython.o bindings/pyroot/src/TRflxCallback.o bindings/pyroot/src/TSetItemHolder.o bindings/pyroot/src/Utility.o bindings/pyroot/src/G__PyROOT.o -Llib -lRIO -lHist -lGraf -lGraf3d -lGpad -lTree -lMatrix -lNet -lThread -lMathCore -lCore -lCint /d5/Python-2.7.2/python -Llib -lCore -lCint -ldl

Any idea what I could do about this? Thanks for your help!



never seen this before, but it looks to me that the build is linking with the executable (python) rather than the shared library ( I can’t think of how that could be possible.

What input did you supply to the configure script?


Hi Wim, thanks for your answer!

I started the config script with the options
–enable-minuit2 --enable-roofit --with-python-incdir=/d5/Python-2.7.2/Include --with-python-libdir=/d5/Python-2.7.2

and part of its output was
Checking for Python.h … /d5/Python-2.7.2/Include
Checking for python2.6, libpython2.6, libpython, python, or Python … /d5/Python-2.7.2

Indeed, there’s a binary “python” in the Python main directory /d5/Python-2.7.2, and no or, but instead. Maybe that’s why the build tried to link the executable, although I don’t see why this should be an option.

Anyway: After making a symlink called libpython.s to (and removing the “python” binary, since there’s another one in the /bin directory), the build went on fine and everything seems to work. Hence: thanks again for your help!