This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Application depends on libstdc++.so.5 although no library was linked to it...


Hi,

I'm building an application on ancient Suse 9.0 by gcc 4.2.0 (actually g++).
I used to get the following linker error:
"/usr/bin/ld: warning: libstdc++.so.6, needed by library-name-here, may conflict with libstdc++.so.5"


Google found the explanation:
http://ubuntuforums.org/showthread.php?t=424389
http://gcc.gnu.org/ml/gcc-help/2007-12/msg00032.html
In essence, the problem is that parts of the libraries were compiled by GCC3.3, other with newer gcc version (actually 4.2.0).


ldd -v exposed that /usr/lib/libGLU.so was linked to libstdc++.so.5
I rebuilt (Mesa) libGLU with gcc 4.2.0, then relinked my application.

For my surprise, the linker warning didn't disappear.
running `ldd -v my_app` again shows that libGLU is now linked to libstdc++.so.6,
moreover - no other linked library is linked to libstdc++.so.5, but yet:
ldd reports that my app is linked both to libstdc++.so.5 & libstdc++.so.6


I suppose somewhere/something in the code/libraries creates this dependency, but since
ldd -v doesn't expose it I don't know where to look for it.


Alternatively, maybe the gcc4.2.0 installatio creates the troubles:
gcc4.2.0 is installed at /opt/gcc4.2.0 without its own copy of binutils
/usr/bin/ld --version = "2.14.90.0.5 20030722 (SuSE Linux)"
/usr/bin/gcc --version = "gcc (GCC) 3.3.1 (SuSE Linux)"

I tried to compile ld 2.17... with no success.

Do you have any idea:
* how to get rid of libstdc++.so.5 dependency ? (is it the linker)
* at least: how to find it ?

Thanks in advance,
   Yinon


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