I have attached a few files that I’ve been using to illustrate the problem. The Makefile included will compile a shared library libEventViewer.so. I can enter root and load it and use the class EventViewer it contains:
root [0] .L libEventViewer.so
root [1] ev = new EventViewer()
(class EventViewer*)0x10199ca00
root[2]
This works properly on a Mac running Snow Leopard with ROOT 5.27/02 and a linux box running Scientific Linux with ROOT 5.27/06. When I try to run this while logged in to a cluster running Cent OS with ROOT 5.26/00c, the shared library seems to be made fine, but the error below is returned when I try to load it. After this, all keyboard presses cause additional segmentation faults.
[code]root [0] .L libEventViewer.so
dlopen error: /share/apps/root/lib/libGui.so: undefined symbol: _ZTV6TImage
Load Error: Failed to load Dynamic link library /share/apps/root/lib/libGui.so
Error in TCint::AutoLoad: failure loading library libGui.so for class TRootGuiFactory
Error in TPluginHandler::SetupCallEnv: class TRootGuiFactory not found in plugin Gui
dlopen error: /share/apps/root/lib/libGX11TTF.so: undefined symbol: _ZN3TTF8fgGlyphsE
Load Error: Failed to load Dynamic link library /share/apps/root/lib/libGX11TTF.so
Error in TCint::AutoLoad: failure loading library libGX11TTF.so for class TGX11TTF
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x00000030bd499c85 in waitpid () from /lib64/libc.so.6
#1 0x00000030bd43c331 in do_system () from /lib64/libc.so.6
#2 0x00002baa17598d00 in TUnixSystem::StackTrace() () from /share/apps/root/lib/libCore.so
#3 0x00002baa175969e3 in TUnixSystem::DispatchSignals(ESignals) () from /share/apps/root/lib/libCore.so
#4
#5 0x00002baa174bb1e8 in TApplication::InitializeGraphics() () from /share/apps/root/lib/libCore.so
#6 0x00002baa175167d6 in TSystem::Load(char const*, char const*, bool) () from /share/apps/root/lib/libCore.so
#7 0x00002baa174fef97 in TROOT::LoadClass(char const*, char const*, bool) () from /share/apps/root/lib/libCore.so
#8 0x00002baa17581e66 in TCint::AutoLoadCallback(char const*, char const*) () from /share/apps/root/lib/libCore.so
#9 0x00002baa17581f59 in TCint_AutoLoadCallback () from /share/apps/root/lib/libCore.so
#10 0x00002baa17ed9d9e in G__class_autoloading () from /share/apps/root/lib/libCint.so
#11 0x00002baa17edaa72 in G__defined_tagname () from /share/apps/root/lib/libCint.so
#12 0x00002baa17eec1f1 in G__defined_typename_noerror () from /share/apps/root/lib/libCint.so
#13 0x00002baa17edab54 in G__defined_tagname () from /share/apps/root/lib/libCint.so
#14 0x00002baa17edacfe in G__search_tagname () from /share/apps/root/lib/libCint.so
#15 0x00002baa17e55b9c in G__get_linked_tagnum () from /share/apps/root/lib/libCint.so
#16 0x00002baa17e565e1 in G__get_linked_tagnum_fwd () from /share/apps/root/lib/libCint.so
#17 0x00002baa19590b40 in G__cpp_setup_tagtableG__Net () from /share/apps/root/lib/libNet.so
#18 0x00002baa195ecbf7 in G__cpp_setupG__Net () from /share/apps/root/lib/libNet.so
#19 0x00002baa17e4416e in G__call_setup_funcs () from /share/apps/root/lib/libCint.so
#20 0x00002baa195f9798 in G__cpp_setup_initG__Net::G__cpp_setup_initG__Net() () from /share/apps/root/lib/libNet.so
#21 0x00002baa195904b0 in __static_initialization_and_destruction_0 () from /share/apps/root/lib/libNet.so
#22 0x00002baa195904dd in global constructors keyed to _ZN4ROOT20GenerateInitInstanceEPK8TMessage () from /share/apps/root/lib/libNet.so
#23 0x00002baa195fa8a6 in __do_global_ctors_aux () from /share/apps/root/lib/libNet.so
#24 0x00002baa19557ca3 in _init () from /share/apps/root/lib/libNet.so
#25 0x00002baa18f61a1c in ?? () from /home/mwoods/DevCode/EventViewer/./libEventViewer.so
#26 0x00000030bd00d20b in call_init () from /lib64/ld-linux-x86-64.so.2
#27 0x00000030bd00d315 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#28 0x00000030bd010e91 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#29 0x00000030bd00ce96 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#30 0x00000030bd01064c in _dl_open () from /lib64/ld-linux-x86-64.so.2
#31 0x00000030bdc00f9a in dlopen_doit () from /lib64/libdl.so.2
#32 0x00000030bd00ce96 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#33 0x00000030bdc0150d in _dlerror_run () from /lib64/libdl.so.2
#34 0x00000030bdc00f11 in dlopen
GLIBC_2.2.5 () from /lib64/libdl.so.2
#35 0x00002baa17ed36cc in G__dlopen () from /share/apps/root/lib/libCint.so
#36 0x00002baa17ed4b4a in G__shl_load () from /share/apps/root/lib/libCint.so
#37 0x00002baa17e4b2ed in G__loadfile () from /share/apps/root/lib/libCint.so
#38 0x00002baa17e933b7 in G__process_cmd () from /share/apps/root/lib/libCint.so
#39 0x00002baa1758742d in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /share/apps/root/lib/libCore.so
#40 0x00002baa174bc37d in TApplication::ProcessLine(char const*, bool, int*) () from /share/apps/root/lib/libCore.so
#41 0x00002baa18b11213 in TRint::HandleTermInput() () from /share/apps/root/lib/libRint.so
#42 0x00002baa18b0fc57 in TTermInputHandler::Notify() () from /share/apps/root/lib/libRint.so
#43 0x00002baa18b1228d in TTermInputHandler::ReadNotify() () from /share/apps/root/lib/libRint.so
#44 0x00002baa175961c3 in TUnixSystem::CheckDescriptors() () from /share/apps/root/lib/libCore.so
#45 0x00002baa1759640c in TUnixSystem::DispatchOneEvent(bool) () from /share/apps/root/lib/libCore.so
#46 0x00002baa17512006 in TSystem::InnerLoop() () from /share/apps/root/lib/libCore.so
#47 0x00002baa17515271 in TSystem::Run() () from /share/apps/root/lib/libCore.so
#48 0x00002baa174baa3f in TApplication::Run(bool) () from /share/apps/root/lib/libCore.so
#49 0x00002baa18b11e80 in TRint::Run(bool) () from /share/apps/root/lib/libRint.so
#50 0x000000000040100d in main ()
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 0x00002baa174bb1e8 in TApplication::InitializeGraphics() () from /share/apps/root/lib/libCore.so
#6 0x00002baa175167d6 in TSystem::Load(char const*, char const*, bool) () from /share/apps/root/lib/libCore.so
#7 0x00002baa174fef97 in TROOT::LoadClass(char const*, char const*, bool) () from /share/apps/root/lib/libCore.so
#8 0x00002baa17581e66 in TCint::AutoLoadCallback(char const*, char const*) () from /share/apps/root/lib/libCore.so
#9 0x00002baa17581f59 in TCint_AutoLoadCallback () from /share/apps/root/lib/libCore.so
Root > .q
*** Break *** segmentation violation[/code]
Any input on why this is happening and how to fix? Also, does anyone have comments on the Makefile that I’ve made? I tried to avoid the one found in $ROOTSYS/test so that I could understand the build process more closely.
EventViewer.tar (16 KB)