jts / nanopolish

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

Cannot install: many warnings #1048

Open ZabalaAitor opened 1 year ago

ZabalaAitor commented 1 year ago

Hi,

I tried to install as recommended:

git clone --recursive `https://github.com/jts/nanopolish.git`
cd nanopolish
make

and I obtained many warnings. Example:

file_image.c:27:58: note: in expansion of macro ‘FAIL_PUTS_Endition)) FAIL_PUTS_ERROR(string) } while(0)
      |                                                          ^~~~~~~~~~~~~~~
file_image.c:1135:5: note: in expansion of macro ‘VERIFY’
 1135 |     VERIFY(image_size == -1, "H5Fget_file_image(5) succeeded.");
      |     ^~~~~~
../src/H5private.h:1539:14: warning: ISO C90 does not support ‘__func__’ predefined identifier [-Wpedantic]
 1539 | #define FUNC __func__
      |              ^~~~~~~~
h5test.h:90:53: note: in expansion of macro ‘FUNC’
   90 |                                 __FILE__, __LINE__, FUNC);
      |                                                     ^~~~
h5test.h:111:42: note: in expansion of macro ‘AT’
  111 | #define FAIL_PUTS_ERROR(s) {H5_FAILED(); AT(); puts(s); goto error;}
      |                                          ^~
file_image.c:27:58: note: in expansion of macro ‘FAIL_PUTS_ERROR’
   27 | #define VERIFY(condition, string) do { if (!(condition)) FAIL_PUTS_ERROR(string) } while(0)

the code is finished like this:

gcc -g -Wall -O2 -fvisibility=hidden -I.  -fpic -c -o htscodecs/htscodecs/tokenise_name3.pico htscodecs/htscodecs/tokenise_name3.c
gcc -shared -Wl,-soname,libhts.so.3 -fvisibility=hidden -o libhts.so kfunc.pico kstring.pico bcf_sr_sort.pico bgzf.pico errmod.pico faidx.pico header.pico hfile.pico hts.pico hts_expr.pico hts_os.pico md5.pico multipart.pico probaln.pico realn.pico regidx.pico region.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico textutils.pico thread_pool.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_stats.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/string_alloc.pico htscodecs/htscodecs/arith_dynamic.pico htscodecs/htscodecs/fqzcomp_qual.pico htscodecs/htscodecs/htscodecs.pico htscodecs/htscodecs/pack.pico htscodecs/htscodecs/rANS_static4x16pr.pico htscodecs/htscodecs/rANS_static.pico htscodecs/htscodecs/rle.pico htscodecs/htscodecs/tokenise_name3.pico -lz -lm -lbz2 -lpthread
/usr/bin/ld: cannot find -lbz2: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:316: libhts.so] Error 1
make[1]: Leaving directory '/home/marcos/aitor/methylation_tools/nanopolish/htslib'
make: *** [Makefile:139: htslib/libhts.a] Error 255

I tried also installing with conda. In these way, when I used nanopolish I obtained this:

nanopolish: error while loading shared libraries: libhdf5.so.10: cannot open shared object file: No such file or directory

Any suggestion?

Thanks.

Aitor Zabala

zigavicic commented 1 year ago

I run into the same error. Please instruct on how to solve this.

jts commented 1 year ago

The HDF5 developers removed old source files from their FTP site which broke nanopolish's Makefile. I have just fixed this, can you try again with the latest code on github?

zigavicic commented 1 year ago

It is still exiting with the same error.

jts commented 1 year ago

@zigavicic could you send the complete build log to me?

valerieT1998 commented 1 year ago

Hi I ran into the same issue, is there a solution to this ?

zigavicic commented 1 year ago

I switched to using Docker images of the package available here: https://quay.io/repository/biocontainers/nanopolish?tab=tags

valerieT1998 commented 1 year ago

It's quite complicated to use docker images to install tools on our server ( need singularity etc and is way out of my basic skills), but thanks for your help anyways! Hopefully there's another solution for this

valerieT1998 commented 1 year ago

If the version of HDF5 in the make file is updated ( like it was done in the last commit ) to version 1.8.23, will it work ? Such as doing ifeq ($(MAC), 1) HDF5_VERSION ?= 1.13.3 ( change to 1.8.23) else HDF5_VERSION ?= 1.8.14 endif

Thanks

jts commented 1 year ago

@valerieT1998 can you send me the complete output when you try to run make?

valerieT1998 commented 1 year ago

It's quite long but here is where the warnings started (sorry I don't have a log file of the complete output)

Screen Shot 2023-02-17 at 10 41 16 AM

It continues like this until I decided to kill the run with cmd + C

jts commented 1 year ago

Those warnings are fine and expected, can you let it continue until it naturally stops?

valerieT1998 commented 1 year ago

It works thanks. I just needed more patience !

jts commented 1 year ago

Glad to hear it built successfully

rugilemat commented 1 year ago

Hi, I seem to be having the same error:

/usr/bin/ld: cannot find -lbz2 collect2: error: ld returned 1 exit status make[1]: [Makefile:316: libhts.so] Error 1 make[1]: Leaving directory '/users/k1347718/nanopolish/htslib' make: [Makefile:139: htslib/libhts.a] Error 255

I have also tried installing through conda but get:

nanopolish: error while loading shared libraries: libhdf5.so.10: cannot open shared object file: No such file or directory

The above error happens regardless whether I install it through git or conda. I tried installing the lbz2 package separately but that didn't seem to help so any advice would be appreciated.