[Gate-users] linking Gate after compilation fails

Edoardo Pasca e.pasca at nki.nl
Tue Feb 24 09:08:08 CET 2009


On Tue, 2009-02-24 at 08:41 +0100, Albert Hirtl wrote:
> Dear Gate users,
> 
> I am trying to install gate_v4.0.0 on Scientific Linux 5.2 with 
> geant4.9.1.p02, root_v5.14 and CLHEP_v2.0.3.2. However, after compiling 
> gate, which goes fine, except for two warnings along the way:
> --
> Compiling GateEcatAccelSystem.cc ...
> /opt/PETMC/ECAT/include/machine_indep.h:23: error: declaration of C 
> function ‘void swab(const void*, void*, size_t)’ conflicts with
> /usr/include/unistd.h:1086: error: previous declaration ‘void swab(const 
> void*, void*, ssize_t)’ here


It is a problem with the ECAT library. I seem to remember that you have
to remove the definition of swab() function in the machine_indep.h . 
In any case I send you the machine_indep.h that I used.

Please, for further info read the Gate UserGuide v4.0.0 at section
10.6.1

Edo 

> /opt/PETMC/clhep-2.0.3.2/include/CLHEP/Units/PhysicalConstants.h:78: 
> warning: ‘CLHEP::electron_charge’ defined but not used
> /opt/PETMC/clhep-2.0.3.2/include/CLHEP/Random/Randomize.h:67: warning: 
> ‘CLHEP::HepRandomGenActive’ defined but not used
> make[1]: *** [../../tmp/Linux-g++/Gate/GateEcatAccelSystem.o] Error 1
> --
> 
> and
> 
> --
> Compiling GateSinoAccelToEcat7.cc ...
> /opt/PETMC/ECAT/include/machine_indep.h:23: error: declaration of C 
> function ‘void swab(const void*, void*, size_t)’ conflicts with
> /usr/include/unistd.h:1086: error: previous declaration ‘void swab(const 
> void*, void*, ssize_t)’ here
> /opt/PETMC/clhep-2.0.3.2/include/CLHEP/Units/PhysicalConstants.h:78: 
> warning: ‘CLHEP::electron_charge’ defined but not used
> /opt/PETMC/clhep-2.0.3.2/include/CLHEP/Random/Randomize.h:67: warning: 
> ‘CLHEP::HepRandomGenActive’ defined but not used
> make[1]: *** [../../tmp/Linux-g++/Gate/GateSinoAccelToEcat7.o] Error 1
> --
> 
> the following problem occurs during linking Gate:
> 
> ----
> source/management finished
> Using granular libraries ...
> Linking Gate ...
> ./tmp/Linux-g++/Gate/libGate.a(GateDetectorConstruction.o): In function 
> `GateDetectorConstruction::BuildSurfaces()':
> GateDetectorConstruction.cc:(.text+0x189): undefined reference to 
> `GateObjectCreatorStore::GetInstance()'
> GateDetectorConstruction.cc:(.text+0x1a6): undefined reference to 
> `GateSurfaceList::BuildSurfaces()'
> ./tmp/Linux-g++/Gate/libGate.a(GateDetectorConstruction.o): In function 
> `GateDetectorConstruction::GateDetectorConstruction()':
> GateDetectorConstruction.cc:(.text+0x637): undefined reference to 
> `GateObjectCreatorStore::GetInstance()'
> GateDetectorConstruction.cc:(.text+0x63f): undefined reference to 
> `GateSystemListManager::GetInstance()'
> ./tmp/Linux-g++/Gate/libGate.a(GateDetectorConstruction.o): In function 
> `GateDetectorConstruction::GateDetectorConstruction()':
> GateDetectorConstruction.cc:(.text+0xb97): undefined reference to 
> `GateObjectCreatorStore::GetInstance()'
> GateDetectorConstruction.cc:(.text+0xb9f): undefined reference to 
> `GateSystemListManager::GetInstance()'
> ./tmp/Linux-g++/Gate/libGate.a(GateDigitizer.o): In function 
> `GateDigitizer::~GateDigitizer()':
> GateDigitizer.cc:(.text+0x2042): undefined reference to `vtable for 
> GateNamedObject'
> GateDigitizer.cc:(.text+0x214b): undefined reference to `vtable for 
> GateNamedObject'
> 
> 
> ..... lots of error messages of the same kind ....
> 
> GateArrayRepeaterMessenger.cc:(.text+0x39d): undefined reference to 
> `GateObjectRepeaterMessenger::SetNewValue(G4UIcommand*, G4String)'
> ./tmp/Linux-g++/Gate/libGate.a(GateArrayRepeaterMessenger.o): In 
> function 
> `GateArrayRepeaterMessenger::GateArrayRepeaterMessenger(GateArrayRepeater*)':
> GateArrayRepeaterMessenger.cc:(.text+0x51a): undefined reference to 
> `GateObjectRepeaterMessenger::GateObjectRepeaterMessenger(GateVObjectRepeater*)'
> GateArrayRepeaterMessenger.cc:(.text+0xa31): undefined reference to 
> `GateObjectRepeaterMessenger::~GateObjectRepeaterMessenger()'
> ./tmp/Linux-g++/Gate/libGate.a(GateArrayRepeaterMessenger.o): In 
> function 
> `GateArrayRepeaterMessenger::GateArrayRepeaterMessenger(GateArrayRepeater*)':
> GateArrayRepeaterMessenger.cc:(.text+0xdaa): undefined reference to 
> `GateObjectRepeaterMessenger::GateObjectRepeaterMessenger(GateVObjectRepeater*)'
> GateArrayRepeaterMessenger.cc:(.text+0x12c1): undefined reference to 
> `GateObjectRepeaterMessenger::~GateObjectRepeaterMessenger()'
> ./tmp/Linux-g++/Gate/libGate.a(GateArrayRepeaterMessenger.o): In 
> function `GateArrayRepeaterMessenger::~GateArrayRepeaterMessenger()':
> GateArrayRepeaterMessenger.cc:(.text+0x116): undefined reference to 
> `GateObjectRepeaterMessenger::~GateObjectRepeaterMessenger()'
> ./tmp/Linux-g++/Gate/libGate.a(GateArrayRepeaterMessenger.o): In 
> function `GateArrayRepeaterMessenger::~GateArrayRepeaterMessenger()':
> GateArrayRepeaterMessenger.cc:(.text+0x196): undefined reference to 
> `GateObjectRepeaterMessenger::~GateObjectRepeaterMessenger()'
> ./tmp/Linux-g++/Gate/libGate.a(GateArrayRepeaterMessenger.o):(.rodata._ZTI26GateArrayRepeaterMessenger[typeinfo 
> for GateArrayRepeaterMessenger]+0x8): undefined reference to `typeinfo 
> for GateObjectRepeaterMessenger'
> collect2: ld returned 1 exit status
> make: *** [bin/Linux-g++/Gate] Error 1
> 
> ----
> 
> Does anybody have an idea what is going wrong? I am somewhat desperate, 
> since I already tried lots of things and I am running out of ideas.
> Help would be very much appreciated!
> 
> Cheers,
> Albert
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: machine_indep.h
Type: text/x-chdr
Size: 1490 bytes
Desc: machine_indep.h
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20090224/10270a4c/attachment.h>


More information about the Gate-users mailing list