Problem installing 6.4.2 on OS X

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Problem installing 6.4.2 on OS X

Post by rmagick »

I'm having trouble installing ImageMagick 6.4.2-0 on OS X. The make command fails with the following message:

Code: Select all

/bin/sh ./libtool --silent --tag=CC   --mode=link gcc  -g -O2 -Wall -W -D_THREAD_SAFE -no-undefined -export-symbols-regex ".*" -module -avoid-version -L/usr/X11/lib -R/usr/X11/lib -L/usr/local/lib -lfreetype -lz -o coders/png.la -rpath /usr/local/lib/ImageMagick-6.4.2/modules-Q8/coders coders/coders_png_la-png.lo magick/libMagickCore.la -lpng -ljpeg -lz -lm 
16:58:52: i686-apple-darwin9-gcc-4.0.1: /usr/X11/lib/libpng12.0.26.0.dylib: No such file or directory
libpng is installed in /usr/local/lib. I've attached the output from make below. Please let me know if you need any other information.

Code: Select all

make
make  all-am
cp libpng-config libpng12-config
cp libpng.pc libpng12.pc
Return code 0
sudo make install
test -z "/usr/local/bin" || ./install-sh -c -d "/usr/local/bin"
 /usr/bin/install -c 'libpng12-config' '/usr/local/bin/libpng12-config'
test -z "/usr/local/lib" || ./install-sh -c -d "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'libpng12.la' '/usr/local/lib
libtool: install: /usr/bin/install -c .libs/libpng12.0.dylib /usr/local/lib/libpng12.0
libtool: install: (cd /usr/local/lib && { ln -s -f libpng12.0.dylib libpng12.dylib || 
libtool: install: /usr/bin/install -c .libs/libpng12.lai /usr/local/lib/libpng12.la
libtool: install: /usr/bin/install -c .libs/libpng12.a /usr/local/lib/libpng12.a
libtool: install: chmod 644 /usr/local/lib/libpng12.a
libtool: install: ranlib /usr/local/lib/libpng12.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'libpng.la' '/usr/local/lib/l
libtool: install: /usr/bin/install -c .libs/libpng.3.dylib /usr/local/lib/libpng.3.dyl
libtool: install: (cd /usr/local/lib && { ln -s -f libpng.3.dylib libpng.dylib || { rm
libtool: install: /usr/bin/install -c .libs/libpng.lai /usr/local/lib/libpng.la
libtool: install: /usr/bin/install -c .libs/libpng.a /usr/local/lib/libpng.a
libtool: install: chmod 644 /usr/local/lib/libpng.a
libtool: install: ranlib /usr/local/lib/libpng.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make  install-exec-hook
cd /usr/local/bin; rm -f libpng-config
cd /usr/local/bin; ln -s libpng12-config libpng-config
+ cd /usr/local/lib
+ for ext in a la so sl dylib
+ rm -f libpng.a
+ test -f libpng12.a
+ ln -s libpng12.a libpng.a
+ for ext in a la so sl dylib
+ rm -f libpng.la
+ test -f libpng12.la
+ ln -s libpng12.la libpng.la
+ for ext in a la so sl dylib
+ rm -f libpng.so
+ test -f libpng12.so
+ for ext in a la so sl dylib
+ rm -f libpng.sl
+ test -f libpng12.sl
+ for ext in a la so sl dylib
+ rm -f libpng.dylib
+ test -f libpng12.dylib
+ ln -s libpng12.dylib libpng.dylib
test -z "/usr/local/share/man/man3" || ./install-sh -c -d "/usr/local/share/man/man3"
 /usr/bin/install -c -m 644 './libpng.3' '/usr/local/share/man/man3/libpng.3'
 /usr/bin/install -c -m 644 './libpngpf.3' '/usr/local/share/man/man3/libpngpf.3'
test -z "/usr/local/share/man/man5" || ./install-sh -c -d "/usr/local/share/man/man5"
 /usr/bin/install -c -m 644 './png.5' '/usr/local/share/man/man5/png.5'
test -z "/usr/local/lib/pkgconfig" || ./install-sh -c -d "/usr/local/lib/pkgconfig"
 /usr/bin/install -c -m 644 'libpng12.pc' '/usr/local/lib/pkgconfig/libpng12.pc'
test -z "/usr/local/include/libpng12" || ./install-sh -c -d "/usr/local/include/libpng
 /usr/bin/install -c -m 644 'png.h' '/usr/local/include/libpng12/png.h'
 /usr/bin/install -c -m 644 'pngconf.h' '/usr/local/include/libpng12/pngconf.h'
make  install-data-hook
cd /usr/local/include; rm -f png.h pngconf.h
cd /usr/local/include; ln -s libpng12/png.h png.h
cd /usr/local/include; ln -s libpng12/pngconf.h pngconf.h
cd /usr/local/lib/pkgconfig; rm -f libpng.pc
cd /usr/local/lib/pkgconfig; ln -s libpng12.pc libpng.pc
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Problem installing 6.4.2 on OS X

Post by rmagick »

Brilliant! Yiming Liu nailed the problem. I edited the /usr/X11/lib/libpng12.la file per his suggestion and it worked. I have another system that has an earlier version of Xcode installed and it does not have this problem.

However, I have a good version of libpng installed in /usr/local/lib, so if the ImageMagick make file could be changed to search that directory first, instead of /usr/X11/lib, then we could bypass this problem.

Here's the failing command. Is there a way of working around this problem until Apple fixes Xcode?

Code: Select all

/bin/sh ./libtool --silent --tag=CC   --mode=link gcc  -g -O2 -Wall -W -D_THREAD_SAFE -no-undefined -export-symbols-regex ".*" -module -avoid-version -L/usr/X11/lib -R/usr/X11/lib -L/usr/local/lib -lfreetype -lz -o coders/png.la -rpath /usr/local/lib/ImageMagick-6.4.2/modules-Q8/coders coders/coders_png_la-png.lo magick/libMagickCore.la -lpng -ljpeg -lz -lm
 powerpc-apple-darwin9-gcc-4.0.1: /usr/X11/lib/libpng12.0.26.0.dylib: No such file or directory
Post Reply