Hi, I just wanted to follow up on this issue. I’m continuing to run into this issue, now with ROOT 6.20 (and Pythia 8244).
To recap, compiling a macro using TPythia8 raises this error:
/Users/jan/root/root-6.20.00/rbuild/include/TPythia8.h:69:10: fatal error: 'Pythia8/Pythia.h' file not found
(for exactness, I will report the paths exactly as they appear on my local machine, instead of using shorthand like path/to/root/build
)
As I mentioned before, this problem is resolved if I copy some directories from Pythia’s include
dir, containing .h files, into the ROOT build’s include
dir:
cp -r /Users/jan/pythia/pythia8244/include/* /Users/jan/root/root-6.20.00/rbuild/include/
.
After doing this, I can successfully compile & run ROOT macros using TPythia8.
However I assume this manual copy should not be necessary. I have built Pythia8 with the shared library, and built ROOT using the following flags in cmake
, with the Pythia8 option turned on:
PYTHIA8_DATA = /Users/jan/pythia/pythia8244/share/Pythia8/xmldoc
PYTHIA8_INCLUDE_DIR = /Users/jan/pythia/pythia8244/include
PYTHIA8_LIBRARY = /Users/jan/pythia/pythia8244/lib/libpythia8.dylib
I also have the following lines in my .bash_profile
:
export PYTHIA8=/Users/jan/pythia/pythia8244
export PYTHIA8DATA=/Users/jan/pythia/pythia8244/share/Pythia8/xmldoc
DYLD_LIBRARY_PATH=${PYTHIA8}/lib:${DYLD_LIBRARY_PATH}
Without performing that manual copy I mentioned above, I can successfully run the ROOT tutorial pythia8.C
and my own macros in interpreter mode, but compilation will fail with the error message at the top of this post.
As a side note, the ccmake
description for PYTHIA8_INCLUDE_DIR
is “Specify the directory containing Pythia.h.”. However while this should be given as /Users/jan/pythia/pythia8244/include
(otherwise the build fails), the file Pythia.h
is actually located at /Users/jan/pythia/pythia8244/include/Pythia8/Pythia.h
.
This seems to be reflected in the include statement in TPythia8.h
causing my error, which accounts for the Pythia8
subdirectory – the ccmake
variable descriptions thus might be a little misleading.
Thanks again for the help!
Operating System: macOS 10.14.6
ROOT: 6.20/00
Clang: Apple clang version 11.0.0 (clang-1100.0.33.8)
CMake: version 3.17.0-rc1