odelaneau / shapeit4

Segmented HAPlotype Estimation and Imputation Tool
MIT License
89 stars 17 forks source link

Compiling problem with libhts.a(hfile_libcurl.o) in htslib1.9: In all functions are undefined reference to smth #10

Closed SillySabertooth closed 4 years ago

SillySabertooth commented 4 years ago

After this part of compilation: g++ -std=c++11 -O3 obj/haplotype_writer.o obj/genotype_reader1.o obj/genotype_reader2.o obj/gmap_reader.o obj/genotype_set.o obj/variant_map.o obj/haplotype_set.o obj/compute_job.o obj/genotype_managment.o obj/genotype_sweep.o obj/genotype_prune.o obj/genotype_build.o obj/genotype_mask.o obj/variant.o obj/hmm_parameters.o obj/main.o obj/pbwt_solver.o obj/builder.o obj/phaser_management.o obj/phaser_initialise.o obj/phaser_algorithm.o obj/phaser_parameters.o obj/phaser_finalise.o obj/haplotype_segment.o /home/silly/progs/htslib-1.9/libhts.a /home/silly/progs/boost_1_71_0/stage/lib/libboost_iostreams.a /home/silly/progs/boost_1_71_0/stage/lib/libboost_program_options.a -o bin/shapeit4 -lz -lbz2 -lm -lpthread -llzma

I've got the following output:

/home/silly/progs/htslib-1.9/libhts.a(hfile_libcurl.o): In function `easy_errno':
/home/silly/progs/htslib-1.9/hfile_libcurl.c:164: undefined reference to `curl_easy_getinfo'
/home/silly/progs/htslib-1.9/hfile_libcurl.c:178: undefined reference to `curl_easy_getinfo'
/home/silly/progs/htslib-1.9/libhts.a(hfile_libcurl.o): In function `wait_perform':
/home/silly/progs/htslib-1.9/hfile_libcurl.c:686: undefined reference to `curl_multi_fdset'
/home/silly/progs/htslib-1.9/hfile_libcurl.c:707: undefined reference to `curl_multi_perform'
/home/silly/progs/htslib-1.9/libhts.a(hfile_libcurl.o): In function `process_messages':
/home/silly/progs/htslib-1.9/hfile_libcurl.c:662: undefined reference to `curl_multi_info_read'
/home/silly/progs/htslib-1.9/libhts.a(hfile_libcurl.o): In function `wait_perform':
/home/silly/progs/htslib-1.9/hfile_libcurl.c:689: undefined reference to `curl_multi_timeout'
/home/silly/progs/htslib-1.9/libhts.a(hfile_libcurl.o): In function `libcurl_close':
etc... as above
/home/silly/progs/htslib-1.9/libhts.a(hfile_s3.o): In function `s3_sign':
/home/silly/progs/htslib-1.9/hfile_s3.c:77: undefined reference to `EVP_sha1'
/home/silly/progs/htslib-1.9/hfile_s3.c:77: undefined reference to `HMAC'
collect2: error: ld returned 1 exit status
makefile:49: recipe for target 'bin/shapeit4' failed
make: *** [bin/shapeit4] Error 1
SillySabertooth commented 4 years ago

I was blind - by some reason i haven't checked the pull dir there is the answer https://github.com/odelaneau/shapeit4/pull/8

Deleetdk commented 3 years ago

Just for reference, I had the same error. The only line needed to fix this is:

#DYNAMIC LIBRARIES
DYN_LIBS=-lz -lbz2 -lm -lpthread -llzma -lcurl -lssl -lcrypto
BJWiley233 commented 3 years ago

Is this edit not being merged with master branch?