Problems during manual install of ROOT with the pythia6 and pythia8 add-ons

Hello,

I am trying to build a version of ROOT with the pythia modules turned on, following the recipe given here, but with no success, so far.

I have fetched the latest stable version from the website, root-6.22.06, and managed to successfully go through the first “pythia-less” build step called for in the above recipe. At this stage the installed version of ROOT works as expected.

Next, I have generated the pythia 6 and 8 shared libraries and verified that they are referenced in the cache:

$ sudo /sbin/ldconfig -p|grep -in ythia
275:	libpythia8.so (libc6,x86-64) => /home/pbr/root_install3/pythia8186/lib/libpythia8.so
464:	liblhapdfdummy.so (libc6,x86-64) => /home/pbr/root_install3/pythia8186/lib/liblhapdfdummy.so
1010:	libPythia6.so (libc6,x86-64) => /home/pbr/root_install3/pythia6428/libPythia6.so

When I try the next CMake iteration called for in the recipe…

$ cmake -DCMAKE_INSTALL_PREFIX=/home/pbr/root_install3/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8/include -DPYTHIA8_LIBRARY=$PYTHIA8/lib/libpythia8.so -DPYTHIA6_LIBRARY=$PYTHIA6/libPythia6.so -DGSL_DIR=/usr -Dpythia8=ON -Dpythia6=ON ../root-sources

…I run into troubles and get a completely broken installed version of the software:

[ 97%] Building CXX object tmva/pymva/CMakeFiles/G__PyMVA.dir/G__PyMVA.cxx.o
[ 97%] Built target G__PyMVA
[ 98%] Linking CXX shared library ../../lib/libPyMVA.so
[ 98%] Built target PyMVA
[ 98%] Generating G__RooFitMore.cxx, ../../lib/RooFitMore.pcm
Scanning dependencies of target G__RooFitMore
[ 98%] Building CXX object roofit/roofitmore/CMakeFiles/G__RooFitMore.dir/G__RooFitMore.cxx.o
[ 98%] Built target G__RooFitMore
[ 98%] Linking CXX shared library ../../lib/libRooFitMore.so
[ 98%] Built target RooFitMore
[ 98%] Built target onepcm
[ 98%] Built target root
[ 98%] Generating tutorials/hsimple.root
<<< cling interactive line includer >>>: fatal error: module file '/home/pbr/root_install3/root-build/lib/std.pcm' is out of date and needs to be rebuilt: signature mismatch
<<< cling interactive line includer >>>: note: imported by module 'GenVector' in '/home/pbr/root_install3/root-build/lib/GenVector.pcm'
Failed to load module GenVector
Failed to load module GenVector
input_line_4:1:2: error: unknown type name 'ifdef'
#ifdef complex
 ^
<<< cling interactive line includer >>>:1:1: error: expected unqualified-id
input_line_5:1:2: error: unknown type name 'ifdef'
#ifdef PI
 ^
<<< cling interactive line includer >>>:1:1: error: expected unqualified-id
input_line_6:1:2: error: unknown type name 'ifdef'
#ifdef ERROR
 ^
<<< cling interactive line includer >>>:1:1: error: expected unqualified-id
input_line_7:2:2: error: unknown type name 'include'
#include "TError.h"
 ^
input_line_7:2:1: error: expected unqualified-id
#include "TError.h"
^
input_line_7:4:2: error: unknown type name 'define'
#define _ClassDefInterp_(name,id,virtual_keyword, overrd) \
 ^
input_line_7:21:7: error: expected ';' after top level declarator
#undef ClassDef
      ^
      ;
input_line_8:1:2: error: unknown type name 'include'
#include "cling/Interpreter/DynamicLookupRuntimeUniverse.h"
 ^
input_line_8:1:1: error: expected unqualified-id
#include "cling/Interpreter/DynamicLookupRuntimeUniverse.h"
^
input_line_10:2:2: error: unknown type name 'line'
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmultimapDict.rootmap"
 ^
Forward declarations from /home/pbr/root_install3/root-build/lib/libmultimapDict.rootmap:1:1: error: expected unqualified-id
namespace std {  }
^
Forward declarations from /home/pbr/root_install3/root-build/lib/libmultimapDict.rootmap:2:2: error: unknown type name 'line'
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libsetDict.rootmap"
 ^
Forward declarations from /home/pbr/root_install3/root-build/lib/libsetDict.rootmap:2:6: error: expected ';' after top level declarator
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libcomplexDict.rootmap"
     ^
     ;
Forward declarations from /home/pbr/root_install3/root-build/lib/libcomplexDict.rootmap:2:2: error: unknown type name 'line'
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_mapDict.rootmap"
 ^
Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_mapDict.rootmap:2:6: error: expected ';' after top level declarator
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmultisetDict.rootmap"
     ^
     ;
Warning in <TInterpreter::LoadLibraryMap>: Problems in (null) declaring '
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmultimapDict.rootmap"
namespace std {  }
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libsetDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libcomplexDict.rootmap"
template <typename T> class _root_std_complex;
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_mapDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmultisetDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libvalarrayDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_multimapDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmapDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_setDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libSmatrix32.rootmap"
namespace ROOT { namespace Math {  } }namespace ROOT { namespace Math { template <typename T, unsigned int, unsigned int> class MatRepStd; } }namespace ROOT { namespace Math { template <typename T, unsigned int> class MatRepSym; } }namespace ROOT { namespace Math { template <typename T, unsigned int> class SVector; } }namespace ROOT { namespace Math { template <typename T, unsigned int, unsigned int, typename R> class SMatrix; } }
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/liblistDict.rootmap"
namespace std { inline namespace __cxx11 {  } }
#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmap2Dict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libmultimap2Dict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libdequeDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libunordered_multisetDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libforward_listDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libvectorDict.rootmap"

#line 1 "Forward declarations from /home/pbr/root_install3/root-build/lib/libGenVector32.rootmap"
namespace ROOT { namespace Math { template <typename T> class Cartesian2D; } }namespace ROOT { namespace Math { template <typename T> class Polar2D; } }namespace ROOT { namespace Math { class DefaultCoordinateSystemTag; } }namespace ROOT { namespace Math { template <typename CoordSystem, typename Tag> class DisplacementVector2D; } }namespace ROOT { namespace Math { template <typename T> class Cartesian3D; } }namespace ROOT { namespace Math { template <typename CoordSystem, typename Tag> class PositionVector3D; } }namespace ROOT { namespace Math { template <typename T> class CylindricalEta3D; } }namespace ROOT { namespace Math { template <typename T> class Polar3D; } }namespace ROOT { namespace Math { template <typename T> class Cylindrical3D; } }namespace ROOT { namespace Math { class LocalCoordinateSystemTag; } }namespace ROOT { namespace Math { class GlobalCoordinateSystemTag; } }namespace ROOT { namespace Math { template <typename CoordSystem, typename Tag> class DisplacementVector3D; } }namespace ROOT { namespace Math { template <typename T> class PxPyPzE4D; } }namespace ROOT { namespace Math { template <typename CoordSystem> class LorentzVector; } }namespace ROOT { namespace Math { template <typename T> class PxPyPzM4D; } }namespace ROOT { namespace Math { template <typename T> class PtEtaPhiE4D; } }namespace ROOT { namespace Math { template <typename T> class PtEtaPhiM4D; } }' were encountered.

Processing hsimple.C...
input_line_11:1:2: error: unknown type name 'include'
#include "/home/pbr/root_install3/root-build/tutorials/hsimple.C"
 ^
In file included from input_line_11:1:
/home/pbr/root_install3/root-build/tutorials/hsimple.C:22:9: error: expected ';' after top level declarator
#include <TFile.h>
        ^
        ;
/home/pbr/root_install3/root-build/tutorials/hsimple.C:23:2: error: unknown type name 'include'
#include <TNtuple.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:23:1: error: expected unqualified-id
#include <TNtuple.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:24:2: error: unknown type name 'include'
#include <TH2.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:24:1: error: expected unqualified-id
#include <TH2.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:25:2: error: unknown type name 'include'
#include <TProfile.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:25:1: error: expected unqualified-id
#include <TProfile.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:26:2: error: unknown type name 'include'
#include <TCanvas.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:26:1: error: expected unqualified-id
#include <TCanvas.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:27:2: error: unknown type name 'include'
#include <TFrame.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:27:1: error: expected unqualified-id
#include <TFrame.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:28:2: error: unknown type name 'include'
#include <TROOT.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:28:1: error: expected unqualified-id
#include <TROOT.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:29:2: error: unknown type name 'include'
#include <TSystem.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:29:1: error: expected unqualified-id
#include <TSystem.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:30:2: error: unknown type name 'include'
#include <TRandom3.h>
 ^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:30:1: error: expected unqualified-id
#include <TRandom3.h>
^
/home/pbr/root_install3/root-build/tutorials/hsimple.C:31:2: error: unknown type name 'include'
#include <TBenchmark.h>
 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
make[2]: *** [CMakeFiles/hsimple.dir/build.make:67: tutorials/hsimple.root] Error 1
make[1]: *** [CMakeFiles/Makefile2:448: CMakeFiles/hsimple.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

In my system the gsl headers are at the following location: /usr/include/gsl

Any ideas of what I can try to fix it?

Thanks. -Pietro

PS: The directory structure for the install is:

root directory: /home/pbr/root_install3
$ls ~/root_install3
drwxr-xr-x pythia6428
drwxr-xr-x pythia8186
lrwxrwxrwx root-6.22.06 -> root-sources
drwxr-xr-x root-build
drwxr-xr-x root-install
drwxr-xr-x root-sources

The commands I gave to do the install are:

cd /home/pbr/root_install3
cd root-build
cmake -DCMAKE_INSTALL_PREFIX=/home/pbr/root_install3/root-install ../root-sources
cmake --build . --target install -- -j 1
export ROOTSYS=/home/pbr/root_install3/root-build
export PYTHIA6=/home/pbr/root_install3/pythia6428
export PYTHIA8=/home/pbr/root_install3/pythia8186
export PYTHIA8DATA=$PYTHIA8/xmldoc
cmake -DCMAKE_INSTALL_PREFIX=/home/pbr/root_install3/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8/include -DPYTHIA8_LIBRARY=$PYTHIA8/lib/libpythia8.so -DPYTHIA6_LIBRARY=$PYTHIA6/libPythia6.so -DGSL_DIR=/usr -Dpythia8=ON -Dpythia6=ON ../root-sources
cmake --build . --target install -- -j 1

_ROOT Version: 6.22.06
_Platform: Debian 10
_Compiler: x86_64-linux-gnu, gcc version 8.3.0 (Debian 8.3.0-6)

I don’t understand why you build in two steps. Doing this should work:

cd /home/pbr/root_install3
cd root-build
export PYTHIA6=/home/pbr/root_install3/pythia6428
export PYTHIA8=/home/pbr/root_install3/pythia8186
export PYTHIA8DATA=$PYTHIA8/xmldoc
cmake -DCMAKE_INSTALL_PREFIX=/home/pbr/root_install3/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8/include -DPYTHIA8_LIBRARY=$PYTHIA8/lib/libpythia8.so -DPYTHIA6_LIBRARY=$PYTHIA6/libPythia6.so -DGSL_DIR=/usr -Dpythia8=ON -Dpythia6=ON ../root-sources
cmake --build . --target install -- -j 1

But anyway, it should work nevertheless. What I don’t understand is that the error is related to GenVector… Could you try again from scratch with what I suggested above?

It worked! Thank you.

Just two more questions:

  1. (while on the subject) how do you force CMake to generate a manual install of ROOT with debug symbols?
  2. I checked the current install with the pythia8.C, pythiaExample.C
    and pythia_display.C from the tutorials and they run fine, however pythia_display8.C from the same source generates errors (pls. see below), am I still missing anything?
$ root pythia_display8.C
   ------------------------------------------------------------------
  | Welcome to ROOT 6.22/06                        https://root.cern |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Nov 27 2020, 15:14:08                 |
  | From tags/v6-22-06@v6-22-06                                      |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] 
Processing pythia_display8.C...
In file included from input_line_17:1:
./pythia_display8.C:93:6: error: no member named 'SetMSEL' in 'TPythia8'
   P.SetMSEL(0);           // full user controll;
   ~ ^
./pythia_display8.C:94:6: error: no member named 'SetMSUB' in 'TPythia8'
   P.SetMSUB(102, 1);      // g + g -> H0
   ~ ^
./pythia_display8.C:98:6: error: no member named 'SetPMAS' in 'TPythia8'
   P.SetPMAS(6,  1, 175);  // mass of TOP
   ~ ^
./pythia_display8.C:99:6: error: no member named 'SetPMAS' in 'TPythia8'
   P.SetPMAS(25, 1, 180);  // mass of Higgs
   ~ ^
./pythia_display8.C:102:6: error: no member named 'SetCKIN' in 'TPythia8'
   P.SetCKIN(1, 170.0);    // range of allowed mass
   ~ ^
./pythia_display8.C:103:6: error: no member named 'SetCKIN' in 'TPythia8'
   P.SetCKIN(2, 190.0);
   ~ ^
./pythia_display8.C:105:6: error: no member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(61, 0);   // switch off ISR
   ~ ^
./pythia_display8.C:106:6: error: no member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(71, 0);   // switch off FSR
   ~ ^
./pythia_display8.C:107:6: error: no member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(81, 0);   // switch off multiple interactions
   ~ ^
./pythia_display8.C:109:6: error: no member named 'SetMSTP' in 'TPythia8'
   P.SetMSTP(111, 0);  // Switch off fragmentation
   ~ ^
./pythia_display8.C:113:9: error: no member named 'SetMDME' in 'TPythia8'
      P.SetMDME(i, 1, 0);
      ~ ^
./pythia_display8.C:114:6: error: no member named 'SetMDME' in 'TPythia8'
   P.SetMDME(225, 1, 1);
   ~ ^
./pythia_display8.C:118:9: error: no member named 'SetMDME' in 'TPythia8'
      P.SetMDME(i, 1, 0);
      ~ ^
./pythia_display8.C:119:6: error: no member named 'SetMDME' in 'TPythia8'
   P.SetMDME(184, 1, 1);
   ~ ^
./pythia_display8.C:122:6: error: no matching member function for call to 'Initialize'
   P.Initialize("cms", "p", "p", 14000);
   ~~^~~~~~~~~~
/home/pbr/root_install3/root-install/include/TPythia8.h:100:28: note: candidate function not viable: no known conversion from 'const char [4]' to 'Int_t' (aka 'int') for 1st argument
   Bool_t                  Initialize(Int_t idAin, Int_t idBin, Double_t eAin, Double_t eBin);
                           ^
/home/pbr/root_install3/root-install/include/TPythia8.h:99:28: note: candidate function not viable: requires 3 arguments, but 4 were provided
   Bool_t                  Initialize(Int_t idAin, Int_t idBin, Double_t ecms);
                           ^
In file included from input_line_17:1:
./pythia_display8.C:190:15: error: no member named 'GetMSTU' in 'TPythia8'
   int nh = P.GetMSTU(72);
            ~ ^
input_line_19:2:3: error: use of undeclared identifier 'run_pythia_display8'
 (run_pythia_display8())
  ^
Error in <HandleInterpreterException>: Error evaluating expression (run_pythia_display8()).
Execution of your code was aborted.

Add -DCMAKE_BUILD_TYPE=Debug See the CMAKE_BUILD_TYPE — CMake 3.20.0-rc2 Documentation

EDIT: Sorry, but where is pythia_display8.C coming from?

The pythia_display8.C is a spurious file that was not part of the official distribution, so never mind, I am all set.

Thanks!

1 Like

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