• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Incompatibilities between home-compiled and apple's libpng
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incompatibilities between home-compiled and apple's libpng


  • Subject: Re: Incompatibilities between home-compiled and apple's libpng
  • From: Andreas Grosam <email@hidden>
  • Date: Mon, 10 Oct 2005 18:56:23 +0200


On 10.10.2005, at 15: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.


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...


Peter

Peter is right, you are doing dangerous things here. You provide a different version of libpng and pretend it would be the original one. I'll bet it will crash soon.
Even more, you change system files. This makes your system unique in the world - means, your products only run/crash on your system.
When you update Mac OS X the original library might be re-installed.



Not sure if installing your own libpng from darwinports (or Fink) can solve your problem. At least it gets its own independend installation dir and does not touch system files. darwinport takes care of the X11 system installation.
If it's only your code which depends on libpng then this should work (it does so for other apps). libpng“s name is libpng12.dylib, so the names will not conflict - even with the bug in the dynamic linker.
pck-config returns version 1.2.8 for libpng12.dylib.


Note: if you build an OS X app bundle, you might consider to buiid third party libs as frameworks and put it locally into the app bundle. Your app then references only system and app-local frameworks/libs and does not depend on a darwinport or Fink installation which has also to be available on the customers system.

Regards
Andreas


-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBQ0poE7iDAg3OZTLPAQJMNQP+L0OJO/TrMwwha5T6B0RlrFb2FA7xrgad
nNiYbWLbVutZIbpriURM15mchLCKEExnWxGwsQ/bgDLPZHFFUunxavcJgoQAHxCv
vsflSVULDm1hL2evDaJq4ykaW+R8J0SM5Wb00eJabei2V/eRculbjBKeljAjPZ3c
0WnK3kWFrNI=
=cvnf
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Incompatibilities between home-compiled and apple's libpng (From: Damien Bobillot <email@hidden>)
 >Re: Incompatibilities between home-compiled and apple's libpng (From: "D. Walsh" <email@hidden>)
 >Re: Incompatibilities between home-compiled and apple's libpng (From: Damien Bobillot <email@hidden>)
 >Re: Incompatibilities between home-compiled and apple's libpng (From: "Peter O'Gorman" <email@hidden>)

  • Prev by Date: Re: Cross-SDK CGImageCreate
  • Next by Date: Re: java debugger
  • Previous by thread: Re: Incompatibilities between home-compiled and apple's libpng
  • Next by thread: Re: Incompatibilities between home-compiled and apple's libpng
  • Index(es):
    • Date
    • Thread