ROOT can't find Pythia8 lib?

Hi! I am new to Linux, ROOT, Pythia, and coding in general. At the moment, I am trying to run Pythia example ‘main91.cc’ using ROOT.

I go into

~/…/pythia8307/examples$ root

then

root[0] .x main91.cc

and receive the following error:

In file included from input_line_8:1:
/home/mango/Software/pythia/pythia8307/examples/main91.cc:17:10: fatal error: ‘Pythia8/Pythia.h’ file not found
#include “Pythia8/Pythia.h”

I’m sure this has been asked before but many of the forum responses go over my head. Any help would be much appreciated!!!

ROOT Version: 6.26.06
Pythia Version: 8307
Platform: Linux Mint- Cinnamon
Compiler: Not sure


Hi @Mango,

welcome to the ROOT forum! Maybe this problem is related to the one in this forum post?
https://root-forum.cern.ch/t/cant-find-pythia6-during-root-compiling-cmake

@jonas pythia8 is not pythia6 (in like manner, “root” is not “paw”)

@Mangopythia8307/examples/main91.cc” is NOT a “ROOT macro”, but a “standalone executable” (it needs to be built with “make”) → pythia.org → Contact

Thank you for your replies @jonas + @Wile_E_Coyote !

As @Wile_E_Coyote said, I ended up having to build main91 with “make.” I thought this method was wrong, since “make” was yielding a similar error but for a ROOT library. That’s why I was trying to open it in ROOT like in my original question. I then tried using the second half of my Makefile separately which took care of the error:

g++ -I/home/.../pythia8307/include `root-config --cflags` $@.cc -o $@ -lpythia8 -L/home/.../pythia8307/lib `root-config --glibs`

Best!

Report your problems: GitLab → Pythia8 → Issues → Service Desk