[Xquartz-dev] libXdamage, compatibility version 3.0.0

Jeremy Huddleston jeremyhu at apple.com
Wed Jan 7 11:32:11 PST 2009


On Jan 7, 2009, at 02:38, Simone Karin Lehmann wrote:

> ----- original Nachricht --------
>
> Betreff: Re: [Xquartz-dev] libXdamage, compatibility version 3.0.0
> Gesendet: Mi, 07. Jan 2009
> Von: Jeremy Huddleston<jeremyhu at apple.com>
>
>> How are you building all the dependencies? Are you using fink?
>> macports? by hand?
>
> I'm using MacPorts as a basis and have frozen most of the needed  
> Portfiles so that I can ensure that the different builds which are  
> provided on GIMP on OS X use the same ports versions even if they  
> are compiled on different machines.  I've build GIMP using MacPorts  
> on 10.5.6 with XCode 3.0. So IMO this uses 10.5 SDK.

Not unless you build with the universal variant.  By default, Macports  
uses the system includes and libs rather than the SDK ones.

> Prior to installing XQuartz 2.3.2 libXdamage had compatibility  
> version 2.0.0

It's been at 3.0.0 since XQuartz 2.2.0.1 (http://xquartz.macosforge.org/trac/wiki/X112.2.0.1 
).  The version in 10.5.6 is 2.0.0.  The version in the 10.5 SDK is  
3.0.0.  That version should not be there.  It is a bug that I  
introduced when I was starting at Apple last year.  I accidently  
pushed some changes that were intended for SnowLeopard into the train  
that was for XCode-3.1 (at the time, I thought Xcode-3.1 was for  
SnowLeopard and not a Leopard Update).  When I was corrected about  
that misunderstanding, I reverted the changes, but I seem to have  
missed atleast this one.  I'm going to try to get that fixed in an  
XCode update ASAP, and I'm sorry for that.

> and libgtk-x11, build with MacPorts, linked against that and  
> everything ran well.
> After upgrading my machine to XQuartz 2.3.2.1 (still 10.5.6, XCode  
> 3.0) and rebuilding GIMP, libgtk-x11 got linked against libXdamage  
> with compatibility version 3.0.0.
> Now users complain, that GIMP doesn't launch because of an  
> incompatible library version. This occurs if they run some XQuartz  
> version prior to 2.3.2

No, they can run anything from 2.2.0 onward and will have that library.

> So it seems to me, that XQuartz 2.3.2.1 has somehow brought this  
> into my system.

yes.

> How can this be fixed?

1) Use the SDK.  You will need to add "-isysroot /Developer/SDKs/ 
MacOSX10.5.sdk" to CFLAGS, CXXFLAGS, OBJCFLAGS, and LDFLAGS.  Or you  
can just enable the universal variant.

> Does reinstalling XCode 3.0 help in any way?

No, you should actually reinstall XQuartz 2.3.2.1 after you install  
XCode.

> Or will this conflict with an installed XQuartz 2.3.2.1, if I  
> rebuild GIMP? XCode 3.0 provides libXdamage compatibility version  
> 2.0.0. Will this brake XQuartz 2.3.2.1 clients as they might be  
> linked against compatibility version 3.0.0?

No.  The computability version 3 means that the library is compatible  
with all ABI up through version 3.  The compatability version 2 means  
the library is compatible with all ABI up through version 2.  When you  
link, the resulting binary stores the compatibility version of the lib  
and makes sure the runtime library's compat version is >= the stored  
one.

Hence your problem.  You're linking against version 3 and others are  
trying to run with version 2.  If you use the 10.5 SDK in XCode 3.0.0,  
you should be fine.

Furthermore, X11 in Macports is getting some updates right now.  I  
just introduced the system_x11 variant and will soon be moving all the  
ports to depend on port:xorg-libXXXX rather than lib:libXXXX:xorg- 
libXXXX.  If you want to continue linking against the system X11, you  
should set the system_x11 variant globally.  If you want to be extra  
careful and don't care about bloating your Gimp.app, you can first  
install the xorg-libs port and have your .app bundle the libs it needs.

--Jeremy




More information about the Xquartz-dev mailing list