Get ROOT to use a modified PYTHIA8 library in Fedora 42

_ROOT Version: 6.34.08
_Platform: Fedora 42
_Compiler: g++ (GCC) 15.0.1


Dear experts,

Situation:
In Fedora 42, the regular ROOT and PYTHIA8 installations work together, as they should. Now I have locally cloned the PYTHIA8 source, modified the code, compiled and thus /usr/lib64/libpythia8.so -> libpythia8-8.3.14.so was replaced with the new /usr/lib64/libpythia8.so and then rebuilt /usr/bin/root from locally cloned source with

cmake  -DPYTHIA8_LIBRARY=/usr/lib64/libpythia8.so  \
-Dpythia8=ON  -DCMAKE_INSTALL_PREFIX=/usr \
-Ddavix=OFF  -Wno-dev  root_src

cmake  --build .  --  install  -j4

Problem:
ROOT is apparently not using this new version of the libpythia8.so . Note that propagation of such a modification of the PYTHIA8 code in Fedora 41 was transparent, meaning that ROOT was picking up the modified libpythia8.so automatically, without any actions.

Question:
How can I get ROOT to use a modified libpythia8.so library in Fedora 42?

Thanks !

Dear @Anatoly_Solomin,

welcome to the ROOT forum. I would first make sure that you have correct library paths: LD_LIBRARY_PATH, could you check that first?

Cheers,
Marta

Dear Marta,

Thank you for starting the investigation. My $LD_LIBRARY_PATH in the shell where I’m trying to run my macro contains /usr/lib64. The macro runs, but PYTHIA8 complains about too low energy, while in the recompiled /usr/lib64/libpythia8.so this should not happen. Exactly that code was running successfully in Fedora 41. Tested. That’s the particular oddity I’ve encountered in Fedora 42.

So let me underscore once more, that probing the possible solution makes sense only in Fedora 42.

Thanks again !

Hi @Anatoly_Solomin,

and have you tried cleaning up the build directory before attempting to re-built ROOT?

Cheers,
Marta

Yes, just from scratch.

Here is an oriented towards this use case solution.

Use case:
In Fedora 42, having regular system-wide ROOT and PYTHIA8 installations, be able to use a modified private PYTHIA8 code with the intact system-wide ROOT.

Solution:

cd  <dev_dir>
git  clone  https://gitlab.com/Pythia8/releases \
--branch pythia8XXX \
--single-branch pythia8XXX
cd  pythia8XXX
./configure  --with-root-lib=/usr/lib64/root \
--with-root-include=/usr/include/root \
--cxx-common="-O3  -std=c++17  -pedantic  -W  -Wall  -Wshadow  -fPIC  -pthread"

make some changes…

gmake  -j4
gmake  install

cd  <run_dir>
export  LD_LIBRARY_PATH=<dev_dir>/pythia8XXX/lib:${LD_LIBRARY_PATH}
root  -b  -l  -q  '<program>.C+O(<args>)'
1 Like

Hi @Anatoly_Solomin,

I’m glad you have found a solution! Thank you for sharing it here!

Cheers,
Marta

1 Like

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