Message: CERN Root compilation not working on Geant4 examples Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question CERN Root compilation not working on Geant4 examples 

Forum: Documentation and Examples
Date: 03 Aug, 2012
From: stefano veneziano <stefano veneziano>

hello, I have installed Geant4 and root on a mac. I am not able to run Geant4 examples that make use of root

root-config seems to work pb-d-128-141-38-117:Anaex02-build stefanov$ root-config --incdir /sw/root/include

pb-d-128-141-38-117:Anaex02-build stefanov$ printenv |grep ROOT ROOTSYS=/sw/root

All root tests of the realease are working fine.

I have managed to compile and run examples for Geant4, but when I try to compile and example which contains root histograms I get the following error.

pb-d-128-141-38-117:Anaex02-build stefanov$ pwd /Users/stefanov/src/Anaex02-build

pb-d-128-141-38-117:Anaex02-build stefanov$ cmake -DGeant4_DIR=/sw/geant4/lib/Geant4-9.5.1/ ../AnaEx02 -- The C compiler identification is GNU 4.2.1 -- The CXX compiler identification is Clang 4.0.0 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /Users/stefanov/src/Anaex02-build

pb-d-128-141-38-117:Anaex02-build stefanov$ make AnaEx02
Scanning dependencies of target AnaEx02
[ 11%] Building CXX object CMakeFiles/AnaEx02.dir/AnaEx02.cc.o
[ 22%] Building CXX object CMakeFiles/AnaEx02.dir/src/DetectorConstruction.cc.o
[ 33%] Building CXX object CMakeFiles/AnaEx02.dir/src/DetectorMessenger.cc.o
[ 44%] Building CXX object CMakeFiles/AnaEx02.dir/src/EventAction.cc.o
[ 55%] Building CXX object CMakeFiles/AnaEx02.dir/src/HistoManager.cc.o
/Users/stefanov/src/AnaEx02/src/HistoManager.cc:36:10: fatal error: 'TH1D.h' file not found
#include "TH1D.h"
         ^
1 error generated.
make[3]: *** [CMakeFiles/AnaEx02.dir/src/HistoManager.cc.o] Error 1
make[2]: *** [CMakeFiles/AnaEx02.dir/all] Error 2
make[1]: *** [CMakeFiles/AnaEx02.dir/rule] Error 2
make: *** [AnaEx02] Error 2

It seems that the lines in the GnuMakefile responsible for proper link includes and links are not working.

Maybe somebody had the same problem and can help? I understand it is a very basic one.

cheers Stefano

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: CERN Root compilation not working on Geant4 examples   (Ivana Hrivnacova - 13 Aug, 2012)
 Add Message Add Message
to: "CERN Root compilation not working on Geant4 examples"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]