Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

make process cannot find include files

Hi

Some software that i need to use depends on zlib. I looked in package manager and it said zlib1g was installed so I tried to make the software but got this error

make[1]: Entering directory `/home/andrea/samtools/samtools-0.1.6'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1  bgzf.c -o bgzf.o
In file included from bgzf.c:36:
bgzf.h:30: fatal error: zlib.h: No such file or directory
compilation terminated.
make[1]: *** [bgzf.o] Error 1
make[1]: Leaving directory `/home/andrea/samtools/samtools-0.1.6'
make: *** [all-recur] Error 1

I tried installing zlib manually as I wasn't sure if the zlib1g in synaptic was the correct package so i installed zlib following the instructions here to /usr/local/zlib

http://www.techsww.com/tutorials/libraries/zlib/installation/installing_zlib_on_ubuntu_linux.php

I tried re-making but got the same error

zlib.h does seem to be on the system

locate zlib.h
/usr/lib/syslinux/com32/include/zlib.h
/usr/local/zlib/include/zlib.h
/usr/src/linux-headers-2.6.35-22/include/linux/zlib.h
/usr/src/linux-headers-2.6.35-22-generic/include/config/crypto/zlib.h
/usr/src/linux-headers-2.6.35-22-generic/include/config/jffs2/zlib.h
/usr/src/linux-headers-2.6.35-22-generic/include/config/ubifs/fs/zlib.h
/usr/src/linux-headers-2.6.35-22-generic/include/linux/zlib.h
/usr/src/linux-headers-2.6.35-28/include/linux/zlib.h
/usr/src/linux-headers-2.6.35-28-generic/include/config/crypto/zlib.h
/usr/src/linux-headers-2.6.35-28-generic/include/config/jffs2/zlib.h
/usr/src/linux-headers-2.6.35-28-generic/include/config/ubifs/fs/zlib.h
/usr/src/linux-headers-2.6.35-28-generic/include/linux/zlib.h

I don't know much about make or where it looks for included files. How do i tell make where to look? In the Makefile for the software there is a line called INCLUDES= but this is empty/not set.

I'm nervous about fiddling around with these files. What happens to the system if a make process fails.

thanks
Avatar of farzanj
farzanj
Flag of Canada image

What type of Linux do you have?  Do you have rpms and yum?

Mostly the head files are included in the devel package.  So you can try getting zlib-devel.

Of course this all depends upon the type of Linux you are using.
Avatar of andieje
andieje

ASKER

I'm using ubuntu 10.10. I installed zlib1g-dev and it worked
How did you know:

zlib1g was the equivalent package for zlib?
how did you know i needed the development package as well?
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial