ROOT Error with Geant4

Hi folks,

I’m installing G4 with ROOT on Linux Mint Serena 64-bit. I’m still fairly new to Linux installation and configuration, but I have used G4/ROOT in the past without issue (though somebody else installed and configured it for me). I am cross-posting this to ROOTTalk.

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch03s02.html

https://root.cern.ch/building-root

I have installed Geant4.10.03.p01 and ROOT6.08/06 separately using the build instructions above. G4 seems to run fine, because ExampleB1 is running smoothly, but I want to use ROOT for my data analysis. I installed AnaExO2 in a similar manner to ExampleB1, but I keep getting a “***Break *** segmentation violation” error with AnaEx02. (See below).

I have tried a number of fixes which were recommended on different questions, as this error appears similar to other questions on both fora.
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/installconfig/1109.html?inline=-1
https://root.cern.ch/root/roottalk/roottalk04/3051.html
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/installconfig/1196.html
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/analysis/474.html

Does anybody have any ideas? I spoke with a friend who uses ROOT but not Geant4, and she suggested that the error might have to do with mismatched libraries (as the errors call libCore.so.5.34, but I’m running 6.08).

Kind regards,
Sasha

~/geant4/AnaEx02 $ AnaEx02 run.mac

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

#0 0x00007f02d30124ca in __GI___waitpid (pid=6458, stat_loc=stat_loc
entry=0x7ffed3f09b40, options=options
entry=0) at …/sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f02d2f8bfbb in do_system (line=) at …/sysdeps/posix/system.c:148
#2 0x00007f02d6e2add4 in TUnixSystem::StackTrace() () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#3 0x00007f02d6e2d03c in TUnixSystem::DispatchSignals(ESignals) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#4 < signal handler called >
#5 0x00007f02d6d6bdb5 in TROOT::FindSpecialObject(char const*, void*&) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#6 0x00007f02d6defa5f in TCint::FindSpecialObject(char const*, Cint::G__ClassInfo*, void**, void**) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#7 0x00007f02cfdc10c0 in G__APIGetSpecialObject_layer1 () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#8 0x00007f02cfdf18db in G__getvariable () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#9 0x00007f02cfd63dc3 in G__getitem () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#10 0x00007f02cfd6441e in G__getitem () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#11 0x00007f02cfd6a6e0 in G__getexpr () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#12 0x00007f02cfe6f758 in G__getfunction () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#13 0x00007f02cfd642a6 in G__getitem () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#14 0x00007f02cfd6a6e0 in G__getexpr () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#15 0x00007f02cfd75520 in G__test () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#16 0x00007f02cfe3ea7b in G__pp_if () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#17 0x00007f02cfd3bb51 in G__pragma () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#18 0x00007f02cfe35899 in G__exec_statement () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#19 0x00007f02cfd288ae in G__loadfile () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#20 0x00007f02cfd2905a in G__include_file () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#21 0x00007f02cfe3b43c in G__exec_statement () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#22 0x00007f02cfd42217 in G__define_struct () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#23 0x00007f02cfe3a9ec in G__exec_statement () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#24 0x00007f02cfd288ae in G__loadfile () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#25 0x00007f02cfd2905a in G__include_file () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#26 0x00007f02cfe3b43c in G__exec_statement () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#27 0x00007f02cfda72c4 in ?? () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#28 0x00007f02cfda87f2 in G__exec_tempfile_fp () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#29 0x00007f02cfe76fc4 in G__process_cmd () from /usr/lib/x86_64-linux-gnu/libCint.so.5.34
#30 0x00007f02d6def6ab in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#31 0x00007f02d6df1c17 in TCint::TCint(char const*, char const*) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#32 0x00007f02d6d6fb13 in TROOT::TROOT(char const*, char const*, void (**)()) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#33 0x00007f02d6d710c4 in ROOT::GetROOT() () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#34 0x00007f02ceb2a5a0 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /home/cinnamint/root-6.08.06/core/base/src/TROOT.cxx:560
#35 _GLOBAL__sub_I_TROOT.cxx(void) () at /home/cinnamint/root-6.08.06/core/base/src/TROOT.cxx:2689
#36 0x00007f02d85df4ea in call_init (l=, argc=argc
entry=2, argv=argv
entry=0x7ffed3f22e28, env=env
entry=0x7ffed3f22e40) at dl-init.c:72
#37 0x00007f02d85df5fb in call_init (env=0x7ffed3f22e40, argv=0x7ffed3f22e28, argc=2, l=) at dl-init.c:30
#38 _dl_init (main_map=0x7f02d87f6168, argc=2, argv=0x7ffed3f22e28, env=0x7ffed3f22e40) at dl-init.c:120
#39 0x00007f02d85cfcfa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#40 0x0000000000000002 in ?? ()
#41 0x00007ffed3f23dcd in ?? ()
#42 0x00007ffed3f23dd5 in ?? ()
#43 0x0000000000000000 in ?? ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00007f02d6d6bdb5 in TROOT::FindSpecialObject(char const*, void*&) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34
#6 0x00007f02d6defa5f in TCint::FindSpecialObject(char const*, Cint::G__ClassInfo*, void**, void**) () from /usr/lib/x86_64-linux-gnu/libCore.so.5.34

Segmentation fault

Hi Sasha,

one thing you should make sure is that the root version picked up by the system is the same against which you build G4. If you are “using” 6.08, perhaps you should set up its enviornment before running the executable? These errors come definitively from ROOT5.

D

Hi Dpiparo,

Sorry about the loose wording. I should have said that I downloaded and compiled ROOT-6.08/06 from the site. I do not believe I downloaded or installed ROOT-5.* of any kind.

My build file and main directory are at ~/rootcern-build and ~/root-6.08.06, respectively. I added the following (at the suggestion of https://root.cern.ch/root/EnvVars.html) to .bashrc and then opened a new session, without changing the error:

export ROOTSYS=/home/cinnamint/rootcern-build
export PATH=$PATH:$ROOTSYS/bin

Kind regards,
Sasha

Hi Sasha,

what is certain is that the version of ROOT being used by G4 is ROOT5 in the example you posted.
Did you source the right environment of ROOT before building G4? And before running the example?
In my experience env variables in the bashrc may lead to problems because one tends to forget about those. At least for the debugging, I would remove any alteration of the environment and rely only on sourcing the thisroot.sh script.

Cheers,
D

Assuming that your system is Ubuntu alike … first “completely remove” / “purge” (i.e. “remove with any associated configuration files”) all ROOT 5 related packages, i.e. execute “sudo apt-get purge root-system* root-plugin* libroot*” (afterwards check that the “/usr/lib/i386-linux-gnu/root5.34” and the “/usr/lib/x86_64-linux-gnu/root5.34” subdirectories disappeared completely and make sure that " /usr/lib/x86_64-linux-gnu/" doesn’t contain any “libCint*”, “libCore*” and so on).

@Wile_E_Coyote

Hi there pardner. (Sorry, with a username like that, I couldn’t resist.)

Good news - no longer segfaulting.
Bad news - “error while loading shared libraries: libCore.so.5.34: cannot open shared object file: no such file or directory.”

Any thoughts on that?

Fair enough. I tried sourcing thisroot, but without luck.

After following Wile_E’s advice, I had this result: ROOT Error with Geant4

You need to reconfigure and rebuild your Geant4 (so that it does not depend on your old ROOT 5 which was removed).

Hi there,

I removed ROOT and then rebuilt it. I then re-benchmarked my ROOT install, and saw a similar result. (2200 ROOTMARKS isn’t terrible for an old laptop, eh?)

I attempted to run G4 as before, and the same “libCore.so.5.34” error appeared. Do you have any thoughts?

I think you need to rebuild Geant4 too on top of the new root…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.