Mis-built Mac OS X 10.7 binaries
Posted: 2012-02-19T15:44:21-07:00
I tried downloading the binaries for ImageMagick for Lion. It looks like they are mis-built. The command line tools I tried (e.g. convert, montage) are linked to dylibs in /opt/local/lib which is not a standard Apple directory.
In addition, I think the version you linked to is different than the standard version. I think the OS is trying to fallback to /usr/lib, but the Apple version is lower than what you expect.
Sample Error:
dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib
Referenced from: /Users/foo/Downloads/bin/montage
Reason: Incompatible library version: montage requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0
Trace/BPT trap: 5
Here is the output of otool -L convert which clearly shows the bad /opt/local/lib directory dependencies.
otool -L convert
convert:
/ImageMagick-6.7.5/lib/libMagickCore.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/ImageMagick-6.7.5/lib/libMagickWand.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/usr/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/opt/local/lib/libltdl.7.dylib (compatibility version 11.0.0, current version 11.0.0)
/usr/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/usr/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
In addition, I think the version you linked to is different than the standard version. I think the OS is trying to fallback to /usr/lib, but the Apple version is lower than what you expect.
Sample Error:
dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib
Referenced from: /Users/foo/Downloads/bin/montage
Reason: Incompatible library version: montage requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0
Trace/BPT trap: 5
Here is the output of otool -L convert which clearly shows the bad /opt/local/lib directory dependencies.
otool -L convert
convert:
/ImageMagick-6.7.5/lib/libMagickCore.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/ImageMagick-6.7.5/lib/libMagickWand.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/usr/X11/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/opt/local/lib/libltdl.7.dylib (compatibility version 11.0.0, current version 11.0.0)
/usr/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/usr/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)