[BioC] RE : rsamtools installation

Martin Morgan mtmorgan at fhcrc.org
Wed Nov 16 06:37:56 CET 2011


On 11/14/2011 04:39 AM, Wolfgang RAFFELSBERGER wrote:
> Dear List,
> I have trouble too installing Rsamtools and RSQlite with R-2.14.0 on a RedHat system (installation of previous R&  BioC versions had no problems on the same system).
> In the case of RSQlite I'll try if there is a way of updating/grading our C compiler, but for Rsamtools I don't know what might be the problem (the file 'Rsamtools.so' actually exists in the folder 'Rsamtools').
> Initially I ran into the problems using  biocLite(), here I'lm reporting the specific messages when looking directly at Rsamtools and RSQlite.
> Any hits are appreciated,

Hi Wolfgang --

For Rsamtools...

>
> Wolfgang
>
>
>> source("http://www.bioconductor.org/biocLite.R")
> BiocInstaller version 1.2.1, ?biocLite for help
>>
>>   biocLite("Rsamtools")
> BioC_mirror: 'http://www.bioconductor.org'
> Using R version 2.14, BiocInstaller version 1.2.1.
> Installing package(s) 'Rsamtools'
> trying URL 'http://www.bioconductor.org/packages/2.9/bioc/src/contrib/Rsamtools_1.6.1.tar.gz'
> Content type 'application/x-gzip' length 2088996 bytes (2.0 Mb)
> opened URL
> ==================================================
> downloaded 2.0 Mb
>
> * installing *source* package 'Rsamtools' ...
> ** libs
...
> gcc -std=gnu99 -I/biolo/R_star/R-2.14.0/lib64/R/include  -I/usr/local/include -I"/linux/biolo/R_star/R-2.14.0/lib64/R/library/Biostrings/include" -I"/linux/biolo/R_star/R-2.14.0/lib64/R/library/IRanges/include"  -fopenmp -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 -Dfprintf=_samtools_fprintf -Dexit=_samtools_exit -Dabort=_samtools_abort -I./samtools -I./samtools/bcftools -I./tabix -fpic  -g -O2 -c samtools/razf.c -o samtools/razf.o
> samtools/razf.c:58:2: warning: #warning "zlib<  1.2.2.1; RAZF writing is disabled."

the problem is that your zlib is too old :( from the top of my 
/usr/include/zlib.h (yours might be located elsewhere) I have

/* zlib.h -- interface of the 'zlib' general purpose compression library
   version 1.2.3, July 18th, 2005

I'm wondering whether your zlib really is that old, i.e., before 2005? 
I'm not sure why this would occur now, and not previously. Perhaps your 
R is finding a different zlib.h? You can create / edit a file

~/.R/Makevars

to contain the line

CFLAGS += "-v"

and then from the command line after downloading Rsamtools.tar.gz

tar xzf Rsamtools.tar.gz
R CMD INSTALL Rsamtools

and look for information like

#include "..." search starts here:
#include <...> search starts here:
  /home/mtmorgan/bin/R-2-14-branch/include
  /home/mtmorgan/R/x86_64-unknown-linux-gnu-library/2.14/Biostrings/include
  /home/mtmorgan/R/x86_64-unknown-linux-gnu-library/2.14/IRanges/include
  ./samtools
  ./samtools/bcftools
  ./tabix
  /usr/local/include
  /usr/lib64/gcc/x86_64-suse-linux/4.5/include
  /usr/lib64/gcc/x86_64-suse-linux/4.5/include-fixed
  /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/include
  /usr/include
End of search list.

and painstaking looking through the directories to find the first zlib.h.

There have been changes in Rsamtools, including how it configures 
itself, so perhaps this is a symptom rather than cause.


> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>    unable to load shared object '/linux/biolo/R_star/R-2.14.0/lib64/R/library/Rsamtools/libs/Rsamtools.so':
>    /linux/biolo/R_star/R-2.14.0/lib64/R/library/Rsamtools/libs/Rsamtools.so: undefined symbol: razf_write

This is saying that razf_write is not found in Rsamtools.so; you can 
verify this, with a command like

 > R CMD nm Rsamtools/src/Rsamtools.so |grep razf_write
00000000000362b3 t _razf_write
0000000000036816 T razf_write

on the .so created by R CMD INSTALL Rsamtools. The 'T' will be 
different, as described on the nm man page.

> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing '/linux/biolo/R_star/R-2.14.0/lib64/R/library/Rsamtools'
>
> The downloaded packages are in
>          '/tmp/RtmpN7ZA1O/downloaded_packaoges'
> Updating HTML index of packages in '.Library'
> Making packages.html  ... done
> Warning message:
> In install.packages(pkgs = pkgs, repos = repos, ...) :
>    installation of package 'Rsamtools' had non-zero exit status
>>
>>
>>   ## following a recent related post on the list I tried what was suggested but this had no effect ...
>>
>>   rm(biocLite)
> Warning message:
> In rm(biocLite) : object 'biocLite' not found
>>    rm(biocinstallRepos)
> Warning message:
> In rm(biocinstallRepos) : object 'biocinstallRepos' not found
>>
>>
>>
>> biocLite("RSQLite")
> BioC_mirror: 'http://www.bioconductor.org'
> Using R version 2.14, BiocInstaller version 1.2.1.
> Installing package(s) 'RSQLite'
> trying URL 'http://cran.fhcrc.org/src/contrib/RSQLite_0.10.0.tar.gz'
> Content type 'application/x-gzip' length 1495533 bytes (1.4 Mb)
> opened URL
> ==================================================
> downloaded 1.4 Mb
>
> * installing *source* package 'RSQLite' ...
> ** package 'RSQLite' successfully unpacked and MD5 sums checked
> checking for gcc...
> gcc -std=gnu99
> checking for C compiler default output file name...
> configure: error: C compiler cannot create executables

This one is strange, especially since you've just compiled Rsamtools! It 
might help to provide the last 20-30 lines of config.log

> See `config.log' for more details.
> configure: WARNING: Cache variable ac_cv_prog_ac_ct_CC contains a newline.
> ERROR: configuration failed for package 'RSQLite'
> * removing '/linux/biolo/R_star/R-2.14.0/lib64/R/library/RSQLite'
>
> The downloaded packages are in
>          '/tmp/RtmpU91PTB/downloaded_packages'
> Updating HTML index of packages in '.Library'
> Making packages.html  ... done
> Warning message:
> In install.packages(pkgs = pkgs, repos = repos, ...) :
>    installation of package 'RSQLite' had non-zero exit status
>>
>>
>> ## For completeness
>>
>> sessionInfo()
> R version 2.14.0 (2011-10-31)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] BiocInstaller_1.2.1
>
> loaded via a namespace (and not attached):
> [1] tools_2.14.0
>
>
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> Wolfgang Raffelsberger, PhD
> IGBMC,
> 1 rue Laurent Fries,  67404 Illkirch  Strasbourg,  France
> Tel (+33) 388 65 3300         Fax (+33) 388 65 3201
> wolfgang.raffelsberger (at) igbmc.fr
>
> ________________________________________
> De : bioconductor-bounces at r-project.org [bioconductor-bounces at r-project.org] de la part de Xavier de Pedro [xavier.depedro at vhir.org]
> Date d'envoi : lundi 14 novembre 2011 09:37
> ? : Martin Morgan
> Cc : kthom110 at uncc.edu; bioconductor at r-project.org
> Objet : Re: [BioC] rsamtools installation
>
> Hi
>
> I was having a similar issue after upgrading to 2.14 and their
> corresponding biocoonductor packages.
>
> And manually installing again bitops (and a few othes with a similar
> issue for me), e.g.:
>
> biocLite("bitops")
>
> did the trick. For some reason, the older version didn'thave the
> namespace that the new version of packages expects (for what I've noticed)
>
> Cheers
>
> Xavi
>
> On 11/11/11 20:00, Martin Morgan wrote:
>> On 11/11/2011 09:55 AM, kevin [guest] wrote:
>>>
>>> hi,
>>>
>>>      having difficulties installing Rsamtools, through biocLite:
>>>
>>> Warning: replacing previous import ?EUR?.__C__file?EUR(tm) when loading
>>> ?EUR?Biostrings?EUR(tm)
>>> Warning: replacing previous import ?EUR?.__C__connection?EUR(tm) when
>>> loading ?EUR?Biostrings?EUR(tm)
>>> Error : classes "file", "connection" are not exported by
>>> 'namespace:Biostrings'
>>> ERROR: lazy loading failed for package ?EUR?Rsamtools?EUR(tm)
>>> * removing
>>> ?EUR?/home/kthom110/R/x86_64-pc-linux-gnu-library/2.12/Rsamtools?EUR(tm)
>>> * restoring previous
>>> ?EUR?/home/kthom110/R/x86_64-pc-linux-gnu-library/2.12/Rsamtools?EUR(tm)
>>>
>>> The downloaded packages are in
>>>      ?EUR?/tmp/Rtmp6N3TVN/downloaded_packages?EUR(tm)
>>> Warning message:
>>> In install.packages(pkgs = pkgs, repos = repos, ...) :
>>>     installation of package 'Rsamtools' had non-zero exit status
>>>
>>>     and via R CMD INSTALL Rsamtools/
>>>
>>> Error : package 'bitops' does not have a name space
>>> ERROR: lazy loading failed for package ?EUR?Rsamtools?EUR(tm)
>>> * removing
>>> ?EUR?/home/kthom110/R/x86_64-pc-linux-gnu-library/2.12/Rsamtools?EUR(tm)
>>> * restoring previous
>>> ?EUR?/home/kthom110/R/x86_64-pc-linux-gnu-library/2.12/Rsamtools
>>>
>>>
>>> any help will be appreciated,
>>> kevin
>>>
>>>    -- output of sessionInfo():
>>>
>>> R version 2.12.1 (2010-12-16)
>>> Platform: x86_64-pc-linux-gnu (64-bit)
>>>
>>> locale:
>>>    [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>>    [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>>    [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>>>    [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>>>    [9] LC_ADDRESS=C               LC_TELEPHONE=C
>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] Biostrings_2.22.0 IRanges_1.12.1
>>
>> Somehow you have managed to install Biostrings and IRanges for version
>> 2.14 into your version 2.12 library; biocLite is trying to install the
>> version of Rsamtools for 2.12 (presumably; there isn't enough info at
>> the top).
>>
>> Your command line
>>
>>>     and via R CMD INSTALL Rsamtools/
>>>
>>> Error : package 'bitops' does not have a name space
>>
>> implies that the R at the command line is version 2.14, i.e., you have
>> multiple different versions of R installed on your system.
>>
>> I'd suggest starting again (with current R 2-14) and sticking with
>> biocLite.
>>
>> Martin
>>
>>>
>>> loaded via a namespace (and not attached):
>>> [1] tools_2.12.1
>>>
>>>
>>> --
>>> Sent via the guest posting facility at bioconductor.org.
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives:
>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioconductor mailing list