Re: Incompatibilities between home-compiled and apple's libpng
Re: Incompatibilities between home-compiled and apple's libpng
- Subject: Re: Incompatibilities between home-compiled and apple's libpng
- From: "D. Walsh" <email@hidden>
- Date: Mon, 10 Oct 2005 23:10:59 -0400
- Mta-interface: amavisd-new-2.3.3 (20050822) at daleenterprise.com
On Oct 10, 2005, at 09:09 , Peter O'Gorman wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Damien Bobillot wrote:
|
| D. Walsh wrote :
|
|> On Oct 10, 2005, at 07:05 , Damien Bobillot wrote:
|>
|>> Everything work until I tried to launch my program. The dynamic
|>> loader says :
|>>
|>>> dyld: Library not loaded: /System/Library/Frameworks/
|>>> ApplicationServices.framework/
|>>> Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/
|>>> libPng.dylib
|>>> Referenced from: /System/Library/Frameworks/
|>>> ApplicationServices.framework/
|>>> Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
|>>> Reason: Incompatible library version: ImageIO requires version
|>>> 1.0.0 or later,
|>>> but libpng12.0.dylib provides version 0.1.2
|>
|>
|> repackage the library with the correct values.
|> libtool -dynamic -o /usr/local/lib/libpng12.0.1.2.8.dylib -
framework
|> ApplicationServices -lSystem -lz -lcc_dynamic -
compatibility_version
|> 1.0.0 -current_version 1.0.2 -arch_only ppc / usr/local/lib/
libpng.a
I think that you'll find that this only works by accident. By (mis)
using
libtool as above you set the libraries install_name to
/usr/local/lib/libpng12.0.1.2.8.dylib while it previously was, I
guess,
libpng.dylib, and you can see how, on case-insensitive file
systems, the
dynamic linker might get confused between libPng.dylib and
libpng.dylib.
This doesn't work by mistake, it works because you are repackaging a
static library as a dynamic library and providing the current and
compatibility information.
Yes this can pose an issue but it wouldn't be something that the
average builder would run into if all included libraries used in an
application are included in the application bundle.
There is also a little bug in the dynamic linker in Mac OS X 10.4.x
with x <
3 where it will not load libraries with the same basename twice...
10.4.3 has been released???
Peter
-- Dale
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden