libpng-1.2.10 failed while cross compiling as the dependency for GTK lib



Hi All,
I am trying to cross compile Gtk-2.8 library for my ARM11.
So as the dependency files
1. I cross compiled Glib-2.8.6
2. Cross compiled atk-1.10.3
3. freetype-2.1.9  cross compiled
4. zlib-1.2.3
But
libpng-1.2.10 failed to cross compile.

I did
In myconfigure.sh i wrote

#!/bin/bash -e
TOOLCHAIN="/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi"
PREFIX="/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local"
#PATH="/bin:$TOOLCHAIN/bin:$TOOLCHAIN/arm-linux/local/bin:/usr/bin"
LDFLAGS="-L$TOOLCHAIN/arm-none-linux-gnueabi/local/lib"

cp ./libpng.cache  config.cache

 ./configure  --prefix=$PREFIX --build=i386-linux --host=arm-linux \
  --cache-file=config.cache  \
  CC=arm-none-linux-gnueabi-gcc \
  NM=arm-none-linux-gnueabi-nm \
  AR=arm-none-linux-gnueabi-ar  \
  RANLIB=arm-none-linux-gnueabi-ranlib

Then i run
./myconfigure.sh

BUt it has given the following error.

/bin/sh ./libtool --tag=CC --mode=link arm-none-linux-gnueabi-gcc  -I/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local/include -g -O2  -L/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local/lib -o libpng12.la -rpath /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local/lib -no-undefined -export-dynamic -version-number 0:12:0 -Wl,--version-script=libpng.vers  libpng12_la-png.lo libpng12_la-pngset.lo libpng12_la-pngget.lo libpng12_la-pngrutil.lo libpng12_la-pngtrans.lo libpng12_la-pngwutil.lo libpng12_la-pngread.lo libpng12_la-pngrio.lo libpng12_la-pngwio.lo libpng12_la-pngwrite.lo libpng12_la-pngrtran.lo libpng12_la-pngwtran.lo libpng12_la-pngmem.lo libpng12_la-pngerror.lo libpng12_la-pngpread.lo libpng12_la-pnggccrd.lo  -lz -lm
arm-none-linux-gnueabi-gcc -shared  .libs/libpng12_la-png.o .libs/libpng12_la-pngset.o .libs/libpng12_la-pngget.o .libs/libpng12_la-pngrutil.o .libs/libpng12_la-pngtrans.o .libs/libpng12_la-pngwutil.o .libs/libpng12_la-pngread.o .libs/libpng12_la-pngrio.o .libs/libpng12_la-pngwio.o .libs/libpng12_la-pngwrite.o .libs/libpng12_la-pngrtran.o .libs/libpng12_la-pngwtran.o .libs/libpng12_la-pngmem.o .libs/libpng12_la-pngerror.o .libs/libpng12_la-pngpread.o .libs/libpng12_la-pnggccrd.o  -L/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local/lib -lz -lm  -Wl,--version-script=libpng.vers -Wl,-soname -Wl,libpng12.so.0 -o .libs/libpng12.so.0.12.0
/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/local/lib/libz.so when searching for -lz
/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/lib/libz.so when searching for -lz
/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/bin/../lib/libz.so when searching for -lz
/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/arm-none-linux-gnueabi/bin/../../arm-none-linux-gnueabi/lib/libz.so when searching for -lz
/opt/freescale/usr/local/gcc-4.1.1-glibc-2.4-nptl-2/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [libpng12.la] Error 1
make[1]: Leaving directory `/home/harsha/Desktop/SRCLibs/ALLGTK_NEW/libpng-1.2.12'
make: *** [all] Error 2


Infact the libzlib library files are in
$PREFIX/lib  directory.
Infact all cross compiled libraries are in $PREFIX/lib and
include files are in $PREFIX/include directory.


I have binutils cross compiled one.
I have gcc-4.1.1

Can any one help me what could be the proble?

Thanks in advance.

Regards,
Harsha






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]