Re: Bio-Samtools-1.39 compilation errors

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Bio-Samtools-1.39 compilation errors

Scott Cain
Hi Nicola,

I'm going to cc this to the GBrowse mailing list, since there are lots of people experienced with compiling SAMtools.  The reason I don't personally know much about compiling it is that when I use Ubuntu, I just use apt-get to install it:

  sudo apt-get install libbio-samtools libbio-samtools-perl

That installs SAMtools 1.18 and Bio::DB::Sam 1.32.

Scott



On Mon, Oct 7, 2013 at 8:28 AM, Nicola Losito <[hidden email]> wrote:
Hello there,
I'm writing here since I cannot find a solution to the compilation of Bio-Samtools on our 64bit Ubuntu 12.04LTS machine.
Both manually and via gbrowse-adaptors the error is the same:


nicola@popeye:~/Downloads/Bio-SamTools-1.39$ ./Build 
Building Bio-SamTools
cc -I/opt/samtools-0.1.19 -Ic_bin -I/usr/lib/perl/5.14/CORE -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -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/opt/samtools-0.1.19 -Ic_bin -I/usr/lib/perl/5.14/CORE -DXS_VERSION="1.39" -DVERSION="1.39" -fPIC -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 -Wformat=0 -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -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
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Bio/DB/Sam/Sam.bs')
cc -shared -O2 -g -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/opt/samtools-0.1.19 -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 /usr/share/perl/5.14/ExtUtils/CBuilder/Base.pm line 312.



I've tried the suggestion given http://gmod.org/wiki/GBrowse_NGS_Tutorial#Bio::DB::Sam_Adaptor to manually recompile samtools (in my case I've tried both the 0.1.18 and 0.1.19 releases) with the
make CXXFLAGS=-fPIC CFLAGS=-fPIC CPPFLAGS=-fPIC
parameters, unsuccessfully ... as you can see above.

What else can I do ?
Thanks,
Nicola

-- 
Nicola Losito                     ITB Bari, CNR

T. <a href="tel:%28%2B39%29%20080%20592%209666" value="+390805929666" target="_blank">(+39) 080 592 9666 | <a href="callto://nicola.losito" target="_blank">callto://nicola.losito 




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Reply | Threaded
Open this post in threaded view
|

Re: Bio-Samtools-1.39 compilation errors

Scott Cain
Hi Nicola,

Please keep the GBrowse mailing list cc'ed so the discussion can be archived and searchable.

I got the name wrong on the first package; checking:

  sudo apt-cache search samtools

yeilds

libbio-samtools-perl - read SAM/BAM nucleotide sequence aligment database files
maq - maps short fixed-length polymorphic DNA sequence reads to reference sequences
samtools - processing sequence alignments in SAM and BAM formats

so the one you needed was "samtools".  In fact, since it is a prerequisite for libbio-samtools-perl, and that successfully installed, you already have samtools installed via apt-get.

Scott



On Mon, Oct 7, 2013 at 10:55 AM, Nicola Losito <[hidden email]> wrote:

Il giorno 07/ott/2013, alle ore 16:44, Scott Cain <[hidden email]> ha scritto:

Hi Nicola,

I'm going to cc this to the GBrowse mailing list, since there are lots of people experienced with compiling SAMtools.  The reason I don't personally know much about compiling it is that when I use Ubuntu, I just use apt-get to install it:

  sudo apt-get install libbio-samtools libbio-samtools-perl

That installs SAMtools 1.18 and Bio::DB::Sam 1.32.



Hi Scott, 
thanks for your FAST reply.

You probably have some third-party repository on your system, since in mine the first package does not exists, while the second has successfully installed. If you want I'll keep you updated on the topic.

Cheers,
Nicola



-- 
Nicola Losito                     ITB Bari, CNR

T. <a href="tel:%28%2B39%29%20080%20592%209666" value="+390805929666" target="_blank">(+39) 080 592 9666 | <a href="callto://nicola.losito" target="_blank">callto://nicola.losito 




--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse