[Bug c++/25908] New: Multiple definitions of symbol vtables
schnetter at aei dot mpg dot de
gcc-bugzilla@gcc.gnu.org
Sun Jan 22 00:51:00 GMT 2006
I use gcc (GCC) 4.2.0 20060120 to compile Cactus, a large piece of code
combining C, C++, and Fortran. I receive many errors from the linker like
/usr/bin/ld: multiple definitions of symbol typeinfo for MPI::Op
/Users/eschnett/Calpha/configs/einstein-orange-gcc-debug/lib/libthorn_Carpet.a(helpers.cc.o)
definition of typeinfo for MPI::Opin section (__DATA,__const)
/Users/eschnett/Calpha/configs/einstein-orange-gcc-debug/lib/libthorn_CarpetAdaptiveRegrid.a(CAR.cc.o)
definition of typeinfo for MPI::Opin section (__DATA,__const)
or
/usr/bin/ld: multiple definitions of symbol vtable for MPI::Op
/Users/eschnett/Calpha/configs/einstein-orange-gcc-debug/lib/libthorn_Carpet.a(helpers.cc.o)
definition of vtable for MPI::Opin section (__DATA,__const)
/Users/eschnett/Calpha/configs/einstein-orange-gcc-debug/lib/libthorn_CarpetAdaptiveRegrid.a(CAR.cc.o)
definition of vtable for MPI::Opin section (__DATA,__const)
(Note that the error messages seem run-together; e.g. "MPI::OPin" seems to
refer to the class "MPI::Op", which is located IN a certain section.)
These errors are not there with gcc (GCC) 4.2.0 20051129. The code also works
fine on many other architectures. But with C++, I am not sure what the reason
is.
I have looked on the web, and the gcc PR "[Bug c++/16218] Link problems with
inline virtual function in multiple translation units" seems similar. At that
time, it apparently was an error in gcc that caused this problem.
I use the linker /usr/bin/ld
Apple Computer, Inc. version cctools-590.18.obj~10
and these C++ classes are defined in LAM MPI 7.0.6-11, which I installed via
fink.
--
Summary: Multiple definitions of symbol vtables
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
GCC build triplet: powerpc-apple-darwin8.4.0
GCC host triplet: powerpc-apple-darwin8.4.0
GCC target triplet: powerpc-apple-darwin8.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25908
More information about the Gcc-bugs
mailing list