jts / nanopolish

Signal-level algorithms for MinION data
MIT License
568 stars 159 forks source link

Install fails because of HDF5 file #1121

Open jayradke opened 10 months ago

jayradke commented 10 months ago

Installation fails. Can’t access the HDF5 site. Any plans to fix this again or is nanopolish not accessible to those that didn’t install 2 years ago?

jts commented 10 months ago

I just tried a clean install and it worked. Please provide some details (OS, build error log).

jayradke commented 10 months ago

Will get you that info after I try another clean install. Using Docker for install didn’t work either.

jayradke commented 10 months ago

where would i find the build error log?

jayradke commented 10 months ago

This is what is shown before the make quits

echo '# Default htscodecs.mk generated by Makefile' > htscodecs.mk gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o kstring.o kstring.c gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o bcf_sr_sort.o bcf_sr_sort.c

gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o bgzf.o bgzf.c bgzf.c:38:10: fatal error: zlib.h: No such file or directory

include

      ^~~~~~~~

compilation terminated. make[1]: [Makefile:164: bgzf.o] Error 1 make[1]: Leaving directory '/home/jayradke/nanopolish/htslib' make: [Makefile:139: htslib/libhts.a] Error 255

jts commented 10 months ago

That's not an HDF5 error. See here: https://github.com/jts/nanopolish/issues/125

jayradke commented 10 months ago

when i do the sudo apt-get install zlib1g-dev it says....

zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9.2). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

if i run make after that..

make[1]: Entering directory '/home/jayradke/nanopolish_010824/htslib' gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o kfunc.o kfunc.c gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o kstring.o kstring.c gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o bcf_sr_sort.o bcf_sr_sort.c gcc -g -Wall -O2 -fvisibility=hidden -I. -c -o bgzf.o bgzf.c bgzf.c:38:10: fatal error: zlib.h: No such file or directory

include

      ^~~~~~~~

compilation terminated. make[1]: [Makefile:164: bgzf.o] Error 1 make[1]: Leaving directory '/home/jayradke/nanopolish_010824/htslib' make: [Makefile:139: htslib/libhts.a] Error 255

not sure what i did wrong with the zlib1g-dev step

jayradke commented 10 months ago

tried was was recommend in #125. event and down loaded zlib_1.3 and went through the process to install zlib from here https://www.linuxcapable.com/how-to-install-zlib-on-ubuntu-linux/ Still cant find zlib.h. is this because I am using WSL2 Ubuntu-22.04?

i can find the zlib.h and zconf.h in my usr/local/zlib/include

jayradke commented 10 months ago

so i copy and pasted those two files into htslib and got past that error to this

/home/jayradke/miniconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lz /home/jayradke/miniconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lbz2 collect2: error: ld returned 1 exit status make[1]: [Makefile:316: libhts.so] Error 1 make[1]: Leaving directory '/home/jayradke/nanopolish/htslib' make: [Makefile:139: htslib/libhts.a] Error 255

jts commented 10 months ago

both the header files (zlib.h) and the compiled libraries are needed to compile htslib/nanopolish. I don't use WSL2 so it is hard to say why they can't be found. On standard ubuntu systems running sudo apt-get install zlib1g-dev should be sufficient. I suspect an environment variable isn't being set.