Missing implicit include for Boost, solved by adding BH explicitly
Hi CausalQueries team,
Congratulations on another CausalQueries update at CRAN. In maintaining the Ubuntu binaries in the r2u project, I am building binary packages from source (as CRAN and others do too). But when I do this I happen to use a 'clean room' approach as each build happens in a minimal container installing the declared dependencies. And CausalQueries fails (with an error failing to include a Boost header from its date_time library). At first I suspected I just needed to install the BH package, but it is actually inferred from one of the others (likely either rstan or StanHeaders).
However, your package still fails ... unless I add BH to LinkingTo: in Description. This likely means CRAN and others are getting by because they have Boost somewhere else, possibly as a system dependency. This is likely not a 'critical' issue (after all your package builds at CRAN) but probably something you want to fix.
The minimal diff from just adding BH (as just validated locally in a container) is
root@e1b00ff58a0c:/tmp/CausalQueries# diff -u CausalQueries{.orig,}/DESCRIPTION
--- CausalQueries.orig/DESCRIPTION 2025-12-21 04:10:02.000000000 +0000
+++ CausalQueries/DESCRIPTION 2025-12-21 12:59:17.004846712 +0000
@@ -29,7 +29,7 @@
1.4.0), knitr (>= 1.45), ggplot2 (>= 3.3.5), lifecycle (>=
1.0.1), ggraph (>= 2.2.0), Rcpp (>= 0.12.0)
LinkingTo: Rcpp (>= 0.12.0), RcppArmadillo, RcppEigen (>= 0.3.3.3.0),
- rstan (>= 2.26.0), StanHeaders (>= 2.26.0)
+ rstan (>= 2.26.0), StanHeaders (>= 2.26.0), BH
Suggests: testthat, rmarkdown, DeclareDesign, fabricatr, estimatr,
bayesplot, covr, curl
SystemRequirements: GNU make
root@e1b00ff58a0c:/tmp/CausalQueries#
For r2u (where I do not alter your package) I just circumvented this by forcing a Boost installation; that way the header is found as system header. But as CRAN package BH already gets installed, this should not be needed -- and adding the LinkingTo creates the missing '-I ... ' compiler flag. Thanks in advance for considering this.
/cc @kurthornik