odelaneau/GLIMPSE

/usr/bin/ld: cannot find -ldeflate during GLIMPSE2_chunk compilation

Closed this issue · 2 comments

Hi,

I'm trying to run GLIMPSE2 on an HPC server, and have followed the installation instructions on the website (build from source). When I try to compile GLIMSE2_chunk (the first program of the software I'm trying to compile), I get this error message when typing make (from within the chunk directory):

g++ -std=c++17 -O3 obj/chunk.o obj/chunker_algorithm.o obj/chunker_io.o obj/chunker_management.o obj/chunker_map.o obj/chunker_parameters.o obj/gmap_reader.o /home/jonvs/softwares/htslib/libhts.a /home/jonvs/softwares/boost/lib/libboost_iostreams.a /home/jonvs/softwares/boost/lib/libboost_program_options.a /home/jonvs/softwares/boost/lib/libboost_serialization.a  -o bin/GLIMPSE2_chunk -lz -lpthread -lbz2 -llzma -lcurl -lcrypto -ldeflate
/usr/bin/ld: cannot find -ldeflate
collect2: error: ld returned 1 exit status
make: *** [bin/GLIMPSE2_chunk] Error 1

Before this, I loaded the gcc v9.2.0 module on the server, and then followed the instructions on the GLIMPSE2 website to download and install htslib v1.16 and boost v1.73.0 and received no error messages during this. Finally, I edited the makefile within the chunk dir like this:

desktop: HTSSRC=/home/jonvs/softwares/htslib
desktop: HTSLIB_INC=$(HTSSRC)/include
desktop: HTSLIB_LIB=$(HTSSRC)/libhts.a
desktop: BOOST_INC=/home/jonvs/softwares/boost/include
desktop: BOOST_LIB_IO=/home/jonvs/softwares/boost/lib/libboost_iostreams.a
desktop: BOOST_LIB_PO=/home/jonvs/softwares/boost/lib/libboost_program_options.a
desktop: BOOST_LIB_SE=/home/jonvs/softwares/boost/lib/libboost_serialization.a
desktop: $(BFILE)

How should I go about to make g++ find the ldeflate dynamic library?

Hi,

first of all, libdeflate is not strictly necessary, but it speedup things VCF/BCF reading/writing using htslib. Did you compile htslib with libdeflate (in the ./configure, you should see if it can find libdefate in the system)? If htslib did not detect libdeflate, it should automatically use zlib, so you should be able to just remove the -ldeflate flag.
Otherwise, if htslib detected libdeflate, you might need to find the location and allow GLIMPSE to link to it.

If want to use libdeflate for I/O speedup, you might want to check if it is installed as a module somewhere in your HPC system, or install it yourself locally: https://github.com/ebiggers/libdeflate.
You will then need to tell both htslib and GLIMPSE where libdeflate is afterwards (easy for GLIMPSE, less easy for htslib I guess).

Hope this helps.

Simone

Hi, and thank you for your quick reply!

When I now ran make clean and ./configure --with-libdeflate I got a message saying I do not have the required header / library files, so I installed libdeflate myself. However, figuring out how to tell htslib where libdeflate I feel is a bit beyond my current skills, so I'll continue without libdeflate for now (compiling GLIMPSE that way works for me). Might get back to it if I feel like the reading/writing VCF/BCF is just too slow... thanks again for your help!