1 |
On Tuesday 29 November 2005 10:53, Graham Murray wrote: |
2 |
> Paul de Vrieze <pauldv@g.o> writes: |
3 |
> > It is also needed for third party apps that were linked against |
4 |
> > libstdc++.so.5. As long as those applications do not depend on other |
5 |
> > libraries that are linked against a newer c++ lib things are totally |
6 |
> > ok. |
7 |
> |
8 |
> But unfortunately is does happen. For example on my system (~x86 built |
9 |
> with gcc 3.4.4) opera is linked against libstdc++.so.5 and |
10 |
> libqt-mt.so.3 which in turn is linked against libstdc++.so.6 |
11 |
|
12 |
Opera is indeed an example of an application where it doesn't work. |
13 |
Mozilla, the jdk's and many games are however "good" examples. The |
14 |
general rule is that using libraries written in c++ doesn't work for |
15 |
transitioning. This is partly caused by the fact that the linker makes |
16 |
all symbols global, and as such doesn't look at (or record) the soname of |
17 |
the library where the symbol is supposed to come from. Please be aware |
18 |
though that doing so would still not fix c++ issues as extending objects |
19 |
with one symbol table (and library of origin) with objects (children) |
20 |
with another symbol table (and library of origin) is bound to break. If |
21 |
for example a library function returns a c++ string object. Which methods |
22 |
should then be used on this object? |
23 |
|
24 |
Paul |
25 |
|
26 |
ps. The sandbox we use in portage actually also relies on this behaviour |
27 |
of the linker, as we replace glibc symbols by our own versions of them |
28 |
that check permissions. |
29 |
|
30 |
-- |
31 |
Paul de Vrieze |
32 |
Gentoo Developer |
33 |
Mail: pauldv@g.o |
34 |
Homepage: http://www.devrieze.net |