Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile extractSoftclipped.c #3

Open
xiaoli0 opened this issue Dec 14, 2017 · 3 comments
Open

Failed to compile extractSoftclipped.c #3

xiaoli0 opened this issue Dec 14, 2017 · 3 comments

Comments

@xiaoli0
Copy link

xiaoli0 commented Dec 14, 2017

Compile failed with error message like this:

htslib/libhts.a(cram_io.o): In function `lzma_mem_deflate':
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:673: undefined reference to `lzma_stream_buffer_bound'
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:679: undefined reference to `lzma_easy_buffer_encode'
htslib/libhts.a(cram_io.o): In function `cram_compress_by_method':
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:1035: undefined reference to `BZ2_bzBuffToBuffCompress'
htslib/libhts.a(cram_io.o): In function `cram_uncompress_block':
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:961: undefined reference to `BZ2_bzBuffToBuffDecompress'
htslib/libhts.a(cram_io.o): In function `lzma_mem_inflate':
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:695: undefined reference to `lzma_easy_decoder_memusage'
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:695: undefined reference to `lzma_stream_decoder'
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:710: undefined reference to `lzma_code'
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:723: undefined reference to `lzma_code'
/home/xiaolicbs/bin/SE-MEI/htslib/cram/cram_io.c:732: undefined reference to `lzma_end'

This can be resolved by linking those two libraries: -llzma -lbz2 when compiling extractSoftclipped.c in the makefile.

@Fairenough
Copy link

Fairenough commented May 31, 2019

Hi Xiao. No idea about how to do the link in makefile. Is that simply adding -llzma -lbz2 to make line like this?:
$(CC) $(OPTS) $(INCLUDES) -o compactRepeats compactRepeats.o htslib/libhts.a -lz -lpthread -llzma -lbz2
$(CC) $(OPTS) $(INCLUDES) -o extractSoftclipped extractSoftclipped.o htslib/libhts.a -lz -lpthread -llzma -lbz2

@dpryan79
Copy link
Owner

Yes, that should work, you can simply add that to lines 21 and 24 of the make file.

@Fairenough
Copy link

Thank you, Ryan. I have also tested your code to retain the read ID and CIGAR string (from biostars), they work perfectly on my data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants