I’m trying to compile qemu-0.9.1 on opensuse 11.3. At a particular point in the make process, I get the following error:
*
/usr/lib/gcc/i586-suse-linux/4.5/…/…/…/…/i586-suse-linux/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [qemu-img] Error 1
*
However I have the zlib and the development headers already installed.
ravi@linux-u0gg:~> ls -l /usr/lib/libz.so
lrwxrwxrwx 1 root root 18 2011-01-28 15:39 /usr/lib/libz.so -> /lib/libz.so.1.2.3
Not able to understand why the linker won’t find the library…
Just as a double check, you do have /lib/libz.so.1.2.3? Oh I guess it would show up as a broken link otherwise. hmm…
Where’d you get the source? I could try to reproduce the error on my machine but it seems to be a different version on qemu.org.
I got it from here:
http://wiki.ok-labs.com/downloads/release-3.0/qemu-okl.0.9.1.tar.gz
Build using:
#./configure --target-list=arm-softmmu --disable-sdl --static --disable-gfx-check --disable-gcc-check
#make
if you’re linking with --static you need the static library, should have a .a extension. Haven’t downloaded this yet to see if that’s what passing --static to configure does, but if it does something else it’s poorly named.
I just did that! I did not have zlib-devel-static earlier. Compiles fine now 
ok I got the same error and fixed it. There’s a zlib-devel-static package in yast, never seen anything like it before, maybe it’s because no one figured out how to make the 32 and 64 bit versions live together peacefully so they made a way to ensure you only have one at a time, no idea.
My build bugged out later on like gnutils or something, but hopefully that’s just me not have a library you’re suppose to have.
edit heh, I’m sitting here typing this up editing it over and over without noticing you were done.