I have difficulties to link an ImageMagick build against my own delegate library builds.
Freetype seems to be particulary rebellious.
Dowloading freetype-2.3.9 and building with
Code: Select all
DIR=/data/install
./configure \
CPPFLAGS=-I$DIR/include \
LDFLAGS=-L$DIR/lib \
--prefix=$DIR --enable-shared --disable-dependency-tracking
Now
Code: Select all
cd ImageMagick-6.5.6-9
./configure \
--prefix=$DIR \
CPPFLAGS="-I$DIR/inlcude" LDFLAGS="-L$DIR/lib -R$DIR/lib" \
--with-freetype=yes
Code: Select all
...
LDFLAGS = -Wl,-zlazyload -L/data/install/axel-imagemagick/install/lib -R/data/install/axel-imagemagick/install/lib -L/usr/openwin/lib -R/usr/openwin/lib -L/opt/csw/lib
MAGICK_LDFLAGS = -L/data/install/axel-imagemagick/install/lib -Wl,-zlazyload -L/data/install/axel-imagemagick/install/lib -R/data/install/axel-imagemagick/install/lib -L/usr/openwin/lib -R/usr/openwin/lib -L/opt/csw/lib
LIBS = -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lsocket -lnsl -lXt -lbz2 -lz -lm -lpthread
...
of the freshly built libfreetype.
This breaks the further compilation
Code: Select all
ld: warning: symbol `tt_cmap2_class_rec' has differing sizes:
(file /data/install/lib/libfreetype.so value=0x34; file /opt/csw/lib/libfreetype.so value=0x20);
/data/install/lib/libfreetype.so definition taken
ld: fatal: recording name conflict: file `/data/install/lib/libfreetype.so' and file `/opt/csw/lib/libfreetype.so' provide identical dependency names: libfreetype.so.6 (possible multiple inclusion of the same file)
ld: fatal: File processing errors. No output written to magick/.libs/libMagickCore.so.2.0.0
collect2: ld returned 1 exit status
a FREETYPE_LIBS or freetype_config variable but couldn't get them to influence the build.
The question concerns other libraries as well (libtiff). What's the proper
way to enforce the IM build process to use specific libraries?
Thanks for any hints
Axel