Difference: MacDD4hep ( vs. 1)

Revision 12014-05-12 - DanProtopopescu

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="GlaDD4hep"

Attempting to build DD4hep on a Mac

Ingredients

  1. CMake 2.8 or higher
  2. Xerces-C (might be optional)
  3. Geant4
  4. CLHEP (might be optional)
  5. Root
  6. DD4hep

Problems

  1. Need CMake 2.8 or newer
  2. Geant4 must be compiled with GDML
  3. Downloaded root binary needs libpcre.dylib
  4. DD4hep needs libssl.1.0.0.dylib
  5. ILCSoft is required and did not install on a Mac

Installation Steps

Would be great if this could have been done simpler, but after a lot of frustrating trial and error I collected this list of must do’s:

CMake:

  1. get cmake-2.8.12.2 from http://www.cmake.org
  2. unpack
  3. cd cmake-2.8.12.2/
  4. ./bootstrap --prefix=/Users/protopop/DD4hep
  5. make
  6. make install
  7. export PATH=$PATH:/Users/protopop/DD4hep/cmake-2.8.12.2/bin

Xerces-C:

  1. get Xerces-C from http://xerces.apache.org/xerces-c
  2. unpack
  3. cd xerces-c-3.1.1/
  4. ./configure (after editing ac_default_prefix install path in the script itself)
  5. make
  6. make install

Geant4:

  1. get geant4.9.5.p02 source from http://geant4.web.cern.ch/geant4/support/source_archive.shtml
  2. unpack
  3. cd geant4.9.5.p02/
  4. mkdir build
  5. cd build
  6. cmake -DCMAKE_INSTALL_PREFIX=/Users/protopop/DD4hep/Geant4 -DGEANT4_USE_GDML=ON -DXERCESC_INCLUDE_DIR=/Users/protopop/DD4hep/xercesc/include -DXERCESC_LIBRARY=/Users/protopop/DD4hep/xercesc/lib/libxerces-c.dylib ..
  7. make
  8. make install

CHLEP:

  1. get chlep from http://proj-clhep.web.cern.ch/proj-clhep/
  2. unpack

Root:

  1. get root precompiled binary from http://root.cern.ch/drupal/content/production-version-534
  2. unpack

and find out that root requires libpcre.dylib ...

  1. get pcre from http://sourceforge.net/projects/pcre/
  2. cd pcre-8.35/
  3. ./configure
  4. make
  5. make install prefix=/Users/protopop/DD4hep/pcre
  6. export DYLD_LIBRARY_PATH=/Users/protopop/DD4hep/pcre/lib
  7. now root will run

OpenSSL:

  1. get openssl via macports with 'sudo port install openssl’
  2. export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib

Now the actual DD4hep compilation:

  1. get DD4hep with svn co https://svnsrv.desy.de/public/aidasoft/DD4hep/trunk DD4hep
  2. cd DD4hep
  3. edit DDG4/src/Geant4UIManager.cpp and change line 55 to ui = new G4UIExecutive(1,(char**)args);//,m_sessionType.c_str());
  4. mkdir build
  5. cd build/
  6. source /Users/protopop/DD4hep/root-v5-34-00-patches/bin/thisroot.sh
  7. source /Users/protopop/DD4hep/Geant4/bin/geant4.sh
  8. export CLHEP_BASE_DIR="/Users/protopop/DD4hep/chlep_x86_64-mac106-gcc42-opt
  9. export DYLD_LIBRARY_PATH=/Users/protopop/DD4hep/pcre/lib:/opt/local/lib
  10. cmake -DCMAKE_INSTALL_PREFIX=/Users/protopop/DD4hep -DDD4HEP_WITH_GEANT4=on -DGeant4_DIR=/Users/protopop/DD4hep/Geant4/lib/Geant4-9.5.2 -DDD4HEP_USE_XERCESC=ON -DXERCESC_ROOT_DIR=/Users/protopop/DD4hep/xercesc ..
  11. make
  12. cd lib/
  13. export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/protopop/DD4hep/xercesc/lib
  14. /Users/protopop/DD4hep/root-v5-34-00-patches/bin/genmap -debug -i libDD4hepG4Legacy.dylib -o libDD4hepG4Legacy.rootmap
  15. cd ../
  16. make install

To try the first examples, we need gear:

  1. download GEAR from http://ilcsoft.desy.de/portal/software_packages/gear/index_eng.html
  2. and this needs ilcutils ...
  3. ... but ilcsoft doesn’t want to install on a Mac

so back to the linux box ...

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback