安装Bio :: DB :: Sam perl模块

前端之家收集整理的这篇文章主要介绍了安装Bio :: DB :: Sam perl模块前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试在远程服务器上的主目录上安装perl模块 Bio::DB::Sam.

我下载了模块,解压缩了文件,然后运行:

perl Build.pl prefix=~/local

接下来会发生什么:

This module requires samtools 0.1.10 or higher (samtools.sourceforge.net).
Please enter the location of the bam.h and compiled libbam.a files: **/some_places/samtools-0.1.19**

Found /some_places/samtools-0.1.19/bam.h and /some_places/samtools-0.1.19/libbam.a.
Created MYMeta.yml and MYMeta.json
Creating new 'Build' script for 'Bio-SamTools' version '1.39'

接下来当我尝试运行时:

./Build

这就是我得到的:

Building Bio-SamTools
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o blib/arch/auto/Bio/DB/Sam/Sam.so lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o -L/some_places/samtools-0.1.19 -lbam -lpthread -lz
/usr/bin/ld: /some_places/samtools-0.1.19/libbam.a(bgzf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/some_places/samtools-0.1.19/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 ~/perl5/lib/perl5/ExtUtils/CBuilder/Base.pm line 323.

我确实谷歌可能的解决方案并尝试了一对,但他们没有工作,例如–enable-shared OR export CXXFLAGS =“$CXXFLAGS -fPIC”.

我已经在我的主目录上安装了Bioperl.

任何帮助,将不胜感激.

干杯

@H_403_27@解决方法
这是一个脚本,它将获取SAMtools源并对其进行编译,然后获取并编译Perl绑定.
wget http://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2
tar xjf samtools-0.1.18.tar.bz2 && cd samtools-0.1.18
make CFLAGS=-fPIC
export SAMTOOLS=`pwd`
cpanm Bio::DB::Sam

您可能看到的部分问题是SAMtools项目最近经历了一些主要的代码重组(这自然使得很难使用外部语言绑定).

原文链接:https://www.f2er.com/Perl/171398.html

猜你在找的Perl相关文章