ROOT installation error on Fedora 37

Hi

I am trying to install ROOT 6.26.10 on Fedora 37. I have tried to install it via conda, snap, and dnf, but none of these methods have worked, and as far as I can tell there is no binary release available for Fedora 37. I am able to install it by downloading the rpm from koji.fedoraproject[dot]org/koji/buildinfo?buildID=2089931 but it leaves me with a limited installation that I cannot import into Python and in which I can not load the Delphes library, even when I set the relevant PATH variables in my bashrc. When I try to build it from source I get the following error:

CMake Error at cmake/modules/SearchInstalledSoftware.cmake:101 (message):
Could not find nlohmann/json_fwd.hpp, which is required for versions
greater than 3.11. It is installed by default, so your installation is incomplete!

I do have nlohmann installed, I have tried reinstalling it and installing the devel version but I still get the same error. I have tried exporting the path

export CMAKE_PREFIX_PATH=/usr/include/nlohmann

and modifying the cmake command

cmake -Dpython3=ON -DCMAKE_PREFIX_PATH=/usr/include/nlohmann …
cmake -Dpython3=ON -DCMAKE_INCLUDE_PATH=/usr/include/nlohmann/json_fwd.hpp …

but I still get the same error. What could be causing the issue?

Thanks in advance for any feedback

Best regards,
Kåre

Thanks for your reply. I don’t have a file called thisroot.sh file and running the “source” command leads to errors

Just check your python.

In what manner did the Snap release fail?

I’m thinking you maybe have to run pyroot instead of python, or alternatively access the Python environment via JupyROOT with root --notebook; the snap doesn’t integrate with the system environment, it ships its own environment with it that’s separated instead.

Running

python --version

Gives me Python 3.9.16+. I then run cmake with

cmake -DPython3_ROOT_DIR=/home/karef/.pyenv/versions/3.9-dev/bin -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc …

and during comlpiation it gives the output

– Looking for Python
– Found Python3: /home/karef/.pyenv/versions/3.9-dev/bin/python3.9 (found version “3.9.16”) found components: Interpreter Development NumPy Development.Module Development.Embed

but still it gives the same error as above with respect to nlohmann/json_fwd.hpp.

Using the ROOT rpm that I did manage to install, evaluating

root-config --python-version

gives me 3.11.0. I then try to change to this version with pyenv

pyenv install 3.11.0
pyenv global 3.11.0

and running

python --version

then gives me 3.11.2, not 3.11.0. This might be because my system version is 3.11.2, and pyenv is unable to give 3.11.0 without me first uninstalling the system version, which I would rather not do if it is possible to avoid in order not to break any dependencies. With 3.11.2 I am still unable to import ROOT in Python or to load the Delphes library directly in ROOT.

The snap released failed in the same sense as the rpm release, that I was unable to import ROOT in Python, or import the Delphes library in ROOT. However, I now reinstalled ROOT using snap, added the lines

export PATH=$PATH:/snap/root-framework/919/bin
export PYTHONPATH=$PYTHONPATH:/snap/root-framework/919/lib/python3.10/site-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/root-framework/919/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/karef/Documents/MG5_aMC_v2_9_13/Delphes
export ROOT_INCLUDE_PATH=$ROOT_INCLUDE_PATH:/home/karef/Documents/MG5_aMC_v2_9_13/Delphes/classes
export PYTHONPATH=$PYTHONPATH:$ROOT_INCLUDE_PATH

to my bashrc, made a file test_root.py inside the Delphes install folder that contains

import ROOT
print(ROOT.version)
ROOT.gSystem.Load(“libDelphes.so”)

and ran it with

pyroot test_root.py

rather than

python test_root.py

and it managed to import ROOT, giving me 6.28/00, then giving me an error

cling::DynamicLibraryManager::loadLibrary(): libCore.so.6.26: cannot open shared object file: No such file or directory

I also made a C file test_delphes.C with

R__LOAD_LIBRARY(libDelphes)
#include “DelphesClasses.h”

and again put the .C file inside the install folder of Delphes and ran it with

root test_delphes.C

I get a lot of errors

Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState: Missing FileEntry …

but at least it is running. So thanks a lot!

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