Closed elvenwhite closed 5 years ago
Please download the source code of samtools 0.1.19, compile and use the libbam.a so generated.
On Mon, May 20, 2019 at 5:42 PM elvenwhite notifications@github.com wrote:
Under Ubuntu 18.04 LTS, the error persists even if with locally compiled libbam.a. (I haven't had any problem under Ubuntu 14.04 LTS though) Here's result with local libbam.a :
pregraph_sparse_63mer.v1.0.3 cleaning done. pregraph_sparse_63mer.v1.0.3 objects generated. SOAPdenovo-63mer cleaning done. SOAPdenovo-63mer objects generated. sparsePregraph/io_func.o: In function
read1seqbam(char*, char*, int, samfile_t*, int*) [clone .constprop.58]': io_func.cpp:(.text+0x47): undefined reference to
samread' io_func.cpp:(.text+0xe2): undefined reference tobam_format1_core' sparsePregraph/io_func.o: In function
read1seqbam(char, char, int, samfile_t, int)': io_func.cpp:(.text+0x66a): undefined reference tosamread' io_func.cpp:(.text+0x70a): undefined reference to
bam_format1_core' standardPregraph/readseq1by1.o: In functionread1seqbam': readseq1by1.c:(.text+0xac7): undefined reference to
samread' readseq1by1.c:(.text+0xaec): undefined reference tobam_format1_core' ./sparsePregraph/inc/libbam.a(sam.o): In function
samthreads': /home/yisoo/samtools-1.9/sam.c:35: undefined reference tohts_get_format' /home/yisoo/samtools-1.9/sam.c:36: undefined reference to
bgzf_mt' ./sparsePregraph/inc/libbam.a(sam.o): In functionsamopen': /home/yisoo/samtools-1.9/sam.c:43: undefined reference to
hts_open' /home/yisoo/samtools-1.9/sam.c:55: undefined reference tohts_set_fai_filename' /home/yisoo/samtools-1.9/sam.c:61: undefined reference to
sam_hdr_read' /home/yisoo/samtools-1.9/sam.c:68: undefined reference tohts_verbose' /home/yisoo/samtools-1.9/sam.c:72: undefined reference to
hts_get_format' /home/yisoo/samtools-1.9/sam.c:76: undefined reference tosam_hdr_write' /home/yisoo/samtools-1.9/sam.c:77: undefined reference to
hts_verbose' /home/yisoo/samtools-1.9/sam.c:79: undefined reference tohts_close' /home/yisoo/samtools-1.9/sam.c:48: undefined reference to
hts_close' ./sparsePregraph/inc/libbam.a(sam.o): In functionsamclose': /home/yisoo/samtools-1.9/sam.c:92: undefined reference to
bam_hdr_destroy' /home/yisoo/samtools-1.9/sam.c:93: undefined reference tohts_close' ./sparsePregraph/inc/libbam.a(sam.o): In function
samfetch': /home/yisoo/samtools-1.9/sam.c:100: undefined reference tobam_init1' /home/yisoo/samtools-1.9/sam.c:101: undefined reference to
sam_itr_queryi' /home/yisoo/samtools-1.9/sam.c:103: undefined reference tohts_itr_next' /home/yisoo/samtools-1.9/sam.c:104: undefined reference to
hts_itr_destroy' /home/yisoo/samtools-1.9/sam.c:105: undefined reference tobam_destroy1' ./sparsePregraph/inc/libbam.a(sam.o): In function
sampileup': /home/yisoo/samtools-1.9/sam.c:114: undefined reference tobam_init1' ./sparsePregraph/inc/libbam.a(sam.o): In function
samread': /home/yisoo/samtools-1.9/sam.h:95: undefined reference tosam_read1' ./sparsePregraph/inc/libbam.a(sam.o): In function
sampileup': /home/yisoo/samtools-1.9/sam.c:125: undefined reference tobam_destroy1' ./sparsePregraph/inc/libbam.a(sam.o): In function
samfaipath': /home/yisoo/samtools-1.9/sam.c:139: undefined reference tohts_verbose' /home/yisoo/samtools-1.9/sam.c:140: undefined reference to
fai_build' ./sparsePregraph/inc/libbam.a(bam_plbuf.o): In functionbam_plbuf_init': /home/yisoo/samtools-1.9/bam_plbuf.c:47: undefined reference to
bam_plp_init' ./sparsePregraph/inc/libbam.a(bam_plbuf.o): In functionbam_plbuf_destroy': /home/yisoo/samtools-1.9/bam_plbuf.c:55: undefined reference to
bam_plp_destroy' ./sparsePregraph/inc/libbam.a(bam_plbuf.o): In functionbam_plbuf_push': /home/yisoo/samtools-1.9/bam_plbuf.c:63: undefined reference to
bam_plp_push' /home/yisoo/samtools-1.9/bam_plbuf.c:65: undefined reference tobam_plp_next' ./sparsePregraph/inc/libbam.a(bam_plbuf.o): In function
bam_plbuf_reset': /home/yisoo/samtools-1.9/bam_plbuf.c:40: undefined reference to `bam_plp_reset' collect2: error: ld returned 1 exit status Makefile:56: recipe for target 'SOAPdenovo-63mer' failed make: *** [SOAPdenovo-63mer] Error 1and with shipped libbam.a :
pregraph_sparse_63mer.v1.0.3 objects generated. SOAPdenovo-63mer cleaning done. SOAPdenovo-63mer objects generated. /usr/bin/ld: ./sparsePregraph/inc/libbam.a(bam.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(bam_import.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(sam.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(bam_pileup.o): relocation R_X86_64_32 against
.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(faidx.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(knetfile.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(sam_header.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(bgzf.o): relocation R_X86_64_32 against
.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(kstring.o): relocation R_X86_64_32 against.text' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(bam_aux.o): relocation R_X86_64_32S against
.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ./sparsePregraph/inc/libbam.a(razf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:56: recipe for target 'SOAPdenovo-63mer' failed make: *** [SOAPdenovo-63mer] Error 1```Originally posted by @elvenwhite in https://github.com/aquaskyline/SOAPdenovo2/issues/39#issuecomment-493906074
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aquaskyline/SOAPdenovo2/issues/58?email_source=notifications&email_token=AAG2SONX2LTI4WD6ICW5LODPWJW65A5CNFSM4HOAG732YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GUVW5JQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG2SOLW6PAPOQ2L7SWW4PDPWJW65ANCNFSM4HOAG73Q .
-- Laurent
Thanks, I managed to build it. I had a mistake and kept trying to use samtools 1.9 instead of 0.1.19.
Under Ubuntu 18.04 LTS, the error persists even if with locally compiled libbam.a. (I haven't had any problem under Ubuntu 14.04 LTS though) Here's result with local libbam.a :
and with shipped libbam.a :