[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#319388: libGLU should hide C++ interfaces



Julien Cristau wrote:
On Tue, Aug 14, 2007 at 09:00:56 +0100, Brian Paul wrote:

On 8/14/07, Michel Dänzer <michel@tungstengraphics.com> wrote:
On Mon, 2007-08-13 at 17:58 -0700, Zack Weinberg wrote:
[...]
Second, the bin/mklib script has some internal support for restricting
the set of exports (the -exports option) but that feature has a
critical bug when used with Linux/Solaris version scripts: it assigns
all symbols the same version, derived from the soname.  This is wrong.
 Symbol versions are part of the ABI and need to stay stable once
assigned; if a program that wants, say, gluNewQuadric@GLU_1.0 is run
with a libglu.so that only has a @GLU_1.1 version, the dynamic linker
will barf.

My preferred way to deal with this would be to have a GNU-ld-style
version script for GLU in the source tree, and document that mklib
-exports expects a file in that format.  mklib would then convert that
to whatever format other platforms' linkers want -- as far as I know,
the GNU version script is strictly more featureful than any other
similar format. I'm not going to implement the conversions, though;
that's for the maintainers of the support for those other platforms.
Do you think that would be something you could get back into upstream?

Instead of doing that conversion, I suggest just changing mklib to not
set a version in the version script (none of the Makefiles in mesa
currently seem to use that, so it seems safe, if other platforms'
linkers can deal with that).

Go ahead and implement it and submit a patch to bugzilla.  Sounds good
from your description.

Attached two patches.  The first modifies mklib as mentioned above.  The
second uses that to restrict the list of symbols exported by libGLU
(I copied the list from src/glu/sgi/glu.def).

Looks good.  I'll push soon.

-Brian




Reply to: