ImportError ROOT undefined symbol: gCling

Hi,
When I run a python script, I get an error. I tried to configure Root with python, but I am not sure if I did it. I type python in my shell and the following

import sys
from ROOT import gROOT
Traceback (most recent call last):
File “”, line 1, in
File “ROOT.py”, line 24, in
import cppyy
File “cppyy.py”, line 60, in
import libPyROOT as _backend
ImportError: ./libPyROOT.so: undefined symbol: gCling

A similar question was asked on May 16, 2016 by another user but received no answer.

What should I do ?

Thanks

Hello,

It can be a configuration issue.
It would help if you could specify:

  • the operating system
  • the version of ROOT you are using
  • how you got it (i.e. your own build or precompiled binaries?)
  • what you did to configure your environment before trying what you posted

G Ganis

  • Ubuntu 14.04

  • Root 6.06/02 (5.34 is also installed.)

  • My own build (but I am not sure if I built it properly)

  • I did ./configure --enable-python --with-python-incdir=/usr/local/include/python2.7/ --with-python-libdir=/usr/lib/python2.7/config-x86_64-linux-gnu/
    and then make -j4 and source bin/thisroot.sh
    and defined export ROOTSYS, PATH and PYTHONPATH in my .bashrc

Hello,

You may be mixing things.

Can you try by removing ROOTSYS and PYTHONPATH from there? source bin/thisroot.sh should do what required, also for Python.

G Ganis

…and check whether your ROOT 6.06/02 actually has lib/libPyROOT.so - just because you enable it doesn’t necessarily mean that it gets built :-/

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.