Configure bug? Building with libtiff on macOSX 10.12
Posted: 2016-12-08T09:58:50-07:00
I don't know autoconf so I don't know if this is a bug in the script or something I'm doing wrong. Please let me know.
When I configure ImageMagick on macOS, it fails to find libtiff:
When I look at config.log, I see the build of conftest.c for the failed tests and the issue is not the missing TIFF* calls, it's that the linker can't find zlib. One example:
I verified that by manually running the build of that conftest.c and adding "-lz' to the link line and it built successfully.
Why isn't configure adding -lz to the linker line? Is it a missing dependency somewhere or is my system messing it up?
My configure options:
The compile/link line (from config.log) that is missing the -lz:
Thanks,
Dave
When I configure ImageMagick on macOS, it fails to find libtiff:
Code: Select all
checking for TIFF...
checking tiff.h usability... yes
checking tiff.h presence... yes
checking for tiff.h... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFOpen in -ltiff... no
checking for TIFFClientOpen in -ltiff... no
checking for TIFFIsByteSwapped in -ltiff... no
checking for TIFFReadRGBATile in -ltiff... no
checking for TIFFReadRGBAStrip in -ltiff... no
checking if TIFF package is complete... no -- some components failed test
Code: Select all
Undefined symbols for architecture x86_64:
"_deflate", referenced from:
_PixarLogPostEncode in libtiff.a(tif_pixarlog.o)
_PixarLogEncode in libtiff.a(tif_pixarlog.o)
_ZIPPostEncode in libtiff.a(tif_zip.o)
_ZIPEncode in libtiff.a(tif_zip.o)
Why isn't configure adding -lz to the linker line? Is it a missing dependency somewhere or is my system messing it up?
My configure options:
Code: Select all
./configure --disable-installed --disable-shared --enable-delegate-build --prefix=/Users/Dave/projects/ImageMagick --disable-dependency-tracking --without-x --without-perl --without-magick-plus-plus --without-bzlib --without-xml --without-lzma --with-zero-configuration --disable-docs
Code: Select all
configure:33746: checking for TIFFOpen in -ltiff
configure:33771: gcc -o conftest -I/Users/Dave/projects/ImageMagick/include/libpng16 -I/Users/Dave/projects/ImageMagick/include/freetype2 -I/Users/Dave/projects/ImageMagick/include -I/Users/Dave/projects/ImageMagick/include/libpng16 -I/Users/Dave/projects/ImageMagick/include -g -O2 -Wall -mtune=sandybridge -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/jpeg -I/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/png -I/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/tiff/libtiff -I/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/zlib -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/jpeg/.libs -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/jpeg -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/png/.libs -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/png -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/tiff/libtiff/.libs -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/tiff/libtiff -L/Users/Dave/projects/ImageMagick/ImageMagick-7.0.3-9/zlib conftest.c -ltiff -ljpeg -lm >&5
Thanks,
Dave