[Mesa-dev] Statically linking libstdc++ and libgcc

Francisco Jerez currojerez at riseup.net
Sun Mar 15 09:02:03 PDT 2015


Emil Velikov <emil.l.velikov at gmail.com> writes:

> On 14 March 2015 at 13:04, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 13/03/15 22:10, Francisco Jerez wrote:
>>> Emil Velikov <emil.l.velikov at gmail.com> writes:
> ...
>>>>
>>>>  * Use bundled library if newer (check the SONAME).
>>>>
>>>> For libgcc_s at least, the library does not seems to be forward compatible.
>>>>
>>>
>>> That belongs to your list of myths, see:
>>> https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
>>>
>> Well spotted! As I've checked this (experimentally) some months ago, but
>> I wasn't 100% sure about it - thus the "seems" rather than "is".
>>
>> Considering I cannot test atm (gcc 4.6 & gcc 4.7 fails to build), we'll
>> say that I was delusional and add it to the myths list :P
>>
> Upon closer read though the document it seems that my statement above
> should read "For libgcc_s at least, the library does not seem to be
> _backward_ compatible.". Which is exactly what the spec says.
>
> The SONAME has been libgcc_so.so.1 for quite some time, while new
> functions are added. As such when one links against libgcc_so.so.1 and
> uses __function_foo, an older library with the same SONAME, might not
> provide the it.
>
Of course, that's clear, and it's the reason for the whole breakage --
Steam is overriding the OS C++ runtime with an older minor version while
the ABI is not backwards-compatible.  That's why they should *only*
override the OS runtime if the bundled library is newer (as you seem to
have put into words yourself) *or* if it's a different, completely
ABI-incompatible SONAME.

> As a reminder - this solution/workaround that is disabled by default.
> It barely adds any code, plus people will have to explicitly opt-in to
> use it.
>
> -Emil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150315/c14bc809/attachment.sig>


More information about the mesa-dev mailing list