Building DD4hep on a linux box with ILCSoft already installed
The Glasgow DD4hep installation is located in
/afs/phas.gla.ac.uk/data/ilc/software/DD4hep
. This wiki describes how this software package was built.
Ingredients
- ILCSoft installation
- DD4hep
Installation Steps
On top a a working ILCSoft installation, say v01-17:
- get DD4hep with 'svn co https://svnsrv.desy.de/public/aidasoft/DD4hep/trunk DD4hep'
- cd DD4hep
- mkdir build
- source /afs/phas.gla.ac.uk/data/ilc/software/ilcsoft/v01-17/init_ilcsoft.sh
- cd build/
- cmake -DBUILD_TESTING=On ..
- make install
Troubleshooting:
- better to have a working ILCSoft installation, else, if trying to install from scratch it gets very complicated
- Root older than 5.34 gives problems at compilation (mismatching function prototypes)
- for the last compilation, had to edit
CMakeLists.txt
and insert an add_subdirectory(DDG4)
on line 156, and then change in DDG4/include/DDG4/IoStreams.h
two things: boost/iostreams/detail/path.hpp
to boost/filesystem/path.hpp
and boost::iostreams::detail::path
to boost::filesystem::path
.
Testing:
[protopop@ppepc102 build]$ make test
Running tests...
Test project /afs/phas.gla.ac.uk/user/p/protopop/ilc_soft/DD4hep/build
Start 1: t_test_example
1/3 Test #1: t_test_example ................... Passed 0.52 sec
Start 2: t_test_units
2/3 Test #2: t_test_units ..................... Passed 0.50 sec
Start 3: t_test_surface
3/3 Test #3: t_test_surface ................... Passed 0.36 sec
100% tests passed, 0 tests failed out of 3
Total Test time (real) = 1.73 sec
First example
- cd DD4hep
- (source /afs/phas.gla.ac.uk/data/ilc/software/ilcsoft/v01-17/init_ilcsoft.sh)
- source ./bin/thisdd4hep.sh
- cd examples/firstExample
- mkdir build; cd build/
- cmake -DDD4hep_DIR=../../ ../
- make -j
- ./bin/Test_execute ../compact/Sensor_Test.xml
You will see something like this: