<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:jfonseca@vmware.com" title="José Fonseca <jfonseca@vmware.com>"> <span class="fn">José Fonseca</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - reducing symbol visibility of shared objects / static libstdc++"
href="https://bugs.freedesktop.org/show_bug.cgi?id=59879">bug 59879</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>jfonseca@vmware.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - reducing symbol visibility of shared objects / static libstdc++"
href="https://bugs.freedesktop.org/show_bug.cgi?id=59879#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - reducing symbol visibility of shared objects / static libstdc++"
href="https://bugs.freedesktop.org/show_bug.cgi?id=59879">bug 59879</a>
from <span class="vcard"><a class="email" href="mailto:jfonseca@vmware.com" title="José Fonseca <jfonseca@vmware.com>"> <span class="fn">José Fonseca</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=59879#c0">comment #0</a>)
<span class="quote">> Hello,
>
> this is sort of cleaned up report of <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - unreal tournament crashes with mesa 7.11-dev"
href="show_bug.cgi?id=37637">bug #37637</a>.
>
> To quickly summarize what happens there: Build r600g with the llvm compiler
> backend and try starting ut2003. Segfault happens since apparantly ut's
> engine has a version of libstdc++ built in, which now clashes with the
> libstdc++ shared lib which either r600_dri.so or LLVM (when build as shared)
> loads. This is independent of preloading order. When the symbols from the
> system libstdc++ take preference, then the game engine crashes. When the
> game engine symbols take preference, the r600g driver initialization crashes.
>
> The fix for the problem: Since we can't modify the ut2003 binary, we have to
> hide the "duplicate" symbols somehow.
>
> This means:
> - build r600g with static llvm
> - build r600 with static libstdc++</span >
[...]
<span class="quote">> What I'm struggling with is properly telling autotools to build a shared lib with static libstdc++. The gcc manpage mentions an option called "-static-libstdc++", but it doesn't seem to have any effect.</span >
AFAIK, -static-libstdc++ allows one to statically link libstdc++ to an
_executable_, not to a dynamic library (as it lacks -fPIC).
I see two ways of achieving this:
- have our own custom build of libstdc++ where we build a static library of
libstdc++.a with -fPIC.
- statically link (w/ -Bsymbolic) against stubs of libstdc++ symbols, where
each stub does dlsym(dlopen('/usr/lib32/libstdc++.so.6', RTLD_LOCAL), "foo")
FWIW, either seem a lot of work just for sake of an old binary-only game.
The ideal would be for UT to rely on distro's libstdc++ instead of its own
version...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>