Re: [Xquartz-dev] libXdamage, compatibility version 3.0.0
----- original Nachricht -------- Betreff: Re: [Xquartz-dev] libXdamage, compatibility version 3.0.0 Gesendet: Mi, 07. Jan 2009 Von: Jeremy Huddleston<jeremyhu@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.
If you build against the 10.4u SDK, it will work on 10.4, 10.5, and any version from http://xquartz.macosforge.org.
If you build against 10.5 SDK, it will not work on 10.4, but will work on any version of 10.5.x and any version from http://xquartz.macosforge.org
If you build against the system version installed with 10.5.x, it will not be guaranteed to work on versions of OSX less than 10.5.x (meaning if you build with 10.5.5, it won't be guaranteed to work on 10.5.4).
If you build against the system version after installing an update, it will not be guaranteed to work on earlier versions of the update.
This is the whole reason for providing the /Developer/SDKs/...
yep, I know this. So let's make things more clearer. I've build GIMP using MacPorts on 10.5.6 with XCode 3.0. So IMO this uses 10.5 SDK. Prior to installing XQuartz 2.3.2 libXdamage had compatibility version 2.0.0 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 So it seems to me, that XQuartz 2.3.2.1 has somehow brought this into my system. How can this be fixed? Does reinstalling XCode 3.0 help in any way? 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? -skl
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@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
Am 07.01.2009 um 20:32 schrieb Jeremy Huddleston: [...] Wow. Thank you for that very detailed and really helpful answer. This cleared up many things to me. Thanks.
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.
and thanks for this hint. Just one more question? If I build GIMP.app on a Tiger machine and do not set system_x11, which X server will be used and how do launch it? As on Tiger or as on Leopard? (Ok, ok, two questions...) -skl
On Jan 7, 2009, at 13:02, Simone Karin Lehmann wrote:
Am 07.01.2009 um 20:32 schrieb Jeremy Huddleston:
[...]
Wow. Thank you for that very detailed and really helpful answer. This cleared up many things to me. Thanks.
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.
and thanks for this hint. Just one more question? If I build GIMP.app on a Tiger machine and do not set system_x11, which X server will be used and how do launch it? As on Tiger or as on Leopard? (Ok, ok, two questions...)
system_x11 just controls the libraries that are linked against. It has nothing to do with the server. The user can use the Apple provided X11.app server or build their own from Macports if they like. If you do not set system_x11 and build on Tiger, then you'll have the "latest and greatest" X11 libs in your bundle and it will work on both Tiger and Leopard. As far as the server launching, I think Gimp.app itself has some logic that "just works"
Am 07.01.2009 um 23:03 schrieb Jeremy Huddleston:
If you do not set system_x11 and build on Tiger, then you'll have the "latest and greatest" X11 libs in your bundle and it will work on both Tiger and Leopard.
great. That would simplify things really a lot.
As far as the server launching, I think Gimp.app itself has some logic that "just works"
yep, I know. Most of this logic was written by me... ;-) -skl -- in the arms of your angel, you may find some comfort here.
participants (3)
-
Jeremy Huddleston
-
Simone Karin Lehmann
-
Simone Karin Lehmann