Strange Frameworks problem
Martin Costabel
costabel at wanadoo.fr
Fri Dec 1 23:37:46 PST 2006
Richard Peskin wrote:
> When I try to use "open" from the Terminal to start an application, I
> get a strange error, as follows:
> ----
> [harvey:~] rpeskin% open /Applications/TextEdit.app/
> dyld: Library not loaded:
> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.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 libJPEG.dylib provides version 0.0.0
> Trace/BPT trap
> [harvey:~] rpeskin%
> ---------------
> The strange aspect is that this error is user specific. It is not
> present, when "open" is used by another user. Nor is it present on
> another machine with the same OS and configuration (and users). Given
> that the dylib involved is a System, not user, lib, I really don't know
> where to begin to look to solve the problem. (The OSX is 10.4.8 )
Here is a guess:
Make sure that the user for whom this happens doesn't have the
environment variable DYLD_LIBRARY_PATH set. This variable is often
(mis-)used by false analogy to the linux variable LD_LIBRARY_PATH. It
should be used on MacOSX only in very specific circumstances.
A possible scenario is that you have some self-compiled or third-party
libjpeg.dylib with compatibility version 0.0.0 in /usr/local/lib or some
other place, and DYLD_LIBRARY_PATH is pointing to that place. The
sloppiness of Tiger's dyld that happily tries to load any library whose
name has some vague similarity to the one it is asked to load, combined
with Apple's stupid decision to choose names for system libraries that
are, modulo case sensitivity, identical to the names of ubiquitous open
source libraries, such as libJPEG.dylib, libGIF.dylib, libPng.dylib,
libTIFF.dylib and so on, is often leading to disaster. In addition, it
is hard to diagnose, because dyld is lying in its error messages. It is
pretty safe to assume that the library about whose compatibility version
0.0.0 it is complaining is not called libJPEG.dylib, but libjpeg.dylib.
Another workaround to this problem would be to remove the offending
libjpeg.dylib. A library of that name is usually (outside of Apple's
weird naming scheme for its system libraries) only needed at compile
time. The corresponding runtime library which you will need to keep has
a name like libjpeg.62.dylib or similar.
--
Martin
More information about the MacOSX-admin
mailing list