Ensembl / WiggleTools

Basic operations on the space of numerical functions defined on the genome using lazy evaluators for flexibility and efficiency
Apache License 2.0
144 stars 25 forks source link

Make error #43

Closed francicco closed 4 years ago

francicco commented 5 years ago

Hi,

I'm getting this error when trying to run the make:

cc -g -Wall -O3 -std=gnu99 -L../lib -L../../libBigWig -L../../htslib wiggletools.c -lwiggletools -l:libBigWig.a -lcurl -l:libhts.a -lgsl  -lgslcblas -lz -lpthread -lm -o ../bin/wiggletools 
../../htslib/libhts.a(cram_io.o): In function `lzma_mem_deflate':
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:709: undefined reference to `lzma_stream_buffer_bound'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:715: undefined reference to `lzma_easy_buffer_encode'
../../htslib/libhts.a(cram_io.o): In function `cram_compress_by_method':
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:1092: undefined reference to `BZ2_bzBuffToBuffCompress'
../../htslib/libhts.a(cram_io.o): In function `cram_uncompress_block':
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:1012: undefined reference to `BZ2_bzBuffToBuffDecompress'
../../htslib/libhts.a(cram_io.o): In function `lzma_mem_inflate':
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:731: undefined reference to `lzma_easy_decoder_memusage'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:731: undefined reference to `lzma_stream_decoder'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:749: undefined reference to `lzma_code'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:762: undefined reference to `lzma_code'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:773: undefined reference to `lzma_end'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:778: undefined reference to `lzma_end'
/mnt/storage/home/tk19812/scratch/software/htslib/cram/cram_io.c:773: undefined reference to `lzma_end'
collect2: error: ld returned 1 exit status
make[1]: *** [../bin/wiggletools] Error 1
make[1]: Leaving directory `/mnt/storage/scratch/tk19812/software/WiggleTools/src'
make: *** [Wiggletools] Error 2

Any help? Thanks a lot F

dzerbino commented 5 years ago

Hello @francicco ,

This appears to be a problem with the htslib dependencies, specifically liblzma which was not found.

Can you test whether the htslib compilation and installation worked well, e.g. whether the ../../htslib/tabix and ../../htslib/bgzip executables function properly?

Cheers,

Daniel

dahlo commented 5 years ago

@francicco I had the same issue, but managed to solve it by adding

-llzma -lbz2

to the LIBS variable in src/Makefile, line 6. Check my changes in https://github.com/dahlo/WiggleTools

dzerbino commented 5 years ago

@dahlo: Thanks for that, could you please send us a PR?

dzerbino commented 4 years ago

Apologies for the slow response, commit merged in.