Hi,
As Fedora lags behind new Pythia8 versions (8.306 instead of 8.309) I have to build Pythia8 myself and, inevitably, ROOT from source as well. Everything builds seemingly OK, following instructions from both, Pythia8 and ROOT sides (I certainly had to make fix according to https://root-forum.cern.ch/t/include-code-h-and-python-3-11/52425).
Tests work as it should, but then it turns out that ROOT picks Pythia8’s headers from /usr/include rather than from the new Pythia8 installation, as I defined in $PYTHIA8_INCLUDE_DIR. In particular, it does not find Pythia8/PythiaParallel.h, which is new, but of course, finds the old Pythia8/Pythia.h.
Following your advice, I’ve uninstalled the “old” system default Pythia8 packages and built ROOT once more, entirely from scratch. And now, expectedly, even 'Pythia8/Pythia.h' file not found (because /usr/include/Pythia8 does not exist any more…).
The root-config reply is invariably correct, as before.
So probably there is some problem somewhere in the cmake-related files.
At some point, I even tried to remove line 22: /usr in <workdir>/root_src/cmake/modules/FindPythia8.cmake (and rm <workdir>/root_build/CMakeCache.txt and again cmake), but it did not help either.
I tried the simple “cmake” configuration line given in my previous post and it worked fine (and then I was also able to successfully “make” ROOT with my own “<workdir>/pythia8309” version, of course):
(...)
-- Looking for Pythia8
-- Found Pythia8: <workdir>/pythia8309/include
(...)
-- Enabled support for: (...) pythia8 (...)
(...)
BTW. Building ROOT “from scratch” means removing the old “build directory” first.
You will also need this “rootlogon.C” file (or something “equivalent”) if you want to compile ROOT macros with ACLiC and PYTHIA 8 is not installed in “standard system directories” (i.e., include files not in “/usr/include”).
But in fact, without your rootlogon.C, root -b 'pythia8.C'
works, while root -b 'pythia8.C+'
already does not: <workdir>/root_build/include/TPythia8.h:69:10: fatal error: 'Pythia8/Pythia.h' file not found
So IMHO, there is still some bug in the current ROOT configuring procedure, so to say, because in the “official” Fedora supply of ROOT + Pythia8 everything works without any additional effort. Both, based on TPythia8 and on the native Pythia8 interfaces.
I wish they followed the latest versions of Pythia8.
See the PYTHIA 8 “README” file. You can set the absolute path to a directory to which “sudo make install” will copy the “bin”, “lib”, “include”, and “share” directories, e.g., try: ./configure --prefix=/usr ...