LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2010, 12:56 AM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
cannot compile qemu - cannot find zlib


Code:
# make
  CC    block/qcow.o
block/qcow.c:27:18: zlib.h: No such file or directory
How do i fix?
 
Old 02-23-2010, 01:57 AM   #2
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Have you tried downloading and building with make?
There may be missing dependencies to zlib itself.
I know that you don't use FreeBSD; but, the following information may be useful to you.
Go to http://www.freebsd.org/ports/index.html and type qemu in the search bar.
All of the dependencies are there. You can use the same search engine to ee what dependencies those dependencies require. The search can also be used for zlib and its dependencies. Just use it for a reference.

Last edited by Mr-Bisquit; 02-23-2010 at 02:03 AM.
 
Old 02-23-2010, 05:51 AM   #3
shpenat
Member
 
Registered: Dec 2008
Distribution: LFS
Posts: 99

Rep: Reputation: 21
you dont have zlib headers installed. If you didnt install zlib from source, go to your package manager and look for zlib-dev package.
 
Old 02-23-2010, 12:08 PM   #4
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
But i tried installing zlib twice.
Code:
# whereis zlib.*
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
 
Old 02-23-2010, 12:14 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by smeezekitty View Post
But i tried installing zlib twice.
Code:
# whereis zlib.*
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
Did you rerun ./configure, or what ever qemu uses to generate its Makefiles?

Evo2.

Last edited by evo2; 02-23-2010 at 12:15 PM. Reason: typo
 
Old 02-23-2010, 12:31 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Code:
# ./configure --disable-werror --disable-linux-aio --enable-system

Error: zlib check failed
Make sure to have the zlib libs and headers installed.

Install prefix    /usr/bin
BIOS directory    /usr/bin
binary directory  /usr/bin
Source path       /root/qemu/
C compiler        gcc
Host C compiler   gcc
CFLAGS            -O2 -g
QEMU_CFLAGS       -m32 -Wold-style-definition -I. -I$(SRC_PATH) -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOU
RCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing
LDFLAGS           -Wl,--warn-common -m32 -g
make              make
install           install
host CPU          i486
host big endian   no
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-so
ftmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
-Werror enabled   no
SDL support       yes
curses support    yes
curl support      no
check support     no
mingw32 support   no
Audio drivers     
Extra audio cards ac97 es1370 sb16
Block whitelist
Mixer emulation   no
VNC TLS support   no
VNC SASL support  no
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
NPTL support      no
GUEST_BASE        yes
PIE user targets  no
vde support       no
IO thread         no
Linux AIO support no
Install blobs     yes
KVM support       no
fdt support       no
preadv support    no
fdatasync         no
uuid support      no
ln: creating symbolic link `i386-softmmu/Makefile': File exists
ln: creating symbolic link `x86_64-softmmu/Makefile': File exists
ln: creating symbolic link `arm-softmmu/Makefile': File exists
ln: creating symbolic link `cris-softmmu/Makefile': File exists
ln: creating symbolic link `m68k-softmmu/Makefile': File exists
ln: creating symbolic link `microblaze-softmmu/Makefile': File exists
ln: creating symbolic link `mips-softmmu/Makefile': File exists
ln: creating symbolic link `mipsel-softmmu/Makefile': File exists
ln: creating symbolic link `mips64-softmmu/Makefile': File exists
ln: creating symbolic link `mips64el-softmmu/Makefile': File exists
ln: creating symbolic link `ppc-softmmu/Makefile': File exists
ln: creating symbolic link `ppcemb-softmmu/Makefile': File exists
ln: creating symbolic link `ppc64-softmmu/Makefile': File exists
ln: creating symbolic link `sh4-softmmu/Makefile': File exists
ln: creating symbolic link `sh4eb-softmmu/Makefile': File exists
ln: creating symbolic link `sparc-softmmu/Makefile': File exists
ln: creating symbolic link `sparc64-softmmu/Makefile': File exists
ln: creating symbolic link `libhw32/Makefile': File exists
ln: creating symbolic link `libhw64/Makefile': File exists
ln: creating symbolic link `libuser/Makefile': File exists
 
Old 02-23-2010, 12:58 PM   #7
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Download and build zlib from source.
Have you built the headers for zlib?
shpenat was right, try the dev package.
What distro are you currently compiling qemu for?
 
Old 02-23-2010, 01:12 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by Mr-Bisquit View Post
Download and build zlib from source.
Have you built the headers for zlib?
I did build zlib from source
Quote:
What distro are you currently compiling qemu for?
Damn small linux.
 
Old 02-23-2010, 01:16 PM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
The configure script error doesn't say it the problem is finding the header or the lib itself.
Do you have a /usr/lib/libz.so and/or /usr/lib/libz.a ?

Also you may do well to rm config.cache (IIRC), or even restart with a freshly untarred source dir.

Evo2.
 
Old 02-23-2010, 01:19 PM   #10
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Are the kernel headers available for DSL?
If not, you're going to need to add an apt-get repository which has them.

DSL is better as a guest; but, I also thought that the live version had qemu installed as a package.
 
Old 02-23-2010, 01:24 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by evo2
The configure script error doesn't say it the problem is finding the header or the lib itself.
Do you have a /usr/lib/libz.so and/or /usr/lib/libz.a ?

Also you may do well to rm config.cache (IIRC), or even restart with a freshly untarred source dir.

Evo2.
Code:
#whereis libz
libz: /lib/libz.a /usr/lib/libz.a /usr/local/lib/libz.a
#rm config.cache
rm: cannot remove config.cache: no such file or directory
#
Quote:
Are the kernel headers available for DSL?
kernel headers != zlib
 
Old 02-23-2010, 01:38 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Did you try with a fresh source tree? Or maybe even regenerating the configure script with autoconf?

I had a google and there seem to be many instances of people having problems with qemu builds finding zlib ... hmm.

Evo2.
 
Old 02-23-2010, 01:52 PM   #13
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Wierd...
Code:
#include <zlib.h>
int main(){
printf("%s", (zlibVersion()));
}
->
Code:
# GCC _pest.c -lz
_pest.c:4:2: warning: no newline at end of file
#./a.out
1.2.3
 
Old 02-23-2010, 05:12 PM   #14
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
New...New...problem!
Frozen at CC x86_64-softmmu/translate.o
 
Old 11-20-2010, 08:19 AM   #15
slpwkr
LQ Newbie
 
Registered: Mar 2005
Location: philippines
Posts: 18

Rep: Reputation: 0
I wasn't able to complete the configuration but hopefully you will able to figure out from the link below:

http://www.dpinson.com/wordpress/?cat=3

Let me know if it works. Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
After qemu-img, qemu is not capable to detect the C drive (empty) frenchn00b Linux - General 3 10-18-2009 05:39 AM
no matching comp found: client zlib none, zlib@openssh.com lost connection jorge_ivan Linux - Networking 0 08-14-2006 07:09 PM
Unable to find -lz (zlib). RPM is installed...???? dolvmin Linux - Software 3 12-03-2005 11:25 PM
LFS-6.1 error in File-4.13, "cannot find zlib.h" Dhaval Motghare Linux From Scratch 1 11-15-2005 05:14 AM
Can't Find zlib rebdi Linux - Newbie 1 09-04-2003 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration