Here is instructions how to build ROOT https://root.cern.ch/building-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(): libpythia8.so: cannot open shared object file: No such file or directory
Error in <TInterpreter::TCling::AutoLoad>: failure loading library libEGPythia8.so for TPythia8.h
Error in <TInterpreter::AutoParse>: Error parsing payload code for class TGenerator with content:
#line 1 "libEG dictionary payload"
#ifndef G__VECTOR_HAS_CLASS_ITERATOR
#define G__VECTOR_HAS_CLASS_ITERATOR 1
#endif
#define _BACKWARD_BACKWARD_WARNING_H
#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"
#undef _BACKWARD_BACKWARD_WARNING_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.