Entering edit mode
9.3 years ago
ali
•
0
BioPerl is installed
samtools 0.1.9 is used using -fPIC
flags (I was getting R_X_86_64_32
err). In fact I've tried adding the -fPIC
flag and then tried using the flags in the samTools 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.
Any suggestions?
Have you tried just editing Build to remove
/usr/local/lib
? The linker is finding that first, so that's what it's using.I would, but I have no idea how.
and comment appropriate lines. For help with which lines, please paste the file in a GitHub gist and share the link here.
gist: http://gist.github.com/yusuf-a/3c9e63dc8062204dab92
Try commenting out line 10.
that just breaks
Hmmm, I was mistaken about the problem - this bug has already been addressed. Let's check out the next step then.
The problem seems to be with the cc step, which should be in the Makefile. Can you paste the Makefile in a gist as well please?
Also, you might wanna change this:
to:
and try once.
breaks
gist:
http://gist.github.com/yusuf-a/da87e2468b0f3280f31d
edit: switched to 1.39 because everyone else I know got that working. Not 1.41
Hi, this gist doesn't seem to be the Makefile. Could you check again please? Thank you!
http://gist.github.com/yusuf-a/c54c12257452f0ab2c73