Abort on launch due to loading MathCore (?)


The compilation of my code seems to go fine but when I launch it, it aborts. Trying with the debugger (see below), it seems that the problem comes from some static initializer in libMathCore.so.

I’m trying to compile on SL5/gcc v4.3.1 . ROOT itself was compiled and seems to run fine. The compilation command was something like :

g++ -Wl,-rpath,/virgo/gnu/Linux-x86_64-SL5/lib64 -o vega.exe.new …/Linux-x86_64-SL5/VGmain.o …/Linux-x86_64-SL5/jmThread.o -L/virgoDev/vega/v0r103/Linux-x86_64-SL5 -lVCore -lVDisplay -lVDatabase -lVFrame -lVFileDirect -lVFrameChannel -L/virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lMathCore -lThread -lFrame -pthread -lm -ldl -lforms -ljpeg -lGL -L /usr/X11R6/lib -lX11 -lm -L/virgo/VCS-5.2/ext/fftw-3.0.1/Linux-x86_64-SL5/lib -lfftw3 -lm -Wl,-rpath,/virgo/VCS-5.2/ext/fftw-3.0.1/Linux-x86_64-SL5/lib -Wl,-rpath,/virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib

I know that it is very difficult to debug with so little information, but if sopmeone has already seen a similar case, I would be very grateful for any indication.



Program received signal SIGABRT, Aborted.
0x0000003dd5030215 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003dd5030215 in raise () from /lib64/libc.so.6
#1 0x0000003dd5031cc0 in abort () from /lib64/libc.so.6
#2 0x00002aee3dd98449 in uw_init_context_1 (context=0x7fff72ba2bf0,
outer_cfa=0x7fff72ba2d30, outer_ra=0x2aee3db4130d)
at …/…/./libgcc/…/gcc/unwind-dw2.c:1249
#3 0x00002aee3dd98a4e in _Unwind_RaiseException (exc=0xdfdfff0)
at …/…/./libgcc/…/gcc/unwind.inc:93
#4 0x00002aee3db4130d in __cxa_throw (obj=, tinfo=0x5a43,
dest=0x2aee3dad2250 <~__concurrence_lock_error>)
at …/…/…/./libstdc+±v3/libsupc++/eh_throw.cc:71
#5 0x00002aee3dae406a in locale (this=0x2aee3dd74258)
at /olusers/swmgr/home/packages/gcc/gcc-4.3.1/x86_64-unknown-linux-gnu/libstdc+±v3/include/ext/concurrence.h:105
#6 0x00002aee3dadf2b4 in Init (this=)
at /olusers/swmgr/home/packages/gcc/gcc-4.3.1/x86_64-unknown-linux-gnu/libstdc+±v3/include/streambuf:447
#7 0x00002aee3c822452 in __static_initialization_and_destruction_0 ()
from /virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib/libMathCore.so
#8 0x00002aee3c8225fc in global constructors keyed to G__MathFit.cxx ()
from /virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib/libMathCore.so
#9 0x00002aee3c82e5c6 in __do_global_ctors_aux ()
from /virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib/libMathCore.so
#10 0x00002aee3c719fd3 in _init ()
from /virgo/ext/root/root_v5.22.00b/Linux-x86_64-SL5/lib/libMathCore.so
#11 0x00002aee3dd87998 in ?? ()
#12 0x0000003dd480d22b in call_init () from /lib64/ld-linux-x86-64.so.2
—Type to continue, or q to quit—
#13 0x0000003dd480d335 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#14 0x0000003dd4800aaa in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#15 0x0000000000000001 in ?? ()
#16 0x00007fff72ba57a0 in ?? ()
#17 0x0000000000000000 in ?? ()

Hi Damir,

I would guess that it’s caused by a mismatch of the libraries you link with - e.g. incompatible system libraries or libstdc++ is different. You should do ldd on vega.exe.new and all libraries you link with and check for incompatible duplicates.

Cheers, Axel.