[Bioc-devel] C++ header changes in R-devel

Dan Tenenbaum dtenenba at fredhutch.org
Wed Mar 2 17:38:53 CET 2016


Hi,

I contacted some of you yesterday because your packages are breaking in R-devel. 

Specifically these packages MAY have this issue:

AffyTiling
bgx
CALIB
Cardinal
flipflop
Ringo
rMAT
seqbias


I may have said something like this:

"Probably due to changes in R headers in recent R-devel. Please use
recent R-devel to find and fix the problem."

That's not super helpful (plus, what are R headers?). 

This may be more helpful. Here is Brian Ripley describing several affected packages:

"These now fail to install in R-devel as they include headers such as R.h
from C++ code inside an extern "C" block. That has been failing in some
pre-release compilers and we have switched to including C++ headers such
as cmath (rather than math.h). Installation now fails with current
versions of common C++ compilers such as g++ and clang++."

See also this excerpt from the NEWS file (https://github.com/wch/r-source/blob/trunk/doc/NEWS.Rd#L439-L449):

      \item When \R{} headers such as \file{R.h} and \file{Rmath.h} are
      called from C++ code in packages they include the C++ versions of
      system headers such as \file{<cmath>} rather than the legacy
      headers such as \file{<math.h>}.  (Headers \file{Rinternals.h} and
      \file{Rinterface.h} already did, and inclusion of system headers
      can still be circumvented by defining \code{NO_C_HEADERS},
      including as from this version for those two headers.)

      The manual has long said that \R{} headers should \bold{not} be
      included within an \code{extern "C"} block, and almost all the
      packages affected by this change are doing so.

Hope this is more helpful.

Dan



More information about the Bioc-devel mailing list