BioPerl is installed
Samtools 0.1.9 is used using "-fPIC" flags ( I was getting R_X_86_64_32 err). Infact I've tried adding the "-fPIC" flag and then tried using the flags in the SamTools Readme(http://cpansearch.perl.org/src/LDS/Bio-SamTools-1.41/README) but I get the same error.
Environment Variable is set:
echo $SAMTOOLS /export/home/yusuf/samtools
Downloaded Bio-SamTools-1.[36-41] I've tried all versions between 1.36 and 1.41, same error.
But I always have the same problem.
perl Build.PL Found /export/home/yusuf/samtools/bam.h and /export/home/yusuf/samtools/libbam.a. Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Bio-SamTools' version '1.41' [yusuf@host Bio-SamTools-1.41]$ ./Build Building Bio-SamTools cc -shared -O2 -L/usr/local/lib -fstack-protector -o blib/arch/auto/Bio/DB/Sam/Sam.so lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o -L/export/home/yusuf/samtools -lbam -lpthread -lz /usr/bin/ld: /usr/local/lib/libbam.a(bgzf.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libbam.a: could not read symbols: Bad value collect2: ld returned 1 exit status error building blib/arch/auto/Bio/DB/Sam/Sam.so from lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o at /export/home/yusuf/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/ExtUtils/CBuilder/Base.pm line 323.
For some reason is is stuck on using libbam in /usr/local/lib and not the one I have built as set in my ENV variable. It detects that it is there in my build folder, but never uses it. As such, I cannot build the perl module.