[Gate-users] implicit ROOT dependencies (was: Cannot compile GATE v7.0.)
Ayush Maheshwari
mayush1903 at gmail.com
Tue Jul 15 09:49:04 CEST 2014
Hey,
On compiling with ROOT support ON. IT shows following error:
~/Downloads/gate.7.0-build$ make -j4
Scanning dependencies of target itkzlib
Scanning dependencies of target ITKMetaIO
[ 0%] [ 0%] [ 0%] Building C object
itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/crc32.o
Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/compress.o
Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/adler32.o
[ 0%] [ 0%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaUtils.o
Building CXX object itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaArrow.o
[ 0%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/deflate.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/gzio.o
[ 1%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaBlob.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/inffast.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/inflate.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/inftrees.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/trees.o
[ 1%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/uncompr.o
[ 2%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaCommand.o
[ 3%] Building C object itk-mhd/itkzlib/CMakeFiles/itkzlib.dir/zutil.o
[ 3%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaContour.o
[ 3%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaDTITube.o
Linking C static library libitkzlib.a
[ 3%] Built target itkzlib
[ 3%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaEllipse.o
[ 3%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaGroup.o
[ 3%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaGaussian.o
[ 4%] [ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaImage.o
Building CXX object itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaImageUtils.o
[ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaLandmark.o
[ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaLine.o
[ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaMesh.o
[ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaObject.o
[ 4%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaOutput.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaScene.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaSurface.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaTube.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaVesselTube.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaTransform.o
[ 5%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaTubeGraph.o
[ 6%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaForm.o
[ 6%] Building CXX object
itk-mhd/MetaIO/CMakeFiles/ITKMetaIO.dir/metaArray.o
Linking CXX static library libITKMetaIO.a
[ 6%] Built target ITKMetaIO
Scanning dependencies of target Gate
[ 6%] [ 6%] [ 6%] [ 6%] Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFTable.cc.o
Building CXX object CMakeFiles/Gate.dir/Gate.cc.o
Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFTableMgrMessenger.cc.o
Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFDataToRootMessenger.cc.o
[ 6%] Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFDataToRoot.cc.o
[ 6%] Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFSDMessenger.cc.o
In file included from
/home/ayush/Downloads/geant4-install/include/Geant4/G4TrajectoryContainer.hh:46:0,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4EventManager.hh:37,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4RunManagerKernel.hh:66,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4RunManager.hh:131,
from
/home/ayush/Downloads/gate_v7.0/source/general/include/GateRunManager.hh:30,
from /home/ayush/Downloads/gate_v7.0/Gate.cc:25:
/home/ayush/Downloads/geant4-install/include/Geant4/G4VTrajectory.hh:91:17:
warning: ‘virtual void G4VTrajectory::DrawTrajectory() const’ was hidden
[-Woverloaded-virtual]
virtual void DrawTrajectory() const;
^
In file included from
/home/ayush/Downloads/gate_v7.0/source/digits_hits/include/GateUserActions.hh:38:0,
from
/home/ayush/Downloads/gate_v7.0/source/physics/include/GateSourcePhaseSpace.hh:39,
from
/home/ayush/Downloads/gate_v7.0/source/physics/include/GateSourceMgr.hh:18,
from /home/ayush/Downloads/gate_v7.0/Gate.cc:30:
/home/ayush/Downloads/gate_v7.0/source/digits_hits/include/GateTrajectory.hh:74:17:
warning: by ‘virtual void GateTrajectory::DrawTrajectory(G4int) const’
[-Woverloaded-virtual]
virtual void DrawTrajectory(G4int i_mode=0) const;
^
[ 7%] Building CXX object CMakeFiles/Gate.dir/source/arf/src/GateARFSD.cc.o
[ 7%] Building CXX object
CMakeFiles/Gate.dir/source/arf/src/GateARFTableMgr.cc.o
[ 7%] Building CXX object
CMakeFiles/Gate.dir/source/geometry/src/GateVolumePlacement.cc.o
[ 7%] Building CXX object
CMakeFiles/Gate.dir/source/geometry/src/GateVVolume.cc.o
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc: In
member function ‘void GateARFTableMgr::SaveARFToBinaryFile()’:
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:225:1:
error: ‘ofstream’ was not declared in this scope
ofstream dest;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:225:1:
note: suggested alternative:
In file included from /usr/include/c++/4.8/ios:38:0,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/c++/4.8/complex:45,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4Types.hh:67,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4ios.hh:39,
from
/home/ayush/Downloads/geant4-install/include/Geant4/globals.hh:49,
from
/home/ayush/Downloads/gate_v7.0/source/arf/include/GateARFTableMgr.hh:12,
from
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:13:
/usr/include/c++/4.8/iosfwd:160:34: note: ‘std::ofstream’
typedef basic_ofstream<char> ofstream;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:225:10:
error: expected ‘;’ before ‘dest’
ofstream dest;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:226:1:
error: ‘dest’ was not declared in this scope
dest.open ( theFN.c_str() );
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc: In
member function ‘void GateARFTableMgr::LoadARFFromBinaryFile(G4String)’:
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:301:3:
error: ‘ifstream’ was not declared in this scope
ifstream dest;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:301:3:
note: suggested alternative:
In file included from /usr/include/c++/4.8/ios:38:0,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/sstream:38,
from /usr/include/c++/4.8/complex:45,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4Types.hh:67,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4ios.hh:39,
from
/home/ayush/Downloads/geant4-install/include/Geant4/globals.hh:49,
from
/home/ayush/Downloads/gate_v7.0/source/arf/include/GateARFTableMgr.hh:12,
from
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:13:
/usr/include/c++/4.8/iosfwd:157:34: note: ‘std::ifstream’
typedef basic_ifstream<char> ifstream;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:301:12:
error: expected ‘;’ before ‘dest’
ifstream dest;
^
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:302:3:
error: ‘dest’ was not declared in this scope
dest.open ( theFileName.c_str(),std::ios::binary );
^
[ 7%] Building CXX object
CMakeFiles/Gate.dir/source/geometry/src/GateCPETSystem.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/geant4-install/include/Geant4/G4RotationMatrix.hh:41,
from
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:26:
/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/geant4-install/include/Geant4/Randomize.hh:32:0,
from
/home/ayush/Downloads/geant4-install/include/Geant4/G4VProcess.hh:405,
from
/home/ayush/Downloads/geant4-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/digits_hits/include/GateProjectionSet.hh:14,
from
/home/ayush/Downloads/gate_v7.0/source/arf/include/GateARFSD.hh:24,
from
/home/ayush/Downloads/gate_v7.0/source/arf/src/GateARFTableMgr.cc:27:
/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/arf/src/GateARFTableMgr.cc.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Gate.dir/all] Error 2
make: *** [all] Error 2
Following options are "ON" :
GATE_ANALYSIS_USE_FILE = ON
GATE_ANALYSIS_USE_GENERAL = ON
GATE_USE_GEANT4_UIVIS = ON
GATE_USE_ROOT = ON
GATE_USE_SYSTEM_CLHEP = ON
GATE_USE_SYSTEM_CLHEP = ON
Thanks
Ayush Maheshwari
5th year B.Tech - M.Tech
Dept. of Engg. Design
IIT Madras
Contact: +91-8124320800; +91-9008342006
On 14 July 2014 13:40, Patay Gergely <patay.gergely at mediso.hu> wrote:
> 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/GateGeometryVoxelInterfileRead
>> er.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
>>
>> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20140715/8c568101/attachment-0001.html>
More information about the Gate-users
mailing list