hasindu2008 / slow5lib

slow5lib is a software library for reading & writing SLOW5 files.
https://hasindu2008.github.io/slow5lib
MIT License
41 stars 4 forks source link

Installation error #67

Closed Yuan2yuan2yuan closed 1 year ago

Yuan2yuan2yuan commented 1 year ago

I've downloaded this file but still got a fatal error while installing slow5lib.

fatal error: zlib.h: No such file or directory

>yum list installed | grep zlib*  
zlib.x86_64                            1.2.7-20.el7_9                  @updates 
zlib-devel.x86_64                      1.2.7-20.el7_9                  @updates
hasindu2008 commented 1 year ago

Could you copy paste what is printed on the terminal when you call the make command? I want to to see which compiler it is using so I could give you the next step for trouble shooting.

Yuan2yuan2yuan commented 1 year ago

Sure.

make -C /data/workdir/sigmap/sigmap-master/extern/slow5lib/
make[1]: Entering directory '/data/workdir/sigmap/sigmap-master/extern/slow5lib'
make[1]: Nothing to be done for 'slow5lib'.
make[1]: Leaving directory '/data/workdir/sigmap/sigmap-master/extern/slow5lib'
mkdir -p objs
/data/software/conda/bin/x86_64-conda_cos6-linux-gnu-c++ -std=c++11 -Wall -O3 -fopenmp -march=native -I/data/workdir/sigmap/sigmap-master/extern/hdf5/build/include -I/data/workdir/sigmap/sigmap-master/extern/slow5lib//include -c src/sequence_batch.cc -o objs/sequence_batch.o
In file included from src/sequence_batch.cc:1:0:
src/sequence_batch.h:5:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
make: *** [Makefile:49: objs/sequence_batch.o] Error 1
hasindu2008 commented 1 year ago

It seems like you are inside a conda environment. The gcc inside conda likely to be configured not to honour system wide include locations. There are two options that you can try

  1. Install zlib development libraries inside the conda environment using something like conda install libzlib. Then try building.
  2. Deactivate the conda environment. Then build using the system default gcc. Make sure you do a make clean first
Yuan2yuan2yuan commented 1 year ago

Thank you for quickly replying. I will try it again.