Check duplicate issues.
Description
hi -
I recently built root 6.38.00 on a fedora42 machine which had the
distribution-provided ROOT rpms installed, including
python3-root-6.36.04-1.fc42.x86_64.
I installed 6.38.00 to a local ROOTSYS and added $ROOTSYS/lib
to the front of my PYTHONPATH and LD_LIBRARY_PATH (later realizing
that i also now needed $ROOTSYS/lib/cppyy on LD_LIBRARY_PATH).
Then when i tried to import ROOT from python, i got a crash:
>>> import ROOT
/usr/lib64/python3.13/site-packages/cppyy_backend/loader.py:147: UserWarning: No precompiled header available (cannot import name 'get_cppversion' from 'cppyy_backend._get_cppflags' (/usr/lib64/python3.13/site-packages/cppyy_backend/_get_cppflags.py)); this may impact performance.
warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
*** Break *** segmentation violation
#0 0x00007fed0467c77e in __internal_syscall_cancel () from /lib64/libc.so.6
#1 0x00007fed0467c7a4 in __syscall_cancel () from /lib64/libc.so.6
#2 0x00007fed046ecc0f in wait4 () from /lib64/libc.so.6
#3 0x00007fed0463d04d in do_system () from /lib64/libc.so.6
#4 0x00007fecf47f5e32 in ?? () from /home/sss/root/root-6.38.00/rootsys/lib/libCore.so
#5 0x00005556fded6740 in ?? ()
#6 0x0000000000000000 in ?? ()
This comes about because ROOT 6.38.00 removes libcppyy_backend.so as a separate
library. However, there is still code in _cython_cppyy.py that is trying
top load it:
# First load the dependency libraries of the backend, then pull in the libcppyy
# extension module. If the backed can't be loaded, it was probably linked
# statically into the extension module, so we don't error out at this point.
try:
from cppyy_backend import loader
c = loader.load_cpp_backend()
except ImportError:
c = None
This tries to load libcppyy_backend.so and fails gracefully if it isn't found.
The problem of course if that a libcppyy_backend.so is present in the system
library directory, then this will load that one --- and it's an incompatible
version, so we just get a crash. If libcppyy_backend.so is meant to be gone
from 6.38.00, then we shouldn't be trying to load it. If i replace the block
above with just
then everything seems to work.
Reproducer
See above.
ROOT version
6.38.00
Installation method
build from source
Operating system
fedora42
Additional context
No response
Check duplicate issues.
Description
hi -
I recently built root 6.38.00 on a fedora42 machine which had the
distribution-provided ROOT rpms installed, including
python3-root-6.36.04-1.fc42.x86_64.
I installed 6.38.00 to a local ROOTSYS and added $ROOTSYS/lib
to the front of my PYTHONPATH and LD_LIBRARY_PATH (later realizing
that i also now needed $ROOTSYS/lib/cppyy on LD_LIBRARY_PATH).
Then when i tried to import ROOT from python, i got a crash:
This comes about because ROOT 6.38.00 removes libcppyy_backend.so as a separate
library. However, there is still code in _cython_cppyy.py that is trying
top load it:
This tries to load libcppyy_backend.so and fails gracefully if it isn't found.
The problem of course if that a libcppyy_backend.so is present in the system
library directory, then this will load that one --- and it's an incompatible
version, so we just get a crash. If libcppyy_backend.so is meant to be gone
from 6.38.00, then we shouldn't be trying to load it. If i replace the block
above with just
then everything seems to work.
Reproducer
See above.
ROOT version
6.38.00
Installation method
build from source
Operating system
fedora42
Additional context
No response