rikuu / Gap2Seq

Gap2Seq is a gap filling and insertion genotyping tool.
GNU Affero General Public License v3.0
17 stars 6 forks source link

htslib library linking problems #5

Closed vrohnie closed 5 years ago

vrohnie commented 5 years ago

Hi,

I ran into some problems, when trying to build Gap2Seq 3.1, so during make I got following error:

../thirdparty/htslib/libhts.a(cram_io.o): In function lzma_mem_deflate': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:678: undefined reference tolzma_stream_buffer_bound' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:684: undefined reference to lzma_easy_buffer_encode' ../thirdparty/htslib/libhts.a(cram_io.o): In functioncram_compress_by_method': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:1040: undefined reference to BZ2_bzBuffToBuffCompress' ../thirdparty/htslib/libhts.a(cram_io.o): In functioncram_uncompress_block': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:966: undefined reference to BZ2_bzBuffToBuffDecompress' ../thirdparty/htslib/libhts.a(cram_io.o): In functionlzma_mem_inflate': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:700: undefined reference to lzma_easy_decoder_memusage' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:700: undefined reference tolzma_stream_decoder' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:715: undefined reference to lzma_code' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:728: undefined reference tolzma_code' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/cram/cram_io.c:737: undefined reference to lzma_end' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functioneasy_errno': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:164: undefined reference to curl_easy_getinfo' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:178: undefined reference tocurl_easy_getinfo' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In function wait_perform': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:686: undefined reference tocurl_multi_fdset' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:707: undefined reference to curl_multi_perform' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionprocess_messages': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:662: undefined reference to curl_multi_info_read' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionwait_perform': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:689: undefined reference to curl_multi_timeout' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionlibcurl_close': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1049: undefined reference to curl_easy_pause' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1058: undefined reference tocurl_multi_remove_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1062: undefined reference to curl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1063: undefined reference tocurl_multi_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1058: undefined reference to curl_multi_remove_handle' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionlibcurl_write': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:821: undefined reference to curl_easy_pause' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionlibcurl_exit': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:267: undefined reference to curl_share_cleanup' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionlibcurl_open': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1121: undefined reference to curl_multi_init' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1124: undefined reference tocurl_easy_init' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1128: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1132: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1140: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1141: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1142: undefined reference to curl_easy_setopt' ../thirdparty/htslib/libhts.a(hfile_libcurl.o):/home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1149: more undefined references tocurl_easy_setopt' follow ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In function libcurl_open': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1173: undefined reference tocurl_multi_add_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1203: undefined reference to curl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1204: undefined reference tocurl_multi_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1197: undefined reference to curl_multi_remove_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1135: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1136: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1167: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1187: undefined reference to curl_easy_getinfo' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionrestart_from_position': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:926: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:945: undefined reference tocurl_easy_duphandle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:949: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:950: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:951: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1028: undefined reference tocurl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:961: undefined reference to curl_multi_add_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1028: undefined reference tocurl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1028: undefined reference to curl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:968: undefined reference tocurl_easy_pause' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:988: undefined reference to curl_multi_remove_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:991: undefined reference tocurl_easy_reset' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:992: undefined reference to curl_multi_remove_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1020: undefined reference tocurl_easy_reset' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1021: undefined reference to curl_multi_remove_handle' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1001: undefined reference tocurl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1003: undefined reference to curl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1004: undefined reference tocurl_easy_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:994: undefined reference to curl_easy_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1007: undefined reference tocurl_easy_reset' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In function libcurl_read': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:763: undefined reference tocurl_easy_pause' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In function hfile_plugin_init_libcurl': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1351: undefined reference tocurl_global_init' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1354: undefined reference to curl_share_init' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1356: undefined reference tocurl_share_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1357: undefined reference to curl_share_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1358: undefined reference tocurl_share_setopt' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1384: undefined reference to curl_version_info' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1360: undefined reference tocurl_share_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1361: undefined reference to curl_global_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1373: undefined reference tocurl_share_cleanup' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:1374: undefined reference to curl_global_cleanup' ../thirdparty/htslib/libhts.a(hfile_libcurl.o): In functionlibcurl_exit': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_libcurl.c:289: undefined reference to curl_global_cleanup' ../thirdparty/htslib/libhts.a(hfile_s3.o): In functions3_sign': /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_s3.c:77: undefined reference to EVP_sha1' /home/schusterbauer/Programs/Gap2Seq/thirdparty/htslib/hfile_s3.c:77: undefined reference toHMAC' collect2: error: ld returned 1 exit status make[2]: [ReadFilter] Error 1 make[1]: [CMakeFiles/ReadFilter.dir/all] Error 2 make: *** [all] Error 2

With some help from my supervisor I finally managed to build it by adding

'-lpthread -lbz2 -llzma -lcurl -lcrypto' to CMakeLists.txt at line 65, so it now looks like

target_link_libraries("ReadFilter" ${gatb-core-libraries} ${htslib-library} -lpthread -lbz2 -llzma -lcurl -lcrypto)

Anyway it seems like this shouldn't be necessary and I don't know why it's not automatically linking it correctly. Any Ideas?

Also I still have troubles running it, but I'll open another issue for that.

Greetings, Veronika

vrohnie commented 5 years ago

Just wanted to add that I'm working on Ubuntu 14.04, cmake version 3.2 and gcc version 6.4.0, if that is of any relevance

rikuu commented 5 years ago

It seems to have been broken on my computer as well, which I wasn't expecting. I added the libraries like you mentioned.