This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linking error with libstdc++ version 5 and 6


Hi,

I have a linking problem with libstdc++. I use the Gnu g++ 4.0.2 =
compiler on an dual core, dual processor Opteron AMD64 machine with Suse =
Linux 10.0 for compiling and linking a large C++ finite element code. =
This compiler automatically links with libstdc++.so.6.0.6. However, =
during linking,  a warning is produced that one of the external =
libraries (a multigrid solver written in Fortran and compiled with Gnu =
Fortran 3.4 compiler), which I need to use requires the libstdc++.so.5 =
library (which I have installed) and this could conflict with =
libstdc++.so.6.

If I ignore this warning, at run time the following error is produced =
(though the program does not crash):,

*** glibc detected *** free(): invalid next size (fast): =
0x0000000000c105a0 ***

If I remove libstdc++.so.5 from the /usr/lib directory and replace it =
with a hardlink from libstdc++.so.5 to libstdc++.so.6.0.6, I get the =
following link error:

/usr/lib/libamg.so: undefined reference to =
`__gxx_personality_v0@CXXABI_1.2'
collect2: ld returned 1 exit status
make: *** [run] Error 1

libamg.so is the external Fortran multigrid solver library. We have =
added the -lsubc++ library, but this does not remove the link error.

If I use a different version of libamg.so library (i.e. one that only =
runs on a single processor) the above linking error disappears when =
using the hardlink from  libstdc++.so.5 to libstdc++.so.6 and the =
program runs fine.

Does anybody have an idea what this run time error is and how to fix it? =
Or does anybody know how to resolve the conflict between libstdc++ =
versions 5 and 6 and fix the link error when doing the hardlink from  =
libstdc++.so.5 to libstdc++.so.6.0.6? Is libstdc++.so.6.0.6 not backward =
compatible?

Thanks in advance for your help and kind regards,

Dim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]