[Gate-users] implicit ROOT dependencies (was: Cannot compile GATE v7.0.)

Patay Gergely patay.gergely at mediso.hu
Mon Jul 14 10:10:55 CEST 2014


I guess you tried to compile without ROOT support (GATE_USE_ROOT=OFF).
Well, it just won't work, because the ARF (and a few other) source code will 
still hold some dependencies on ROOT in the source code.

* The simple way is to build with ROOT (GATE_USE_ROOT=ON).

* The other way is to fix the missing #ifdef G4ANALYSIS_USE_ROOT guarding lines 
in the source.
https://dl.dropboxusercontent.com/u/43097994/gate7/root.patch.gz
With this patch applied, the code can be compiled with or without ROOT.

Please note that if you choose to build Gate without ROOT, you will not be able 
to use a couple of its features (ARF, TriCoinc, DigiRoot, LinacBeam, various 
Actors, just to name a few).

  Gergely

---
Gergely Patay
physicist
Mediso Medical Imaging Systems Ltd.
Hungary

On 2014-07-13 05:50, Ayush Maheshwari wrote:
> Hello,
>
> I've successfully compiled CLHEP, Geant4, but I'm getting the
> following error when I try to 'make' GATE:
>
> gate.7.0-build$ make -j4
> [  2%] Built target itkzlib
> [  6%] Built target ITKMetaIO
> [  6%] [  6%] [  6%] [  7%] Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateVVolume.cc.o
> Building CXX object CMakeFiles/Gate.dir/source/geometry/src/GateTrap.cc.o
> Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateMDBFieldDecoder.cc.o
> Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateSystemListManager.cc.o
> [  7%] Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateWedge.cc.o
> [  7%] Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateMDBFieldReader.cc.o
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc: In
> member function ‘void GateVVolume::AttachARFSD()’:
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc:630:12:
> error: invalid use of incomplete type ‘class GateARFSD’
>     if (arfSD->PrepareCreatorAttachment(this)) {
>              ^
> In file included from
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc:29:0:
> /home/ayush/Downloads/gate_v7.0/source/geometry/include/GateDetectorConstruction.hh:33:7:
> error: forward declaration of ‘class GateARFSD’
>   class GateARFSD;
>         ^
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc:639:23:
> error: cannot convert ‘GateARFSD*’ to ‘G4VSensitiveDetector*’ in
> assignment
>     m_sensitiveDetector = arfSD;
>                         ^
> [  7%] Building CXX object
> CMakeFiles/Gate.dir/source/geometry/src/GateGeometryVoxelInterfileReader.cc.o
> In file included from
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Vector/RotationX.icc:11:0,
>                   from
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Vector/RotationX.h:283,
>                   from
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Vector/Rotation.h:30,
>                   from
> /home/ayush/Downloads/geant-install/include/Geant4/G4RotationMatrix.hh:41,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/geometry/include/GateVolumePlacement.hh:17,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/geometry/include/GateVVolume.hh:16,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc:10:
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Units/PhysicalConstants.h:
> At global scope:
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Units/PhysicalConstants.h:80:21:
> warning: ‘CLHEP::electron_charge’ defined but not used
> [-Wunused-variable]
>   static const double electron_charge = - eplus; // see SystemOfUnits.h
>                       ^
> In file included from
> /home/ayush/Downloads/geant-install/include/Geant4/Randomize.hh:32:0,
>                   from
> /home/ayush/Downloads/geant-install/include/Geant4/G4VProcess.hh:405,
>                   from
> /home/ayush/Downloads/geant-install/include/Geant4/G4StepLimiter.hh:43,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/physics/include/GatePhysicsList.hh:17,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/geometry/include/GateDetectorConstruction.hh:20,
>                   from
> /home/ayush/Downloads/gate_v7.0/source/geometry/src/GateVVolume.cc:29:
> /home/ayush/Downloads/2.1.3.1-install/include/CLHEP/Random/Randomize.h:68:12:
> warning: ‘CLHEP::HepRandomGenActive’ defined but not used
> [-Wunused-variable]
>   static int HepRandomGenActive = HepRandom::createInstance();
>              ^
> make[2]: *** [CMakeFiles/Gate.dir/source/geometry/src/GateVVolume.cc.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [CMakeFiles/Gate.dir/all] Error 2
> make: *** [all] Error 2
>
>
> Could anyone help me in figuring out the error ? Looks like a bug in
> the source code itself.
>
> My system is Ubuntu 12.04, 64-bit.
>
> - Ayush Maheshwari
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>


More information about the Gate-users mailing list