I installed bioperl in ubuntu 14 by
sudo apt-get install bioperl
Then installed samtools by sudo apt-get install samtools
. Then I tried installing bio::db::sam
perl module but I couldn't trace bam.h
or libbam.a
. So I installed samtools from source in home/ramesh8v/samtools-1.3.1
, then I added this directory to environmental variable and I confirmed this by echo $PATH
.
Now, I'm trying to install bio::db::sam
by typing sudo cpan bio::db::sam
but I'm running into this error,
Reading '/home/ramesh8v/.cpan/Metadata'
Database was generated on Thu, 22 Sep 2016 04:17:02 GMT
Running install for module 'Bio::DB::Sam'
Running make for L/LD/LDS/Bio-SamTools-1.43.tar.gz
Checksum for /home/ramesh8v/.cpan/sources/authors/id/L/LD/LDS/Bio-SamTools-1.43.tar.gz ok
CPAN.pm: Building L/LD/LDS/Bio-SamTools-1.43.tar.gz
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: /home/ramesh8v/samtools-1.3.1
Found /home/ramesh8v/samtools-1.3.1/bam.h and /home/ramesh8v/samtools-1.3.1/libbam.a.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Bio-SamTools' version '1.43'
Building Bio-SamTools
cc -I/home/ramesh8v/samtools-1.3.1 -Ic_bin -I/usr/lib/perl/5.18/CORE -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o c_bin/bam2bedgraph.o c_bin/bam2bedgraph.c
cc -I/home/ramesh8v/samtools-1.3.1 -Ic_bin -I/usr/lib/perl/5.18/CORE -DXS_VERSION="1.43" -DVERSION="1.43" -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -o lib/Bio/DB/Sam.o lib/Bio/DB/Sam.c
lib/Bio/DB/Sam.xs: In function ‘XS_Bio__DB__Bam__Alignment_l_aux’:
lib/Bio/DB/Sam.xs:575:8: error: ‘bam1_t’ has no member named ‘l_aux’
b->l_aux = SvIV(ST(1));
^
lib/Bio/DB/Sam.xs:576:13: error: ‘bam1_t’ has no member named ‘l_aux’
RETVAL=b->l_aux;
^
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam__Index_coverage’:
lib/Bio/DB/Sam.xs:1008:20: warning: ignoring return value of ‘bgzf_seek’, declared with attribute warn_unused_result [-Wunused-result]
bgzf_seek(bfp,0,0);
^
In file included from lib/Bio/DB/Sam.xs:28:0:
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam_seek’:
/home/ramesh8v/samtools-1.3.1/bam.h:57:41: warning: ignoring return value of ‘bgzf_seek’, declared with attribute warn_unused_result [-Wunused-result]
#define bam_seek(fp, pos, dir) bgzf_seek(fp, pos, dir)
^
lib/Bio/DB/Sam.xs:380:5: note: in expansion of macro ‘bam_seek’
bam_seek(bam,pos,dir);
^
lib/Bio/DB/Sam.c: In function ‘XS_Bio__DB__Bam_header_write’:
lib/Bio/DB/Sam.xs:356:16: warning: ignoring return value of ‘bgzf_seek’, declared with attribute warn_unused_result [-Wunused-result]
bgzf_seek(bam,0,0);
^
error building lib/Bio/DB/Sam.o from 'lib/Bio/DB/Sam.c' at /usr/share/perl/5.18/ExtUtils/CBuilder/Base.pm line 177.
LDS/Bio-SamTools-1.43.tar.gz
./Build -- NOT OK
Running Build test
Can't test without successful make
Running Build install
Make had returned bad status, install seems impossible
Can you check what version of samtools was installed by
apt-get
(samtools --version
)? I assume that is in your $PATH.samtools --version
gives meYes. it's in my path. I could able to use samtools without any problem.
README file for bio::db:sam says following.
Many thanks for pointing that out
Aside from the version issue, you probably only installed the
samtools
binary and the Perl module needs the library files to compile against. So, I'm certain this won't work because there is possibly no library available and it would be the wrong version if it could be found.