[Bioc-devel] Rsamtools Unable to Compile on FreeBSD 9.1

Martin Morgan mtmorgan at fhcrc.org
Mon Aug 19 04:53:56 CEST 2013

On 08/18/2013 07:18 PM, Aric Gregson wrote:
> Hello,
> I am trying to install Rsamtools but am having difficulty on
> R version 3.0.1 Patched (2013-05-26 r62815)
> Platform: amd64-portbld-freebsd9.1 (64-bit)
> I receive the following error when installing from within R. I suspect
> it is a PATH issue, it seems to be in FreeBSD when trying to compile
> Bioconductor packages.
> [snip]
> gcc46 -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG  -I/usr/local/include -I"/usr/local/lib/R/library/Biostrings/include" -I"/usr/local/lib/R/library/IRanges/include"  -fopenmp  -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64  -U_FORTIFY_SOURCE  -Dfprintf=_samtools_fprintf  -Dexit=_samtools_exit  -Dabort=_samtools_abort -I./samtools -I./samtools/bcftools -I./tabix -fpic  -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing  -c samtools/bcftools/bcfutils.c -o samtools/bcftools/bcfutils.o
> samtools/bcftools/bcfutils.c:3:37: fatal error: alloca.h: No such file or directory
> compilation terminated.
> *** [samtools/bcftools/bcfutils.o] Error code 1
> Stop in /tmp/Rtmp6FWVKA/R.INSTALL1352730cb1960/Rsamtools/src.
> ERROR: compilation failed for package 'Rsamtools'
> * removing '/usr/local/lib/R/library/Rsamtools'
> Can I provide you with more information to help diagnose the problem? I
> have searched google and not found any suggestions. Any help would be
> greatly appreciated.

Hi Aric --

I'm cc'ing the Bioc-devel mailing list, since this has been reported and fixed 
earlier, but not publicly.

This is fixed (I hope; please let me know if otherwise!!) in devel with

r79268 | mtmorgan at fhcrc.org | 2013-08-06 11:48:27 -0700 (Tue, 06 Aug 2013) | 2 lines
Changed paths:
    M /trunk/madman/Rpacks/Rsamtools/DESCRIPTION
    M /trunk/madman/Rpacks/Rsamtools/src/samtools/bcftools/bcfutils.c
    M /trunk/madman/Rpacks/Rsamtools/src/samtools/bcftools/prob1.c

alloca() in stdlib.h for FreeBSD

so library(BiocInstaller); useDevel(); biocLite(ask=FALSE) with R-3.0.1 should 
get you a fix (and perhaps additional grief associated with using devel, so only 
do this if an important deadline is imminent).


> Thanks, Aric

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

Location: Arnold Building M1 B861
Phone: (206) 667-2793

More information about the Bioc-devel mailing list