[magick-users] 32-bit compiling under 64-bits (libtool issues)

Gonzalo Garramuño ggarra at advancedsl.com.ar
Thu Oct 4 14:11:59 PDT 2007


I'm trying to compile ImageMagick under Ubuntu on a 64-bits machine but 
trying to obtain a 32-bits build.

Compile fails due to libtools picking the wrong library.  I was 
wondering if someone could help out.  Here's what I'm doing.

os=`uname`
version=`uname -r`
root=$PWD

export CFLAGS="-m32 -I/usr/include"
export CXXFLAGS="-m32 -I/usr/include"
export LDFLAGS="-m32 -L/usr/local/lib32 -L/emul/ia32-linux/usr/lib"
export PKG_CONFIG_PATH="/usr/local/lib32"

mkdir -p BUILD/$os-32-$version/
cd    BUILD/$os-32-$version/

opts=" --enable-shared --enable-static --with-pic  --with-modules 
--enable-modules --with-quantum-depth=32 --without-perl --without-lcms 
--without-openexr --with-gs-font-dir=/usr/share/fonts/type1/gsfonts"
opts="$opts --libdir=/usr/local/lib32"

$root/configure $opts && make && sudo make install


... the build proceeds fine until libtool screws up....

/bin/bash ./libtool --tag=CC --mode=link gcc  -m32 -I/usr/include -Wall 
-W -pthread  -m32 -L/usr/local/lib32 -L/emul/ia32-linux/usr/lib 
-lfreetype -lz -o utilities/animate -m32 -L/usr/local/lib32 
-L/emul/ia32-linux/usr/lib -lfreetype -lz utilities/animate.o 
magick/libMagick.la wand/libWand.la

gcc -m32 -I/usr/include -Wall -W -pthread -m32 -o utilities/animate -m32 
utilities/animate.o  -L/usr/local/lib32 -L/emul/ia32-linux/usr/lib 
magick/.libs/libMagick.a wand/.libs/libWand.a -ltiff -ljpeg -lfontconfig 
-lXext -lbz2 -lpthread /usr/lib/libfreetype.so -lz -ldl -lSM -lICE -lX11 -lm
/usr/lib/libfreetype.so: could not read symbols: File in wrong format

(Notice the bad libfreetype path)

$ file /usr/lib32/libfreetype.so /usr/lib32/libfreetype.so.6.3.10
/usr/lib32/libfreetype.so:        symbolic link to `libfreetype.so.6.3.10'
/usr/lib32/libfreetype.so.6.3.10: ELF 32-bit LSB shared object, Intel 
80386, version 1 (SYSV), stripped

$ file /usr/lib/libfreetype.so /usr/lib/libfreetype.so.6.3.10
/usr/lib/libfreetype.so:        symbolic link to `libfreetype.so.6.3.10'
/usr/lib/libfreetype.so.6.3.10: ELF 64-bit LSB shared object, x86-64, 
version 1 (SYSV), stripped

I was wondering if anyone had any ideas on how to fix this.

-- 
Gonzalo Garramuño
ggarra at advancedsl.com.ar

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy



More information about the Magick-users mailing list