Hello,
I tried to install Gate 6.2 on Mac OS X 10.7 with Geant4 installed via
MacPorts (I created my own port for 9.5.p01).
However I stumbled across the following problem: I tried "ccmake
../gate_6.2" from a separate directory and it failed with
{{{{{
CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
(MESSAGE):
Could NOT find CLHEP:
CLHEP Library Not Found
(missing: CLHEP_LIBRARY)
Call Stack (most recent call first):
/opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288
(_FPHSA_FAILURE_MESSAGE)
cmake-modules/FindCLHEP.cmake:242 (find_package_handle_standard_args)
CMakeLists.txt:73 (FIND_PACKAGE)
}}}}}
I realized that FindCLHEP.cmake is almost exactly the same as in
Geant4 and allows setting
GATE_USE_OWN_CLHEP
however there's a slight difference: Geant4 actually includes sources
of CLHEP, while Gate doesn't. Setting that variable to OFF solved the
problem, but in case that CLHEP is not distributed with Gate, the
variable should probably not be present in CMake options in the first
place, or at least it should be set to false by default.
Also
After configure step ran through I tried to compile. I had to apply
the patches suggested by Michaela (thanks a lot for those) to be able
to run the compiler in the first place, but then linking seemed to
cause problems:
{{{{{
[ 86%] Building CXX object
CMakeFiles/Gate.dir/source/general/src/GateXMLDocument.cc.o
Linking CXX executable Gate
Undefined symbols for architecture x86_64:
"vtable for CLHEP::HepVector", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
NOTE: a missing vtable usually means the first non-inline virtual
member function has no definition.
"vtable for CLHEP::HepSymMatrix", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
NOTE: a missing vtable usually means the first non-inline virtual
member function has no definition.
"CLHEP::HepVector::HepVector(int)", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
"CLHEP::HepVector::operator=(CLHEP::HepVector const&)", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
"CLHEP::HepVector::~HepVector()", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
GateSourcePencilBeam::~GateSourcePencilBeam() in GateSourcePencilBeam.cc.o
GateSourcePencilBeam::GenerateVertex(G4Event*) in
GateSourcePencilBeam.cc.o
"CLHEP::HepSymMatrix::HepSymMatrix(int, int)", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
"CLHEP::HepSymMatrix::operator=(CLHEP::HepSymMatrix const&)", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
"CLHEP::HepSymMatrix::~HepSymMatrix()", referenced from:
GateSourcePencilBeam::GateSourcePencilBeam(G4String) in
GateSourcePencilBeam.cc.o
GateSourcePencilBeam::~GateSourcePencilBeam() in GateSourcePencilBeam.cc.o
"CLHEP::RandMultiGauss::fire()", referenced from:
GateSourcePencilBeam::GenerateVertex(G4Event*) in
GateSourcePencilBeam.cc.o
"CLHEP::RandMultiGauss::RandMultiGauss(CLHEP::HepRandomEngine*,
CLHEP::HepVector const&, CLHEP::HepSymMatrix const&)", referenced
from:
GateSourcePencilBeam::GenerateVertex(G4Event*) in
GateSourcePencilBeam.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Gate] Error 1
make[1]: *** [CMakeFiles/Gate.dir/all] Error 2
make: *** [all] Error 2
}}}}}
It is evident that some CLHEP library is missing in linker flags, but
I'm not sure how to check and/or fix that. On the machine I have the
following libraries installed:
/opt/local/lib/libCLHEP-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Cast-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Evaluator-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Exceptions-2.1.2.0.dylib
/opt/local/lib/libCLHEP-GenericFunctions-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Geometry-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Matrix-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Random-2.1.2.0.dylib
/opt/local/lib/libCLHEP-RandomObjects-2.1.2.0.dylib
/opt/local/lib/libCLHEP-RefCount-2.1.2.0.dylib
/opt/local/lib/libCLHEP-Vector-2.1.2.0.dylib
Thank you,
Mojca