[Debian-med-packaging] [devteam-bioc] Problems with test suite of new verison of Rsamtools

'Andreas Tille' tille at debian.org
Tue Nov 3 17:37:07 UTC 2015


Hi Martin,

On Tue, Nov 03, 2015 at 05:20:39PM +0000, Morgan, Martin wrote:
> > > the test could be written as
> > >
> > > warn <- FALSE
> > > tryCatch(Rsamtools::indexBam(fl, tempfile()), warning=function(msg)
> > > warn <<- TRUE) warn
> > >
> > > (expecting the value of warn changed to TRUE).
> > >
> > > If the test above is not successful, then can you please provide the
> > > transcript of the package installation? Rsamtools re-directs fprintf
> > > calls in the samtools library, and I believe that some compiler flags
> > > will prohibit this re-direction. This is what Rsamtools tries to
> > > impose (from src/Makevars.common)
> > >
> > > DFLAGS = -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \
> > >   -U_FORTIFY_SOURCE -DBGZF_CACHE \
> > >   -Dfprintf=_samtools_fprintf \
> > >   -Dexit=_samtools_exit \
> > >   -Dabort=_samtools_abort
> > 
> > I have attached the full build log of the Debian package which contains all
> > flags.
> 
> The compiler output show that Rsamtools tries to turn off _FORTIFY_SOURCE (which is on by default) by undefining the symbol with the flag
> 
>    -U_FORTIFY_SOURCE
> 
> but that you then over-write this with
> 
>   -D_FORTIFY_SOURCE=2
> 
> _FORTIFY_SOURCE=2 does not allow fprintf to be re-directed, so the error message from samtools is not treated as a warning in Rsamtools, and the unit test fails. Did you specify _FORTIFY_SOURCE=2 when you built R?

Yes, -D_FORTIFY_SOURCE=2 is a security means to harden Debian packages
in general.

> I'm not sure what path forward to take.

Any chance to write a log file and to use this as a stream for any
output?  Sorry, might be a stupid idea - I'm not at all educated in R
internals.
 
Kind regards

     Andreas.

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list