ROOT_INCLUDE_PATH breaking root on startup

I’m building my Geant4 / Root based monte carlo tool BDSIM and distributing it on cvmfs. I’m updating builds for el9 now and I’m using LCG_104c. When I put my package header directories in the ROOT_INCLUDE_PATH environmental variable (usually required), I get a huge set of errors when starting root. Even if I exit root and unset the environmental variable, this behaviour persists. It also happens when I start my tool as I at some point use root in the background.

I know it only happens if the env variable ROOT_INCLUDE_PATH is set, but I’m unsure which part of my headers or which individual header is causing it. This pattern has worked before no problem for a long time.

Error at the end.

To reproduce:

ssh lxplus.cern.ch
source /cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/bdsim-env-v1.7.7-rc1-g4v10.7.2.3-ftfp-boost.sh 
root

You can see the script only uses some LCG packages, then sources my geant4.sh and “bdsim.sh” which export LD_LIBRARY_PATH, PATH variables.

#!/bin/bash

# setup run environment
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/clhep/2.4.6.4/x86_64-el9-gcc13-opt/clhep-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/qt5/5.15.9/x86_64-el9-gcc13-opt/Qt5-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/Python/3.9.12/x86_64-el9-gcc13-opt/Python-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ipython/7.25.0/x86_64-el9-gcc13-opt/ipython-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/ROOT-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/hepmc3/3.2.7/x86_64-el9-gcc13-opt/hepmc3-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/MCGenerators/crmc/2.0.1p5/x86_64-el9-gcc13-opt/crmcenv-genser.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/Boost/1.82.0/x86_64-el9-gcc13-opt/Boost-env.sh

export FONTCONFIG_PATH=/cvmfs/sft.cern.ch/lcg/releases/LCG_104c/fontconfig/2.13.1/x86_64-el9-gcc13-opt/etc/fonts
scriptdir="$(cd "$(dirname -- "${BASH_SOURCE:-$0}")" && pwd)"
source ${scriptdir}/geant4-v10.7.2.3-ftfp/bin/geant4.sh
source ${scriptdir}/bdsim-v1.7.7-rc1-g4v10.7.2.3-ftfp-boost/bin/bdsim.sh
export PYTHONPATH=$PYTHONPATH:/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/python-utils/pybdsim-v3.6.0/src
export PYTHONPATH=$PYTHONPATH:/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/python-utils/pymadx-v2.1.1/src
export PYTHONPATH=$PYTHONPATH:/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/python-utils/pymad8-v2.0.2/src
export PYTHONPATH=$PYTHONPATH:/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/python-utils/pytransport-v2.0.2/src
export PYTHONPATH=$PYTHONPATH:/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/python-utils/fortranformat

The bad bit is:

/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/bdsim-v1.7.7-rc1-g4v10.7.2.3-ftfp-boost/bin/bdsim.sh 

which has

export BDSIM=/cvmfs/beam-physics.cern.ch/bdsim/x86_64-el9-gcc13-opt/bdsim-v1.7.7-rc1-g4v10.7.2.3-ftfp-boost/bin
export ROOT_INCLUDE_PATH=$BDSIM/include/bdsim/:$BDSIM/include/bdsim/analysis/:$BDSIM/include/bdsim/parser/:/cvmfs/sft.cern.ch/lcg/releases/LCG_104c/hepmc3/3.2.7/x86_64-el9-gcc13-opt/include:/cvmfs/sft.cern.ch/lcg/releases/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include:/cvmfs/sft.cern.ch/lcg/releases/Boost/1.82.0-fbfc9/x86_64-el9-gcc13-opt/include/boost

I really don’t understand why this happens so any help would be really appreciated. I wasn’t sure if it was an LCG build problem either. I’ve built up the environment step by step and it really is just the ROOT_INCLUDE_PATH.

This is the root version alone:

source /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/ROOT-env.sh

The error:

<<< cling interactive line includer >>>: fatal error: module file '/build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.10/src/ROOT-6.28.10-build/lib/Vc.pcm' not found: module
      file not found
<<< cling interactive line includer >>>: note: imported by module 'MathCore' in '/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/MathCore.pcm'
Failed to load module MathCore
Failed to load module Hist
Failed to load module ROOTBrowsable
Failed to load module Unfold
Failed to load module RHTTPSniff
Failed to load module HistPainter
Failed to load module PyMVA
Failed to load module RHTTP
Failed to load module FitPanel
Failed to load module ProofDraw
Failed to load module Unuran
Failed to load module Quadp
Failed to load module Genetic
Failed to load module Eve
Failed to load module GeomPainter
Failed to load module TreeViewer
Failed to load module Physics
Failed to load module ROOTTMVASofieParser
Failed to load module EG
Failed to load module Tree
Failed to load module HistFactory
Failed to load module Spectrum
Failed to load module Matrix
Failed to load module Html
Failed to load module Hist
Failed to load module GuiHtml
Failed to load module Gpad
Failed to load module TMVAGui
Failed to load module Postscript
Failed to load module ROOTEve
Failed to load module RGL
Failed to load module Fumili
Failed to load module Geom
Failed to load module RooFitMore
Failed to load module X3d
Failed to load module SPlot
Failed to load module Hbook
Failed to load module RooFit
Failed to load module RCsg
Failed to load module RooStats
Failed to load module RooFitRDataFrameHelpers
Failed to load module GeomBuilder
Failed to load module Proof
Failed to load module FITSIO
Failed to load module Ged
Failed to load module Recorder
Failed to load module FFTW
Failed to load module GuiBld
Failed to load module ROOTWebDisplay
Failed to load module RooFitCore
Failed to load module Gui
Failed to load module ROOTHistDraw
Failed to load module GX11TTF
Failed to load module ROOTTMVASofie
Failed to load module ProofPlayer
Failed to load module ASImage
Failed to load module TMVAUtils
Failed to load module MathMore
Failed to load module RooFitXRooFit
Failed to load module RooFitHS3
Failed to load module Foam
Failed to load module SpectrumPainter
Failed to load module Minuit2
Failed to load module MLP
Failed to load module ROOTDataFrame
Failed to load module GenVector
Failed to load module ROOTBrowserv7
Failed to load module Minuit
Failed to load module Graf3d
Failed to load module TMVA
Failed to load module ROOTNTupleUtil
Failed to load module ASImageGui
Failed to load module Graf
Failed to load module GX11
Failed to load module Gdml
Failed to load module ROOTTreeViewer
Failed to load module ProofBench
Failed to load module MathCore
Failed to load module Gviz3d
Failed to load module WebGui6
Failed to load module ROOTHist
Failed to load module TreePlayer
Failed to load module ROOTGeomViewer
Failed to load module ROOTFitPanelv7
Failed to load module Smatrix
Failed to load module SessionViewer
input_line_4:2:2: error: unknown type name 'include'
#include "TError.h"
 ^
input_line_4:2:1: error: expected unqualified-id
#include "TError.h"
^
input_line_4:4:2: error: unknown type name 'define'
#define _ClassDefInterp_(name,id,virtual_keyword, overrd) \
 ^
input_line_4:21:7: error: expected ';' after top level declarator
#undef ClassDef
      ^
      ;
input_line_5:1:2: error: unknown type name 'include'
#include <cling/Interpreter/DynamicLookupRuntimeUniverse.h>
 ^
input_line_5:1:1: error: expected unqualified-id
#include <cling/Interpreter/DynamicLookupRuntimeUniverse.h>
^
input_line_7:2:2: error: unknown type name 'line'
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmap2Dict.rootmap"
 ^
Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmap2Dict.rootmap:2:1: error: expected unqualified-id
namespace std {  }
^
Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmap2Dict.rootmap:5:2: error: unknown type name 'line'
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libdequeDict.rootmap"
 ^
Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libdequeDict.rootmap:3:6: error: expected ';' after top level declarator
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libsetDict.rootmap"
     ^
     ;
Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libcomplexDict.rootmap:6:2: error: unknown type name 'line'
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_multise...
 ^
Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_multisetDict.rootmap:3:6: error: expected ';' after top level declarator
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmultimap2Dict.rootmap"
     ^
     ;
Warning in <TInterpreter::LoadLibraryMap>: Problems in (null) declaring '
#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmap2Dict.rootmap"
namespace std {  }


#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libdequeDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libsetDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmultimapDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmultisetDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_mapDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/liblistDict.rootmap"
namespace std { inline namespace __cxx11 {  } }

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libGenVector32.rootmap"
namespace ROOT { namespace Math {  } }
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; } }

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libvalarrayDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libcomplexDict.rootmap"
template <> class complex<float>;
template <> class complex<double>;
template <typename T> class _root_std_complex;

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_multisetDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmultimap2Dict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libforward_listDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libmapDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_multimapDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libvectorDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libSmatrix32.rootmap"
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 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib/libunordered_setDict.rootmap"

#line 2 "Forward declarations from /cvmfs/sft.cern.ch/lcg/releases/LCG_104c/hepmc3/3.2.7/x86_64-el9-gcc13-opt/lib64/libHepMC3rootIO.rootmap"
namespace HepMC3 {  }
' were encountered.
   ------------------------------------------------------------------
  | Welcome to ROOT 6.28/10                        https://root.cern |
  | (c) 1995-2023, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Nov 27 2023, 21:04:13                 |
  | From tags/v6-28-10@v6-28-10                                      |
  | With g++ (GCC) 13.1.0                                            |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

Failed to load module MathCore
Info in <TInterpreter::TCling::RegisterModule>: Module MathCore in modulemap failed to load.
Error in <TCling::LoadPCM>: ROOT PCM /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libMathCore_rdict.pcm file does not exist
Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libNet_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libNetxNG_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libOracle_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libRDAVIX_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libRMySQL_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libROOTGpadv7_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libROOTGraphicsPrimitives_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libROOTNTuple_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libROOTTPython_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libROOTVecOps_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libRSQLite_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libRooFitJSONInterface_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libRootAuth_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libSQLIO_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libXMLIO_rdict.pcm

Info in <TCling::LoadPCM>: In-memory ROOT PCM candidate /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.28.10-cf069/x86_64-el9-gcc13-opt/lib/libXMLParser_rdict.pcm

input_line_8:2:2: error: unknown type name 'define'
#define __ROOTCLING__ 1
 ^
input_line_8:3:7: error: expected ';' after top level declarator
#undef ClassDef
      ^
      ;
Warning in <TInterpreter::TCling::RegisterModule>: Problems declaring payload for module libMathCore.
input_line_9:1:2: error: unknown type name 'ifdef'
#ifdef __ROOTCLING__
 ^
<<< cling interactive line includer >>>:1:1: error: expected unqualified-id
^

ROOT Version: 6.28.10
Platform: lxplus.cern.ch / RHEL9
Compiler: gcc13


Maybe @Danilo or @vvassilev can help you on this

Your build enables Vc and it cannot find its header files. Can you try providing the header files path with ROOT_INCLUDE_PATH=path/to/Vc

Hello,

I’ve tried both adding this path to the ROOT_INCLUDE_PATH and ensuring it’s on LD_LIBRARY_PATH and still it has the exact same error where it can’t find Vc.pcm and seems to be looking in the LCG build directory. The Vc.pcm file does exist here:

/cvmfs/sft.cern.ch/lcg/releases/LCG_104c/ROOT/6.28.10/x86_64-el9-gcc13-opt/lib

I will create an issue on the LCG Jira board and point to this issue too and see if they recognise it.

Ok, so in the end it was that I was overwriting the ROOT_INCLUDE_PATH already set by the LCG release and it was indeed for the Vc library. Solved.

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