Open mzinkgraf opened 8 years ago
It works fine for me on an Ubuntu 12.04 machine with zlib1g-dev version 1:1.2.3.4.dfsg-3ubuntu4 installed.
I suspect you're picking up a zlib.h
which is for a later version of zlib than the library installed on your system. Is this possible?
Somewhere around zlib 1.2.6 gzgetc
got replaced by a macro that calls gzgetc_
. Later versions changed the macro to call gzgetc
but kept gzgetc_
for backwards compatibility (although it possibly disappeared in version 1.2.6.1). So, trying to use zlib.h from versions 1.2.6 onwards with libz.so from before version 1.2.6 is likely to cause you problems.
Hey, having a bit of problem getting htslib installed. Running Ubuntu (on Windows 10) from configure step, this is the last part of the output:
checking for zlib.h... no checking for inflate in -lz... no configure: error: zlib development files not found
HTSlib uses compression routines from the zlib library http://zlib.net. Building HTSlib requires zlib development files to be installed on the build machine; you may need to ensure a package such as zlib1g-dev (on Debian or Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions or Cygwin) is installed.
FAILED. This error must be resolved in order to build HTSlib successfully.
However:
sudo apt install zlib1g-dev Reading package lists... Done Building dependency tree Reading state information... Done zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2). 0 upgraded, 0 newly installed, 0 to remove and 223 not upgraded.
So zlib1g and zlib1g-dev are installed. How can I fix this?
PS-I am a simple biologist who just wants to install this. Not a programmer or anything.
Very appreciate the help.
Firstly, please consider downloading the latest htslib version. 1.3 is pretty old and your issue may be resolved in the latest release.
I just tried compiling the latest release (which worked fine), using the documented "sudo apt-get install" line from the INSTALL file, on the Ubuntu supplied with Windows Subsystem for Linux (18.04). I can recommend WSL as an easy way to get Ubuntu working on Windows 10. It's also far newer than 12.04.
This is an old issue that git reposted to, so we don't know which version of htslib is involved. The version of zlib1g-dev mentioned is in Ubuntu bionic (18.04) onwards.
The best way to find out why configure failed is to look in the config.log
file and see what happened when it ran the failing test. For example if I run ./configure
and search for checking for zlib.h
I find:
configure:4599: checking for zlib.h
configure:4599: gcc -c -Wall -g -O2 -fvisibility=hidden conftest.c >&5
configure:4599: $? = 0
configure:4599: result: yes
configure:4608: checking for inflate in -lz
configure:4633: gcc -o conftest -Wall -g -O2 -fvisibility=hidden -fvisibility=hidden conftest.c -lz -lm >&5
configure:4633: $? = 0
configure:4642: result: yes
In your case you should see some compiler error messages that may give a clue as to why it failed.
Hello I am trying to install htslib-1.3.1 on Ubuntu 12.04 using ./configure and make but getting the following error message. Also I have verified that zlib1g-dev is installed and up to date on the server.
Any help would be much appreciated. Matt
gcc -g -O2 -I. -fpic -c -o cram/rANS_static.pico cram/rANS_static.c gcc -g -O2 -I. -fpic -c -o cram/sam_header.pico cram/sam_header.c gcc -g -O2 -I. -fpic -c -o cram/string_alloc.pico cram/string_alloc.c gcc -g -O2 -I. -fpic -c -o cram/thread_pool.pico cram/thread_pool.c gcc -g -O2 -I. -fpic -c -o cram/vlen.pico cram/vlen.c gcc -g -O2 -I. -fpic -c -o cram/zfio.pico cram/zfio.c gcc -shared -Wl,-soname,libhts.so.2 -pthread -o libhts.so kfunc.pico knetfile.pico kstring.pico bgzf.pico errmod.pico faidx.pico hfile.pico hfile_net.pico hts.pico md5.pico probaln.pico realn.pico regidx.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/rANS_static.pico cram/sam_header.pico cram/string_alloc.pico cram/threadpool.pico cram/vlen.pico cram/zfio.pico -lz -lm
ln -sf libhts.so libhts.so.2 gcc -g -O2 -I. -c -o bgzip.o bgzip.c gcc -pthread -o bgzip bgzip.o libhts.a -lz
libhts.a(zfio.o): In function
zfpeek': zfio.c:(.text+0x121): undefined reference to
gzgetc' collect2: error: ld returned 1 exit status make: *\ [bgzip] Error 1