How to configure ROOT after installation

ROOT Version: ROOTv6.12.06
Platform: Ubuntu 16.04

As per this link, to run Pythia8 in ROOT6, I have to do the following:

Before compiling ROOT, configure ROOT by running the configure command including the following options


In case ROOT has already been compiled before, it will only recompile the PYTHIA module and build the library libEGPythia8.

Now, my ROOT6 has been successfully installed. And running ./configure just gives:

ROOT is built with CMake, see
Please run
mkdir obj; cd obj; cmake …; make -j 4

Please help and tell me how I can follow the afore mentioned instructions of that link.


Can I ask you which options ( did you enable when you built ROOT? Did you enable pythia8?

Oksana shadura,

No, I unfortunately did not do that. But I now want to do that. Is it possible in anyway? Please tell.


Here is instructions how to build ROOT - Section “Quick Start”.
Before installing ROOT you will need to install Pythia8.

Your CMake command will look something like this:

cmake ../ -Dpythia8=ON

If you have particular location with Pythia8 installation, then you will need to define next variables PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY to avoid next situation below:

-- Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY) 
-- Pythia8 not found. Switching off pythia8 option


I did it. And now the root-config --has-pythia8 gives ‘yes’. But still I can’t run the pythia8.C file in ROOT6. It shows the following error message:

root [1] .x pythia8.C
In file included from input_line_47:1:
/home/hp/ROOT/root/tutorials/pythia/pythia8.C:23:10: fatal error: 'Pythia8/Pythia.h' file not found
#include "Pythia8/Pythia.h"
cling::DynamicLibraryManager::loadLibrary(): cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library for TPythia8.h
Error in <TInterpreter::AutoParse>: Error parsing payload code for class TGenerator with content:

#line 1 "libEG dictionary payload"


#include "TAttParticle.h"
#include "TDatabasePDG.h"
#include "TParticleClassPDG.h"
#include "TVirtualMCDecayer.h"
#include "TPrimary.h"
#include "TGenerator.h"
#include "TParticle.h"
#include "TDecayChannel.h"
#include "TParticlePDG.h"


In file included from input_line_47:1:
In file included from /home/hp/ROOT/root/tutorials/pythia/pythia8.C:24:
/home/hp/ROOT/root/include/TPythia8.h:69:10: fatal error: 'Pythia8/Pythia.h' file not found
#include "Pythia8/Pythia.h"

Can you tell me what is wrong now? I have even enabled ‘share library’ option in pythia8 while installing.

1 Like

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