Entering edit mode
6.7 years ago
syrttgump
▴
50
Hi, I downloaded source code of samtools-0.1.18, then compile it by the command line:
make CFLAGS=-fPIC
But this is the error:
gcc -fPIC -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o -Lbcftools libbam.a -lbcf -lcurses -lm -lz
bam2bcf_indel.o: In function `ks_combsort_uint32_t':
bam2bcf_indel.c:(.text+0x1177): undefined reference to `__ks_insertsort_uint32_t'
bam2bcf_indel.o: In function `ks_introsort_uint32_t':
bam2bcf_indel.c:(.text+0x14f7): undefined reference to `__ks_insertsort_uint32_t'
errmod.o: In function `ks_combsort_uint16_t':
errmod.c:(.text+0x706): undefined reference to `__ks_insertsort_uint16_t'
errmod.o: In function `ks_introsort_uint16_t':
errmod.c:(.text+0xaa3): undefined reference to `__ks_insertsort_uint16_t'
phase.o: In function `ks_combsort_rseq':
phase.c:(.text+0x250f): undefined reference to `__ks_insertsort_rseq'
phase.o: In function `ks_introsort_rseq':
phase.c:(.text+0x2909): undefined reference to `__ks_insertsort_rseq'
libbam.a(bgzf.o): In function `deflate_block':
bgzf.c:(.text+0x14c0): undefined reference to `packInt16'
bgzf.c:(.text+0x1513): undefined reference to `packInt32'
bgzf.c:(.text+0x1531): undefined reference to `packInt32'
libbam.a(bgzf.o): In function `check_header':
bgzf.c:(.text+0x1741): undefined reference to `unpackInt16'
bgzf.c:(.text+0x1788): undefined reference to `unpackInt16'
libbam.a(bgzf.o): In function `bgzf_read_block':
bgzf.c:(.text+0x1c1e): undefined reference to `unpackInt16'
libbam.a(bam_index.o): In function `ks_combsort_off':
bam_index.c:(.text+0x8d9): undefined reference to `__ks_insertsort_off'
libbam.a(bam_index.o): In function `ks_introsort_off':
bam_index.c:(.text+0xcf7): undefined reference to `__ks_insertsort_off'
libbam.a(bam_lpileup.o): In function `ks_combsort_node':
bam_lpileup.c:(.text+0x989): undefined reference to `__ks_insertsort_node'
libbam.a(bam_lpileup.o): In function `ks_introsort_node':
bam_lpileup.c:(.text+0xf61): undefined reference to `__ks_insertsort_node'
libbam.a(bedidx.o): In function `ks_combsort_uint64_t':
bedidx.c:(.text+0x755): undefined reference to `__ks_insertsort_uint64_t'
libbam.a(bedidx.o): In function `ks_introsort_uint64_t':
bedidx.c:(.text+0xb07): undefined reference to `__ks_insertsort_uint64_t'
libbam.a(bam_sort.o): In function `ks_combsort_heap':
bam_sort.c:(.text+0xc58): undefined reference to `__ks_insertsort_heap'
libbam.a(bam_sort.o): In function `ks_introsort_heap':
bam_sort.c:(.text+0x1213): undefined reference to `__ks_insertsort_heap'
libbam.a(bam_sort.o): In function `ks_combsort_sort':
bam_sort.c:(.text+0x331c): undefined reference to `__ks_insertsort_sort'
libbam.a(bam_sort.o): In function `ks_introsort_sort':
bam_sort.c:(.text+0x3710): undefined reference to `__ks_insertsort_sort'
collect2: error: ld returned 1 exit status
make[1]: *** [samtools] Error 1
make[1]: Leaving directory `/wistar/herlynm/jliu/tiantian/download/samtools-0.1.18'
make: *** [all-recur] Error 1
I am using a linux server and gcc version is 6.1.0
Why are you trying to install such an ancient version of samtools? It looks like your compiler didn't like the macro-magic used by Heng's kstring code.
I want to install the Perl package Bio::DB::Sam, it need this old version of samtools
Download the binaries then, they're on sourceforge. Though a better option would be to not use Bio::DB:Sam, since if it's using something that ancient it's not maintained.
The problem is that Bio::DB::Sam is one of the few ways to display bam coverage tracks in GBrowse and in general to read Bamfiles in Perl
Eeek!
If you need to compile that lib, possibly an older compiler of the 4.x family could work. That might also result in having to build perl from scratch.