New Pixman Naming Scheme

Colin Guthrie gmane at
Wed Aug 8 01:07:51 PDT 2007

Daniel Stone wrote:
> On Tue, Aug 07, 2007 at 11:19:14PM +0100, Colin Guthrie wrote:
>> Soeren Sandmann wrote:
>>> Having a version number in the library name is just good practice
>>> IMO. It doesn't hurt anything and it substantially reduces the pain
>>> involved if an incompatible version has to be released.
>> Forgive me if I'm missing something but have major numbers not been part
>> of libraries for ages???
>> if I have
>> /usr/lib/
>> installed with cairo linked against it, there is nothing wrong with me
>> also having
>> /usr/lib/ installed and having Xserver link against that!!
> The problem is that if you have with int foo(long bar),
> and with void foo(int bar), which are _both linked into
> the same executable_: say Cairo links against 2, and GTK+ links against
> 1.  Resolution for foo will be random, thanks to a flat namespace, so
> eventually you're going to hit the wrong one.

Ahh I see. So the problem is not any given app linking against it but an
app linking against two libraries (or one directly one in a lib etc.)
that in themselves link against the different versions! Ugg! <head

> You can fix this pretty easily with versioned symbols, but pixman
> doesn't do that.
> OTOH, if you avoid function name reuse (i.e. rename any function that
> changes signature or behaviour, which includes all dependent signatures:
> if you change a structure size, you must rename all functions that get
> that structure passed in), then you're fine without versioned symbols.

I guess the latter is pretty nasty in terms of API change for apps that
use your lib so I can see why this is a not overly desirable solution.

OK I concede!


More information about the xorg mailing list