Offline Software Installation Trouble Shootting

From Daya Bay
Jump to navigation Jump to search

Some common problems encountered during installation of the offline software, and their potential solutions.

Compile Time

Geant4

Geant4's final installation failed OR Incomplete Geant4 installation

You see a message like :

 geant4: Installing using command:
 ./Configure -install -D d_portable -D g4make=make -D g4includes_flag=y  -D g4final_install=  <very long line snipped>
 Say 'sh Configure', not 'sh <Configure'
 Geant4's final installation failed.
 ### start env dump ###

OR your Geant4 installation is incomplete in some way (eg the include folder with all headers is empty) :

The line:

  Say 'sh Configure', not 'sh <Configure'

comes from the Geant4 Configure script and is a symptom that your terminal is detached. Probably you are trying to install using nohup to give immunity to hangups and have closed your window. Unfortunately the script does not like this and exits skipping important bits of the Geant4 installation. You can get around this by using the screen command that succeeds to provide an attached terminal even when you are detached. Alternatively just install from a standard terminal window that you can keep open for the many hours needed.

Gaudi

Reflex/PluginService.h: No such file or directory

You see a message like:

../src/Lib/Bootstrap.cpp:15:34: error: Reflex/PluginService.h: No such file or directory

To solve the problem, check the following:

  • check that the -I.../root/include in the compile command that generated this error is as expected.
  • make sure ROOT is installed and in the expected location.
  • make sure ROOT was installed with Reflex enabled
  • make sure the CMT tag "dayabay" is active.
    • Check if "cmt show tags|grep dayabay" is found
    • Check if "cmt br cmt show macro LCG_home" always points to the same, and correct location
    • Check if CMTEXTRATAGS env. var. is set to "dayabay".

You may see this message when building with debug symbols (using CMTEXTRATAGS=dayabay,debug ) as a symbolic link must be created in order to find the ROOT headers as they are included from arch_dbg rather than arch

Create the symbolic link with something like the below, possibly with updated arch and rootv

dyb-dbglink(){
  local arch=uncharacterized_linux
  local rootv=5.18.00
  cd $DYB/external/root/$rootv &&  test -d $arch && ln -s $arch ${arch}_dbg || echo dyb-dbglink FAILED 
}
dyb-dbglink

python can't open file .../genreflex.py

You see a message like:

python: can't open file '.../external/root/5.14.00f/debian_x86_gcc4/root/bin/../lib/python/genreflex/genreflex.py': [Errno 2] No such file or directory
make[3]: *** [../Linux-i686/dict/GaudiKernel/dictionary_dict.cpp] Error 2

Solution:

This is likely a side effect of not having libpython.so installed. Check the configure step of the ROOT build for a message saying it was not found. If you built Python yourself, make sure --enable-shared is given to the configure script.


LHCb

undefined symbol: _ZN13G4UImessenger15GetCurrentValueEP11G4UIcommand

You see a message like (On SLC4.5/4.6 with the tag: slc4_ia32_gcc34):

ERR0R: error loading library: 'libGiGa.so'
../external/geant4/4.8.3/slc4_ia32_gcc34/lib/libG4materials.so:   
undefined symbol: _ZN13G4UImessenger15GetCurrentValueEP11G4UIcommand

The above error will disappear when changing the tag to "uncharacterized_linux" and the installation of LHCb will be complete.

Following the procedure suggested by Brett to understand how changing this tag changes the Geant4 build :

(1) Setup

   source NuWa-trunk/setup.sh
   source installation/trunk/dybinst/scripts/common.sh

(2) Make sure the default slc4 tags are defined in

   lcgcmt/LCG_Settings/cmt/requirements.

(3) Collect data on slc4:

   (cd NuWa-trunk/lcgcmt/LCG_Interfaces/Geant4/cmt/; cmt show macros | sort)  > macros.slc4
   (cd NuWa-trunk/lcgcmt/LCG_Interfaces/Geant4/cmt/; cmt show tags | sort)  > tags.slc4

(4) Remove slc4 tags in lcgcmt/LCG_Settings/cmt/requirements so

   uncharacterized_linux is used.

(5) Collect data on uncharacterized_linux:

   (cd NuWa-trunk/lcgcmt/LCG_Interfaces/Geant4/cmt/; cmt show macros | sort)  > macros.ul
   (cd NuWa-trunk/lcgcmt/LCG_Interfaces/Geant4/cmt/; cmt show tags | sort)  > tags.ul

(6) "diff" macros.* and tags.* files.

The results are:

For geant4, there is no difference except the tags; 
For Giga, the difference is:
 106c106
 < componentshr_linkopts='-fPIC -Wl,-s -ldl -Wl,--no-undefined  -Wl,--as-needed '
 ---
 > componentshr_linkopts='-fPIC -Wl,-s -ldl -Wl,--no-undefined '
 118c118
 < cpplinkflags='-Wl,-Bdynamic $(linkdebugflags) -Wl,--no-undefined  -Wl,--as-needed '
 ---
 > cpplinkflags='-Wl,-Bdynamic $(linkdebugflags) -Wl,--no-undefined '
 321c321
 < libraryshr_linkopts='-fPIC -ldl -Wl,--no-undefined  -Wl,--as-needed '
 ---
 > libraryshr_linkopts='-fPIC -ldl -Wl,--no-undefined '

You can check if any of these macros includes the --as-needed flag:

cmt show macro componentshr_linkopts
# Package GaudiPolicy v* defines macro componentshr_linkopts as '-fPIC -Wl,-s -ldl -Wl,--as-needed ' for tag 'Linux'
# Package GaudiPolicy v* appends to macro componentshr_linkopts : '-Wl,--no-undefined ' for tag 'Linux'
#
# Selection : componentshr_linkopts='-fPIC -Wl,-s -ldl -Wl,--as-needed -Wl,--no-undefined '

This shows the problem is that GaudiPolicy is adding the problematic flag.

Link Time

Run Time