Subject: | Problem compiling with JPEG support on OSX |
Date: | Thu, 22 Aug 2013 15:17:02 -0700 |
To: | bug-Imager [...] rt.cpan.org |
From: | Jonathan Field <jfield [...] gmail.com> |
Hello,
First, thanks for building my favorite image manipulation package :) I have
used it many times successfully on Linux systems. However...
I am trying to build Imager 0.97 with jpeg support on OS X 10.8.4 (Mountain
Lion). I have tried with libjpeg 6b, 7, 8d, and 9. In each case I am
getting the same error in the perl Makefile.PL output:
JPEG: main: includes found - libraries found
JPEG: Test code failed: Can't link/include 'jpeg'
JPEG: Checking if the compiler can find them on its own
JPEG: Test code failed: Can't link/include 'jpeg'
(Full output of perl Makefile.PL is at the bottom of the email)
I configured the libjpeg libraries with --enable-shared and
--enable-static, and "make test" reported no problems. They are in
/usr/local/lib:
-rwxr-xr-x 1 root admin 145076 Aug 22 13:47 libjpeg.62.dylib*
-rwxr-xr-x 1 root admin 267252 Aug 22 14:12 libjpeg.7.dylib*
-rwxr-xr-x 1 root admin 277952 Aug 22 14:16 libjpeg.8.dylib*
-rwxr-xr-x 1 root admin 281440 Aug 22 14:18 libjpeg.9.dylib*
-rw-r--r-- 1 root admin 1281080 Aug 22 14:18 libjpeg.a
lrwxr-xr-x 1 root admin 15 Aug 22 14:18 libjpeg.dylib@ ->
libjpeg.9.dylib
-rwxr-xr-x 1 root admin 910 Aug 22 14:18 libjpeg.la*
I verified after each libjpeg install that the symlink was pointing to the
version just installed. And /usr/local/include has the following file,
which was correctly updated after each libjpeg installation:
-rw-r--r-- 1 root admin 48910 Aug 22 14:18 jpeglib.h
Here's the output of perl -V:
Summary of my perl5 (revision 5 version 12 subversion 4) configuration:
Platform:
osname=darwin, osvers=12.0, archname=darwin-thread-multi-2level
uname='darwin b1026.apple.com 12.0 darwin kernel version 12.0.0: tue
may 15 23:31:29 pdt 2012; root:xnu-2050.6.70~1release_x86_64 x86_64 '
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=
-Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=clang'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='clang', ccflags ='-arch i386 -arch x86_64 -g -pipe -fno-common
-DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include',
optimize='-Os',
cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0
(tags/Apple/clang-418.0.60)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='clang -mmacosx-version-min=10.8', ldflags ='-arch i386 -arch x86_64
-fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-arch i386 -arch x86_64 -bundle -undefined
dynamic_lookup -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
Built under darwin
Compiled at Jun 20 2012 13:55:28
@INC:
/Library/Perl/5.12/darwin-thread-multi-2level
/Library/Perl/5.12
/Network/Library/Perl/5.12/darwin-thread-multi-2level
/Network/Library/Perl/5.12
/Library/Perl/Updates/5.12.4/darwin-thread-multi-2level
/Library/Perl/Updates/5.12.4
/System/Library/Perl/5.12/darwin-thread-multi-2level
/System/Library/Perl/5.12
/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.12
.
--- and here is the output of running Makefile.PL
jfield@laptop:~/Downloads/Imager-0.97 > perl Makefile.PL
done.
TT-fonts: includes not found - libraries not found
POSIX threads
Writing Makefile for Imager::CountColor
Writing Makefile for Imager::Filter::DynTest
FreeType 2: main: includes not found - libraries found
FreeType 2: alt 1: includes found - libraries found
FreeType 2: Test code failed: Can't link/include 'ft2build.h', 'freetype'
FreeType 2: alt 2: includes not found - libraries found
FreeType 2: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -lfreetype
FreeType 2: Test code failed: Can't link/include 'ft2build.h', 'freetype'
Writing Makefile for Imager::Filter::Flines
GIF: main: includes not found - libraries not found
GIF: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -lgif
GIF: Test code failed: Can't link/include 'gif_lib.h', 'stdio.h',
'errno.h', 'string.h', 'gif'
Writing Makefile for Imager::File::ICO
JPEG: main: includes found - libraries found
JPEG: Test code failed: Can't link/include 'jpeg'
JPEG: Checking if the compiler can find them on its own
JPEG: Test code failed: Can't link/include 'jpeg'
Writing Makefile for Imager::Filter::Mandelbrot
PNG: Generic: includes found - libraries found
PNG: Test code failed: Can't link/include 'png'
PNG: v1.6: includes not found - libraries not found
PNG: v1.5: includes found - libraries found
PNG: Test code failed: Can't link/include 'png15'
PNG: v1.4: includes not found - libraries not found
PNG: v1.2: includes not found - libraries not found
PNG: v1.0: includes not found - libraries not found
PNG: base (+libz): includes found - libraries found
PNG: Test code failed: Can't link/include 'png', 'z'
PNG: v1.6 (+libz): includes not found - libraries not found
PNG: v1.5 (+libz): includes found - libraries found
PNG: Test code failed: Can't link/include 'png15', 'z'
PNG: v1.4 (+libz): includes not found - libraries not found
PNG: v1.2 (+libz): includes not found - libraries not found
PNG: v1.0 (+libz): includes not found - libraries not found
PNG: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -lpng
PNG: Test code failed: Can't link/include 'png.h', 'stdio.h', 'png'
Writing Makefile for Imager::File::SGI
T1Lib: main: includes not found - libraries not found
T1Lib: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -lt1
T1Lib: Test code failed: Can't link/include 't1lib.h', 't1'
TIFF: main: includes found - libraries found
TIFF: Test code failed: Can't link/include 'tiff'
TIFF: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -ltiff
TIFF: Test code failed: Can't link/include 'tiffio.h', 'stdio.h',
'string.h', 'tiff'
Win32: main: includes not found - libraries not found
Win32: Checking if the compiler can find them on its own
Note (probably harmless): No library found for -lgdi32
Win32: Test code failed: Can't link/include 'windows.h', 'gdi32'
Writing Makefile for Imager::plugins
Writing Makefile for Imager
Libraries *not* found:
FT2
GIF
JPEG
PNG
T1
TIFF
Win32
Any suggestions?
Jonathan Field