Problem compiling sample code - cannot find libz.so.1

Jeff
Hi,

I'm having problems cross-compiling anything for the mini6410, as
everything I try throws out an error from the assembler to say it can't
find one of the shared libs, libz.so.1

[jeff@xxxx led-player]$ make
arm-linux-gcc -Wall -O2 led-player.c -o led-player
/opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../
../arm-none-linux-gnueabi/bin/as:
error while loading shared libraries: libz.so.1: cannot open shared object
file: No such file or directory
make: *** [led-player] Error 1
[jeff@xxxx led-player]$ which arm-linux-gcc
/opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc
[jeff@xxxx led-player]$ 


This happens even with the supplied samples, like led-player.  I've tried
adding the folder that contains libz.so.1 to LIBRARY_PATH in the
environment and various versions of the -B switch to gcc, but nothing gets
me past this error.

Any ideas how to fix this would be greatly appreciated!

Platform is Fedora (FC16) x86_64.

Thanks!

Jeff

Juergen Beisert
Seems your host does not provide a 'libz.so.1' library required by this
toolchain. Maybe it is a 32 bit binary and you run it on a 64 bit machine
without this compatible library for 32 bit programs.

Jeff
Juergen,

It's a cross-compile, so I don't think 32/64 or my system have any bearing
on it.

It's the ARM libz that it ought to be picking up - that's in one of the
FriendlyARM toolchain lib folders.  My problem is, the compiler/assembler
isn't finding it and I can't seem to identify how it's deciding where to
look for it.

Jeff

Juergen Beisert
No, error while loading shared libraries: libz.so.1: cannot open shared
object" is a message when your host tries to run a binary and does not find
a shared library this binary depends on.

Run "ldd
/opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../

../arm-none-linux-gnueabi/bin/as" and see what else is missing.

Jeff
Juergen, you're a star!  I hadn't thought of it that way around, but it
makes sense now you explain it.

Tried the compile on a 32-bit Linux host and it's fine, so I'll sort out
the 32-bit libc/libz and all should be well.

:-)

Thanks!

Jeff