You should install the development support files for zlib, try:
sudo apt-get install libz-dev
Other package names: zlib1g-dev.
If you've already zlib library, make sure you're compiling your code sources with -lz. See: missing zlib.h in ubuntu.
You should install the development support files for zlib, try:
sudo apt-get install libz-dev
Other package names: zlib1g-dev.
If you've already zlib library, make sure you're compiling your code sources with -lz. See: missing zlib.h in ubuntu.
Install zlib from it's source, solve my similar error. Download last version from this then:
configure
make -j4
make install
Install zlib with development support by using
sudo apt-get install zlib1g-dev
In case you don't want or need to use the full zlib, it is fairly easy to write wrapper routines which map the zlib functions 1:1 to ordinary file functions which don't support compression and decompression.
//
// dummy zlib.h
//
#pragma once
#include <stdio.h>
typedef FILE *gzFile;
int gzclose(gzFile file);
gzFile gzdopen(int fd, const char *mode);
gzFile gzopen(const char *path, const char *mode);
int gzread(gzFile file, void *buf, unsigned int len);
//
// zlibDummy.cpp
//
#include <zlib.h>
int gzclose(gzFile file)
{
return fclose(file);
}
gzFile gzdopen(int fd, const char *mode)
{
return _fdopen(fd, mode);
}
gzFile gzopen(const char *path, const char *mode)
{
return fopen(path, mode);
}
int gzread(gzFile file, void *buf, unsigned int len)
{
return fread(buf, 1, len, file);
}
Well, temporary solution
download from : https://github.com/madler/zlib/blob/master/zlib.h
put the file in the same folder as your project file.
#include "zlib.h"
Seems compiler is not able to find the file in the includes path you mentioned.
First check if zconf.h file is available on your machine and get that location. If the file is available then just give the path of the file to the compiler using -I option.
INCLUDE = -I"<YourPath>" -I"./src/" -I"/usr/include/" -I"$(CODEBASE)/seqlib/src/libs/seqan-library-2.0.1/include" -I"$(CODEBASE)/seqlib/src/libs/libdivsufsort-2.0.1-64bit/" $(CODEBASE_SRC_FOLDERS)
If the file itself is missing, then you would need to install it
sudo apt-get install libz-dev
Based on information shared by @Knud Larsen :
The Ubuntu package name is zlib1g-dev from where you can get the missing file. /usr/include/zconf.h
https://packages.ubuntu.com/focal-updates/amd64/zlib1g-dev/filelist
Just for future reference, what Altaf mentioned is correct. More than that, you can continue adding things that are not in the appropriate place exactly like this. Locate them and then add them manually.
If the makefile is not very big this will eventually be ok. It doesn't scale on the general case however, and maybe changing the makefile in a more radical way should be done.