helios/bioruby-samtools — Issue #7: libbam.so.1 won't compile in bio-samtools on AMD64, same version does from manual make
Author: danmaclean
Created: 2011-11-10 10:58:08+00:00
State: open

When I use the rakefile to install the binaries as a developer (e.g. cd ext; ruby mkrf_conf.rb; rake -f Rakefile;) library compilation fails on my AMD64 box at the libbam.so.1 stage. Oddly running the make manually (without applying the patch in mkrf_conf.rb to the makefile) in the same version of samtools runs fine. Is the make being scuppered by the patch. Im not a whizz with makefiles so couldn't track it down...

Same step goes fine on my Mac

heres the tail of the output from failed install

gcc -shared -Wl,-soname,libbam.so -o libbam.so.1 bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o knetfile.o bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o bam_plcmd.o bam2bcf.o bam2bcf_indel.o sample.o bcftools/bcf.o bcftools/bcfutils.o errmod.o bcftools/fet.o -lc -lz
/usr/bin/ld: bcftools/bcf.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
bcftools/bcf.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libbam.so.1-local] Error 1