[R-pkg-team] Bug#1108078: Bug#1108078: r-cran-bh: fails hard with 'Boost not found'
Dirk Eddelbuettel
edd at debian.org
Fri Jun 20 23:59:36 BST 2025
On 21 June 2025 at 07:26, Charles Plessy wrote:
| Control: retitle -1 r-cran-rstan: fails hard with 'Boost not found'
| Control: tag -1 + patch
|
| Thanks Michael and Dirk for the fix,
|
| Just a quick comment for users who might be impacted before the stable
| update:
|
| Le Fri, Jun 20, 2025 at 07:51:17PM +0200, Michael Prokop a écrit :
| >+- if (!file.exists(rstan_options("boost_lib")))
| >+- stop("Boost not found; call install.packages('BH')")
| >++# if (!file.exists(rstan_options("boost_lib")))
| >++# stop("Boost not found; call install.packages('BH')")
|
| So setting `boost_lib` at runtime to an arbitrary existing file or path
| also prevents rstan from stopping, like with:
|
| rstan_options("boost_lib" = '.')
|
| It is surprising that rstan never worked and we never noticed until this
| week. It is possible that we ship it merly because it is listed in the
| Suggest field of the DESCRIPTION file of other R packages. Often this
| is because it is needed in the other package's unit tests, which makes
| it strictly required for us, but sometimes it is only because some
| optional support for it is provided by the other package, leading to
| cases like this one.
The key issue here, I suspect, is a really a mismatch between 'Build-Depends'
and 'Depends' (which we have, but CRAN doesn't) and actual run-time
dependencies.
rstan builds compiled programs for its MCMC etc use, that is different from
eg my package anytime needing Boost headers only at _build-time_ and not
thereafter.
What Mika found here (in the original bug report) is that only Debian stable
has a failing rstan. The newer ones work. We (ie Debian) "trick" rstan via
our r-cran-bh, it thinks it has a full BH (120+ mb on disk...) and constructs
and _explicit_ include path via system.file(). I think I could soften the
blow by adding an (empty) includes/ dir in the (virtual) package r-cran-bh.
In any event, the little patch avoids the failure seen on Debian stable where
system.file("include", package="BH")
otherwise fails due our r-cran-bh actually relying on our libboost-dev.
Makes sense?
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-pkg-team
mailing list