[Gate-users] CLHEP library error

David Boersma david.boersma at physics.uu.se
Tue Mar 1 18:03:29 CET 2016


Hi Gustaf,

Which Ubuntu release are you using?

I tried to reproduce your error on a Ubuntu 14.04 machine, also 64bit.
Since you mentioned that you are using geant4 10.01.p03, which is 
relatively new (released Feb 5), I wondered if that is maybe the 
culprit. But it does not look like it, because I can build and run Gate 
v7.1 just fine with that release. So my bet is that the errors that you 
report are not due to Gate or Geant4 code.

(I even tried building geant4 with multithreading enabled -- which one 
should NOT do for any production purposes because Gate is not yet ready 
for multithreading -- but even with MT-geant4 Gate can be built and it 
runs without linking errors, even though the results with MT are not to 
be trusted.)

So...

(1) Could you just quote the full output of ldd completely here in an 
e-mail (if the discussion below does not help you to solve it yourself)?

The idea is that ldd tells you to which libraries an executable really 
gets linked. The results are sometimes surprising and instructive. For 
instance you mention that you used a bash script to set your environment 
correctly for building Gate, but maybe you still have similar settings 
for a different Geant4 version in your ~/.bash* files, which might 
create all kinds of havoc. The ldd utility can help to identify such issues.

(2) The G4GammaParticipants size error makes me suspect that you maybe 
did not truly recompile from scratch (because its base class 
G4QGSParticipants depends on Random.hh, which has CLHEP-dependent code, 
so that class may indeed change size during a rebuild). Running 'make 
clean' is not enough. "From scratch" means: start with a new, empty 
build directory, and run ccmake <sourcedir> in it. Why is this 
necessary? Well, cmake and make are very clever at keeping track of 
dependencies, but that is a very hard task and they are not perfect.

(3) I am very mystified by this _ZN12G4AllocStats6numCatE error. With 
the c++filt utility you can see that this is indeed pointing to the 
numCat data member of G4AllocStats, which gets *declared* in the Geant4 
source tree in this header file:

./source/geometry/volumes/include/G4EnhancedVecAllocator.hh

... but the funny thing is that this header file does not get included 
by *any* other source file, neither in the geant4 10.01.p03 sources nor 
in Gate 7.1 [1]! The only way I can think of this error to pop up is by 
confusion with a different geant4 version. Do you have other geant4 
versions installed on your system?

Hope that helps,
David B.

[1] It is mentioned in the sources.cmake file as a header file, of 
course. But that does not cause it to actually be #included anywhere. 
The 4.9.6 release notes mention that the use of G4EnhancedVecAllocator 
is disabled in some navigation class, and probably that was the only 
usage. Which suggests that the impostor Geant4 library on your system is 
older than 4.9.6. :)



Den 01/03/2016 kl. 13:22, skrev Gustaf Lönn:
> Hello!
>
> First of all I want to express my gratitude for all the valuable help so
> far.
>
> I did a full recompile from scratch linked Gate to the correct G4. I
> still receive the symbol errors previously posted.
>
> I’m not sure on how I should interpret the results from the ldd command.
>
> //
> Gustaf
>> 1 mars 2016 kl. 11:50 skrev David Sarrut
>> <David.Sarrut at creatis.insa-lyon.fr
>> <mailto:David.Sarrut at creatis.insa-lyon.fr>>:
>>
>> Hello,
>>
>> maybe still a linking error. Be sure to recompile everything from
>> scratch and be sure Gate is linked with the correct G4 only ...
>>
>> Check with ldd to List Dynamic Dependencies of an executable, it could
>> help
>>
>> David
>>
>> On Tue, Mar 1, 2016 at 11:29 AM, Gustaf Lönn <gustaflo at kth.se
>> <mailto:gustaflo at kth.se>> wrote:
>>
>>     Hello!
>>
>>     I tried to recompile both G4 and Gate without the external clhep.
>>     That took care of the initial library error. However, I received
>>     the following error when trying to run Gate:
>>
>>     Symbol `_ZTV19G4GammaParticipants' has different size in shared
>>     object, consider re-linking
>>     Gate: symbol lookup error: Gate: undefined symbol:
>>     _ZN12G4AllocStats6numCatE
>>
>>     I think ”GammaParticipants" originate from G4GammaParicipants.hh
>>     and ”AllocStats" from G4EnhancedVectorAllocator.hh
>>
>>     In my bash script I removed the path and library path associated
>>     with system clhep, otherwise it is unchanged.
>>
>>     any ideas?
>>
>>     //Gustaf
>>>     1 mars 2016 kl. 08:01 skrev David Sarrut
>>>     <David.Sarrut at creatis.insa-lyon.fr
>>>     <mailto:David.Sarrut at creatis.insa-lyon.fr>>:
>>>
>>>     Hello,
>>>
>>>     it should be a path issue. The simplest way is to use the G4
>>>     embedded clhep and to not use external clhep. Once G4 is
>>>     compiled, recompile Gate, without external clhep also.
>>>
>>>     hope it helps,
>>>     David
>>>
>>>     On Mon, Feb 29, 2016 at 6:52 PM, Gustaf Lönn <gustaflo at kth.se
>>>     <mailto:gustaflo at kth.se>> wrote:
>>>
>>>         Hello!
>>>
>>>         I have encountered a problem with the CLHEP libraries when
>>>         I’m trying to run Gate. Instead of searching for the external
>>>         2.2.0.4 CLHEP library the program wants to use the libG4chlep
>>>         and therefore terminates. I use x86 Ubuntu 64bit.
>>>
>>>         I have followed the installation/compilation instructions and
>>>         set the external CLHEP options to ”on” and set the following
>>>         paths:
>>>
>>>         Geant4
>>>         CLHEP_CONFIG_EXECUTABLE:
>>>         /home/gate/gate_sources2/2.2.0.4-install/bin/clhep-config
>>>         CLHEP_INCLUDE_DIR:
>>>         /home/gate/gate_sources2/2.2.0.4-install/include
>>>         CLHEP_LIBRARY:
>>>         /home/gate/gate_sources2/2.2.0.4-install/lib/libCLHEP.so
>>>
>>>         Gate
>>>         CLHEP_CONFIG_EXECUTABLE:
>>>         /home/gate/gate_sources2/2.2.0.4-install/bin/clhep-config
>>>         CLHEP_INCLUDE_DIR:
>>>         /home/gate/gate_sources2/2.2.0.4-install/include
>>>
>>>         In my bash script I have the following:
>>>
>>>         export
>>>         PATH=$PATH:/home/gate/gate_sources2/2.2.0.4-install/bin:
>>>         /home/gate/gate_sources2/2.2.0.4-install/include
>>>
>>>         export
>>>         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/gate/gate_sources2/2.2.0.4-install/lib
>>>
>>>         source /home/gate/gate_sources2/root/bin/thisroot.sh
>>>
>>>         source
>>>         /home/gate/gate_sources2/geant4.10.01.p03-install/bin/geant4.sh
>>>
>>>         PATH=$PATH:/home/gate/gate_sources2/gate_v7.1-install/bin
>>>
>>>         export
>>>         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/gate/gate_sources2/geant4.10.01.p03-install/lib64
>>>
>>>         Does anyone have any idea about what might be wrong? I’m
>>>         grateful for any suggestions!
>>>
>>>         Best Regards
>>>         Gustaf L
>>>         _______________________________________________
>>>         Gate-users mailing list
>>>         Gate-users at lists.opengatecollaboration.org
>>>         <mailto:Gate-users at lists.opengatecollaboration.org>
>>>         http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>>>
>>>
>>>
>>>
>>>     --
>>>     David Sarrut, Phd
>>>     Directeur de recherche CNRS
>>>     CREATIS, UMR CNRS 5220, Inserm U1206
>>>     Centre de lutte contre le cancer Léon Bérard
>>>     28 rue Laënnec, 69373 Lyon cedex 08
>>>     Tel : 04 78 78 51 51 <tel:04%2078%2078%2051%2051> / 06 74 72 05
>>>     42 <tel:06%2074%2072%2005%2042>
>>>     http://www.creatis.insa-lyon.fr/~dsarrut
>>>     _________________________________
>>>      "2 + 2 = 5,  for extremely large values of 2"
>>>     _________________________________
>>
>>
>>
>>
>> --
>> David Sarrut, Phd
>> Directeur de recherche CNRS
>> CREATIS, UMR CNRS 5220, Inserm U1206
>> Centre de lutte contre le cancer Léon Bérard
>> 28 rue Laënnec, 69373 Lyon cedex 08
>> Tel : 04 78 78 51 51 / 06 74 72 05 42
>> http://www.creatis.insa-lyon.fr/~dsarrut
>> _________________________________
>>  "2 + 2 = 5,  for extremely large values of 2"
>> _________________________________
>
>
>
> _______________________________________________
> 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