How to install ROOT with Pythia6

I have a problem when I try to “cmake” ROOT.

My current code is

$ cmake ../root-src

What command should I type to install ROOT with Pythia6?
Does anyone can help type the code? QAQ

Hi @sxubi ,

the command would be cmake -Dpythia6=ON ../root-src (and then carefully check the output to make sure everything is alright).

If using Pythia 8 instead is an option, you can get ROOT already built with pythia8 e.g. as a conda package. I haven’t checked all other available pre-built packages but some do not come with Pythia, some do.


I’m aware, thanks! :smiley: I should have added “if that’s an option”. Done now.

Hi Enrico,

Thank you for your respond. Though I input the command

cmake -Dpythia6=ON ../root-src

And I still find the following output in the terminal:

-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option


I’ve tried to use conda to build, and indeed I find the pythia8 package in it.

However, I want to build GENIE, and this required a root built with Pythia6.

I’ve checked that ROOT built with conda doesn’t contain the file TPythia6.h and my building of GENIE would fail.

I’ve tried to move the TPythia6.h to the include folder of ROOT, but then a new question occur: the terminal said it couldn’t find lEGPythia6 (I guess it is the file I think this problem and the TPythia6.h problem all come from the building of ROOT without Pythia6.

BTW, I have installed Pythia6 through the provided by GENIE and indeed I could find in its library.

Thank you.

cmake -Dpythia6=ON -DPYTHIA6_DIR=/home/parallels/Desktop/installed/pythia6 ../root-src

Thank you very much. This problem is solved.

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