System linker /usr/bin/ld (called
by gcc's collect2) crashes when linking C++ thorns if GNU
ar is used to create the libraries.
If GNU ar is used to create libraries containing C++ thorns
(note that Cactus builds a library for each thorn) then the
system linker /usr/bin/ld crashes when it is called
by gcc's collect2.
________________________________________________________________________
c++ -o /home/jonathan/cactus/Cactus/exe/cactus_test-interp2 /home/jonathan/cactus/Cactus/configs/test-interp2/datestamp.o -L/home/jonathan/cactus/Cactus/configs/test-interp2/lib -lCactus -lCactusBindings -lTestInterp2 -lPUGHInterp -lPUGH -lCactus -lLocalInterp -lCartGrid3D -lCactus -lCactusBindings -lm
collect2: ld terminated with signal 11 [Segmentation fault]
ld: /home/jonathan/cactus/Cactus/configs/test-interp2/lib/libTestInterp2.a(driver.cc.o): unexpected multiple definitions of symbol `axis_list::string(void) const', type 0xf
gmake[1]: *** [/home/jonathan/cactus/Cactus/exe/cactus_test-interp2] Error 1
gmake[1]: Leaving directory `/home/jonathan/cactus/Cactus'
gmake: *** [test-interp2] Error 2
The workaround is to use the system's ar if you
have any C++ thorns.
Links