linking problems with libstdc++ version 5 and 6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.7 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@xxxxxxxxxx'
collect2: ld returned 1 exit status
make: *** [run] Error 1

libamg.so is the external Fortran multigrid solver library.

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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux