PYTHIA as a plugin to ROOT

Dear root developers,

I have installed pythia 8 on a laptop system mac Os X,
I have root that is already installed, I want to use pythia as a plugin to root
I followed the instructions on this website
th-www.if.uj.edu.pl/~erichter/Ta … lepath.%22
and exactly the instructions in section “PYTHIA as a plugin to ROOT”, please find below the output for each of the steps stated on the website mentioned above

  1. ./configure --enable-shared

PYTHIA Configuration Summary

Configured for DARWIN with the following options:
–enable-shared

The following optional external packages will be used:

  1. export PYTHIA8=path_to_PYTHIA8_installation / this step is also done

  2. $ ./configure --enable-pythia8
    WARNING: Ignoring invalid option “–enable-pythia8”.


PYTHIA Configuration Summary

Configured for DARWIN with the following options:

The following optional external packages will be used:

$ ./configure --with-pythia8-incdir=$PYTHIA8/include
$ ./configure --with-pythia8-libdir=$PYTHIA8/lib

the same message as for the command ./configure --enable-pythia8

In case ROOT has already been compiled before, it will only recompile the PYTHIA module and build the library libEGPythia8. =====>>> I am not sure if this step is done or not

for the example in this path
/path_to_ROOT_source/tutorials/pythia/pythia8.C

export PYTHIA8=/path_to_PYTHIA_installation ==> done
export PYTHIA8DATA=$PYTHIA8/xmldoc ==> done
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_PYTHIA8_installation/lib ==> done

Once I use the command
root -l /…/tutorials/pythia/pythia8.C

I got this

root [0]
Processing /…/tutorials/pythia/pythia8.C…
Error in TMacOSXSystem::DynamicPathName: libEGPythia8[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /…/lib:/…/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/…/sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/…/sw/osx_x86-64/AliPhysics/0-1/lib:/…/sw/osx_x86-64/AliRoot/0-1/lib:/…/sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/…/sw/osx_x86-64/vgm/4.3-1/lib64:/…/sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/…/sw/osx_x86-64/GEANT3/v2-1-1/lib64:/…/sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/…/sw/osx_x86-64/cgal/v4.6.3-1/lib:/…/sw/osx_x86-64/boost/v1.59.0-1/lib:/…/sw/osx_x86-64/GSL/v1.16-1/lib:/…/sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/…/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/…/sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/…/sw/osx_x86-64/AliPhysics/0-1/lib:/…/sw/osx_x86-64/AliRoot/0-1/lib:/…/sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/…/sw/osx_x86-64/vgm/4.3-1/lib64:/…/sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/…/sw/osx_x86-64/GEANT3/v2-1-1/lib64:/…/sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/…/sw/osx_x86-64/cgal/v4.6.3-1/lib:/…/sw/osx_x86-64/boost/v1.59.0-1/lib:/…/sw/osx_x86-64/GSL/v1.16-1/lib:/…/sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/…/pythia8219/lib:/…/pythia8219/lib:/…/pythia8219/lib/:/…/pythia8219/lib:/…/pythia8219/lib:/…/pythia8219/lib::.:/…/lib:/…/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:/…/sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/…/sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/…/sw/osx_x86-64/AliPhysics/0-1/lib:/…/sw/osx_x86-64/AliRoot/0-1/lib:/…/sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/…/sw/osx_x86-64/vgm/4.3-1/lib64:/…/sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/…/sw/osx_x86-64/GEANT3/v2-1-1/lib64:/…/sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/…/sw/osx_x86-64/cgal/v4.6.3-1/lib:/…/sw/osx_x86-64/boost/v1.59.0-1/lib:/…/sw/osx_x86-64/GSL/v1.16-1/lib:/…/sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/…/pythia8219/lib:/…/pythia8219/lib:/…/pythia8219/lib/:/…/pythia8219/lib:/…/pythia8219/lib:/…/pythia8219/lib:/…/cint/cint/stl
Error: Symbol TPythia8 is not defined in current scope /…/tutorials/pythia/pythia8.C:47:
Error: Symbol TPythia8 is not defined in current scope /…/tutorials/pythia/pythia8.C:47:
Error: type TPythia8 not defined FILE:/…/tutorials/pythia/pythia8.C LINE:47
Error: Invalid type ‘TPythia8*’ in declaration of ‘pythia8’ /…/tutorials/pythia/pythia8.C:47:
*** Interpreter error recovered ***
root [1]

could you please tell me what I am doing wrong or if I am missing some steps ?

Kind regards,
Fati

Use the cmake build of ROOT with the options

-Dpythia8=ON -DPYTHIA8_DIR=<pythia8-prefix> 

Instructions are available in root.cern.ch/installing-root-source

Sorry for my late reply I was trying pythia with root on ubuntu which did not work for incompatibility issues
anyway, coming back to the 1st issue, I downloaded the version v5-34-30 I unpacked the tar.gz file then I got another one “root” then I have moved it to another directory called Root,
when I type cmake /././Root/root, I got this message
CMake Error: The source directory “/././Root/root” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
could you help me with this issue also, please ?

Hi, /././Root/root is not a source directory. Did you download the binaries instead?

I checked and even with the binaries I got the same error/message

In order to build from sources to add the Pythia8 plugin you need to download the sources.

it did not work when I download it there was no directory configure to obtain the makeFile later
but from this root.cern.ch/get-root-sources
I got a version using $ git clone root.cern.ch/git/root.git
where it was possible to create makeTFile required and now I can build root using cmake
I will try again pythia once root is installed

Root from source is installed i checked it and it works for normal macros written in root
for the example pythia8.C it does not work for the same 1st reason

root [0]
Processing /..../tutorials/pythia/pythia8.C...
Error in <TMacOSXSystem::DynamicPathName>: libEGPythia8[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /..../lib:/..../lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/.../sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/.../sw/osx_x86-64/AliPhysics/0-1/lib:/.../sw/osx_x86-64/AliRoot/0-1/lib:/.../sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/.../sw/osx_x86-64/vgm/4.3-1/lib64:/.../sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/.../sw/osx_x86-64/GEANT3/v2-1-1/lib64:/.../sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/.../sw/osx_x86-64/cgal/v4.6.3-1/lib:/.../sw/osx_x86-64/boost/v1.59.0-1/lib:/.../sw/osx_x86-64/GSL/v1.16-1/lib:/.../sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/..../lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/.../sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/.../sw/osx_x86-64/AliPhysics/0-1/lib:/.../sw/osx_x86-64/AliRoot/0-1/lib:/.../sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/.../sw/osx_x86-64/vgm/4.3-1/lib64:/.../sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/.../sw/osx_x86-64/GEANT3/v2-1-1/lib64:/.../sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/.../sw/osx_x86-64/cgal/v4.6.3-1/lib:/.../sw/osx_x86-64/boost/v1.59.0-1/lib:/.../sw/osx_x86-64/GSL/v1.16-1/lib:/.../sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/../pythia8219/lib:/../pythia8219/lib:/../pythia8219/lib/:/../pythia8219/lib:/../pythia8219/lib:/../pythia8219/lib::.:/..../lib:/..../lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:/.../sw/osx_x86-64/ROOT/root6-0-1/lib:@libdir@:/.../sw/BUILD/04ecb065d6d0ed00eac374c5ddc6cc4d0efc1bf2/ROOT/lib:@libdir@:@libdir@:@libdir@:/.../sw/osx_x86-64/AliPhysics/0-1/lib:/.../sw/osx_x86-64/AliRoot/0-1/lib:/.../sw/osx_x86-64/GEANT4_VMC/v3-2-p1-1/lib64:/.../sw/osx_x86-64/vgm/4.3-1/lib64:/.../sw/osx_x86-64/GEANT4/v4.10.01.p03-1/lib:/.../sw/osx_x86-64/GEANT3/v2-1-1/lib64:/.../sw/osx_x86-64/fastjet/v3.1.3_1.020-1/lib:/.../sw/osx_x86-64/cgal/v4.6.3-1/lib:/.../sw/osx_x86-64/boost/v1.59.0-1/lib:/.../sw/osx_x86-64/GSL/v1.16-1/lib:/.../sw/osx_x86-64/AliEn-Runtime/v2-19-le-1/lib:/../pythia8219/lib:/../pythia8219/lib:/../pythia8219/lib/:/../pythia8219/lib:/../pythia8219/lib:/../pythia8219/lib:/..../cint/cint/stl
Error: Symbol TPythia8 is not defined in current scope /..../tutorials/pythia/pythia8.C:47:
Error: Symbol TPythia8 is not defined in current scope /..../tutorials/pythia/pythia8.C:47:
Error: type TPythia8 not defined FILE:/..../tutorials/pythia/pythia8.C LINE:47
Error: Invalid type 'TPythia8*' in declaration of 'pythia8' /..../tutorials/pythia/pythia8.C:47:
*** Interpreter error recovered ***
root [1] 

those steps are done

export PYTHIA8=path_to_PYTHIA8_installation 
--enable-pythia8 
--with-pythia8-incdir=$PYTHIA8/include 
--with-pythia8-libdir=$PYTHIA8/lib 

export PYTHIA8=/path_to_PYTHIA_installation 
export PYTHIA8DATA=$PYTHIA8/xmldoc 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_PYTHIA8_installation/lib 

so it did not work !!!

I have run also the macro main91 from the examples in PYTHIA (which requires root)
and it did not work also I got the message

Error : main91 requires ROOT

but I am working in root environment

Could you please tell me if you have any idea/suggestion of where the issue is ?

Hi,

when I run the macro pythiaExample.C
I got the same error message as before and another additional part

dyld : lazy symbol binding failed : Symbol not found : _pythia6_common_address
Referenced from : /././…/./osx_x86-64/ROOT/v5-34-30-alice-1/lib/libEGPythia6.so
Expected in : flat namespace

dyld : Symbol not found : _pythia6_common_address
Referenced from : /././…/./osx_x86-64/ROOT/v5-34-30-alice-1/lib/libEGPythia6.so
Expected in : flat namespace

Kind regards,

after sourcing one version of root (the one installed from source) and after changing LD_LIBRARY_PATH to DYLD_LIBRARY_PATH (with changing the extension .so -> .dylib for the shared libraries for both root and pythia) => things started to be fine when I run the macro pythia8.C,

The inverse case things are not fine
for the macro main91.cc from pythia example does not work
I am still getting this error
Error: main91 requires ROOT

anyway, thanks for helping !!!

Error: main91 requires ROOT

is your error solved now??

Kindly tell the solution.