arumugamlab / msamtools

Metagenomics-related extended functionalities to samtools
MIT License
19 stars 2 forks source link

Error on compilation #10

Closed shiraz-shah closed 1 month ago

shiraz-shah commented 1 year ago

Dear Arumagam Lab, I'm doing a system-wide installation of msamtools (which is why I can't use the recommended conda option). However, upon executing make I get the following error after a while:

gcc -W -Wall -Wwrite-strings -std=gnu99 -pedantic -DPROGRAM=\"msamtools\" -DHTSLIB_VERSION=\"1.9\" -I./deps/samtools/samtools-1.9/htslib-1.9 -I./deps/samtools/samtools-1.9 -g -O2   -o msamtools msamtools.o ./libmaui.a ./deps/samtools/samtools-1.9/libbam.a ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a -lm -lz -largtable2 
/usr/bin/ld: ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a(cram_io.o): in function `itf8_decode_crc':
/home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:242: undefined reference to `libdeflate_crc32'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:231: undefined reference to `libdeflate_crc32'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:216: undefined reference to `libdeflate_crc32'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:223: undefined reference to `libdeflate_crc32'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:210: undefined reference to `libdeflate_crc32'
/usr/bin/ld: ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a(cram_io.o):/home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/cram/cram_io.c:458: more undefined references to `libdeflate_crc32' follow
/usr/bin/ld: ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a(bgzf.o): in function `bgzf_uncompress':
/home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:518: undefined reference to `libdeflate_alloc_decompressor'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:524: undefined reference to `libdeflate_deflate_decompress'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:525: undefined reference to `libdeflate_free_decompressor'
/usr/bin/ld: ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a(bgzf.o): in function `bgzf_compress':
/home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:416: undefined reference to `libdeflate_crc32'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:391: undefined reference to `libdeflate_alloc_compressor'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:396: undefined reference to `libdeflate_deflate_compress'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:408: undefined reference to `libdeflate_free_compressor'
/usr/bin/ld: /home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:402: undefined reference to `libdeflate_free_compressor'
/usr/bin/ld: ./deps/samtools/samtools-1.9/htslib-1.9/libhts.a(bgzf.o): in function `inflate_block':
/home/shiraz/apps/msamtools/deps/samtools/samtools-1.9/htslib-1.9/bgzf.c:583: undefined reference to `libdeflate_crc32'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:499: msamtools] Error 1
make[1]: Leaving directory '/home/shiraz/apps/msamtools'
make: *** [Makefile:547: all-recursive] Error 1

samtools in the deps subdir seems to compile fine.

zlib1g-dev is installed on the system too.

Any ideas?

Thanks, guys!

microbiomix commented 1 year ago

Hi Shiraz,

This is likely a problem with your server configuration. Assuming you are using Ubuntu, I just tried to install v1.1.3 on a freshly installed Ubuntu 22.04.2 LTS running on Windows Subsystem for Linux. I needed to install libargtable2-dev and zlib1g-dev as listed in the README, but the rest was straightforward, and the build was complete. I am afraid you would need to look at your server configuration.

Best, Mani

arumugamlab commented 1 month ago

Closing this issue. Please reopen if the problem persists.