|
Boost-Build : |
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2006-03-10 07:40:20
Vladimir Prus wrote:
> On Friday 10 March 2006 15:06, Markus Schöpflin wrote:
>> Vladimir Prus wrote:
[...]
>>> Are there libraries with the same name in different locations? It seems
>>> Debian somehow solves this problem...
>>>
>> > find /opt/ -name libstdc++.so.6
>>
>> /opt/gcc-3.4.3/lib/libstdc++.so.6
>> /opt/gcc-4.0.2/lib/libstdc++.so.6
>> /opt/gcc-4.1.0/lib/libstdc++.so.6
>>
>> > find /opt/ -name libgcc_s.so.1
>>
>> /opt/gcc-3.3.4/lib/libgcc_s.so.1
>> /opt/gcc-3.4.3/lib/libgcc_s.so.1
>> /opt/gcc-4.0.2/lib/libgcc_s.so.1
>> /opt/gcc-4.1.0/lib/libgcc_s.so.1
>>
>> It would be interesting to know how debian does solve this problem.
>
> Well, for gcc 3.3 vs 4.0, they use sonames:
>
> $ g++-3.3 a.cpp
> a.cpp:4:2: warning: no newline at end of file
> ghost_at_ghostwalk:/tmp$ ldd a.out
> linux-gate.so.1 => (0xffffe000)
> libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40029000)
> libm.so.6 => /lib/tls/libm.so.6 (0x400e3000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40109000)
> libc.so.6 => /lib/tls/libc.so.6 (0x40114000)
> /lib/ld-linux.so.2 (0x40000000)
> ghost_at_ghostwalk:/tmp$ g++-4.0 a.cpp
> a.cpp:4:2: warning: no newline at end of file
> ghost_at_ghostwalk:/tmp$ ldd a.out
> linux-gate.so.1 => (0xffffe000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40029000)
> libm.so.6 => /lib/tls/libm.so.6 (0x40106000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4012c000)
> libc.so.6 => /lib/tls/libc.so.6 (0x40137000)
> /lib/ld-linux.so.2 (0x40000000)
>
>
> See, libstdc++.so.5 is used in one case and libstd++.so.6 is used in another
> case. For libgcc_s.so.1 -- I actually don't know. It seems like only one
> version can be installed at a time, so probably they just sure that all
> versions are binary compatible.
IOW, they would mix libraries from different GCC versions when using 3.4.x,
4.0.x, and 4.1.x, because they all use libstdc++.so.6.
I have no idea about the guarantees GCC makes about the stability of this
library, but didn't the C++ ABI change in all of these versions?
Markus
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk