Problem 849

Summary: Segmentation fault: atomicity.h
Product: Geant4 Reporter: marco.cortesi
Component: runAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description marco.cortesi 2006-03-12 09:00:03 CET
I use last release: geant4.8.0.
I have Scientific Linux 4.2, ggcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4).
Compilation of geant was o.k., without errors, the compilation exmaples/novice
is also o.k., but if I try to exec e.g. exampleN01 I have segmanetation fault
message. I made compilation with G4DEBUG option and using gdb I have:

(gdb) exec-file exampleN01
(gdb) run
Starting program: /geant4.8.0.p01/bin/Linux-g++/exampleN01
Using host libthread_db library "/lib/tls/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
~basic_stringbuf (this=0xbff724f4) at atomicity.h:40
40        __asm__ __volatile__ ("lock; xaddl %0,%2"
Current language:  auto; currently c++

I have got the same error trying N02, N03,...example...

Marco Cortesi
Particle Physics Depart.
Weizmann Institute of Science

marco.cortesi@weizmann.ac.il
Comment 1 Gabriele Cosmo 2006-03-28 02:30:59 CEST
This kind of run-time errors are usually related to either incompatible libraries
used (i.e. libraries built on a different system/compiler than the one used to
build the final application), or to a buggy installation/version of the specific
compiler in the system.
If the latter case, I suggest to reinstall the gcc compiler as alternate and
rebuild CLHEP and Geant4 with the new configuration.
See in:
 http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/installconfig/428/3/1/1/1/1.html
for a quick recipy on how to build/install the compiler and configure your
environment.