Skip to content

ROOT: use unversioned cppyy library

A recent ROOT commit removed the versioning of cppyy libraries, the custom environment variable is not necessary anymore.

See https://github.com/root-project/root/pull/14703

Context

With today's LCG nightlies I see the following:

[vpadulan@lxplus916 ~]$source /cvmfs/sft-nightlies.cern.ch/lcg/views/devswan/latest/x86_64-el9-gcc13-opt/setup.sh
[vpadulan@lxplus916 ~]$root --version
ROOT Version: 6.31/01
Built for linuxx8664gcc on Mar 06 2024, 23:48:35
From heads/master@v6-31-01-1359-g3ecb224ac7
[vpadulan@lxplus916 ~]$python
Python 3.9.12 (main, Jul 11 2023, 14:40:15) 
[GCC 13.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cvmfs/sft-nightlies.cern.ch/lcg/views/devswan/Thu/x86_64-el9-gcc13-opt/lib/ROOT/__init__.py", line 25, in <module>
    import cppyy
  File "/cvmfs/sft-nightlies.cern.ch/lcg/views/devswan/Thu/x86_64-el9-gcc13-opt/lib/cppyy/__init__.py", line 71, in <module>
    from ._cpython_cppyy import *
  File "/cvmfs/sft-nightlies.cern.ch/lcg/views/devswan/Thu/x86_64-el9-gcc13-opt/lib/cppyy/_cpython_cppyy.py", line 18, in <module>
    c = loader.load_cpp_backend()
  File "/cvmfs/sft-nightlies.cern.ch/lcg/views/devswan/Thu/x86_64-el9-gcc13-opt/lib/cppyy_backend/loader.py", line 79, in load_cpp_backend
    raise RuntimeError("could not load cppyy_backend library")
RuntimeError: could not load cppyy_backend library

Which is due to the fact that the environment variable points to a non-existing library:

[vpadulan@lxplus933 ~]$echo $CPPYY_BACKEND_LIBRARY
/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/devswan/Thu/ROOT/HEAD/x86_64-el9-gcc13-opt/lib/libcppyy_backend3_9
[vpadulan@lxplus933 ~]$ls /cvmfs/sft-nightlies.cern.ch/lcg/nightlies/devswan/Thu/ROOT/HEAD/x86_64-el9-gcc13-opt/lib/libcppyy_backend3_9*
ls: cannot access '/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/devswan/Thu/ROOT/HEAD/x86_64-el9-gcc13-opt/lib/libcppyy_backend3_9*': No such file or directory

By unsetting the variable, ROOT can be imported fine

[vpadulan@lxplus916 ~]$unset CPPYY_BACKEND_LIBRARY
[vpadulan@lxplus916 ~]$python
Python 3.9.12 (main, Jul 11 2023, 14:40:15) 
[GCC 13.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> 

Merge request reports