-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I'm trying to run a revdepcheck for RcppParallel, and I'm seeing some failures during check like the following. For example (the following was part of the check failure for the alien package)
When sourcing ‘native_discoveries.R’:
Error: package or namespace load failed for ‘rstan’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/kevin/r/pkg/RcppParallel/revdep/library.noindex/alien/rstan/libs/rstan.so':
dlopen(/Users/kevin/r/pkg/RcppParallel/revdep/library.noindex/alien/rstan/libs/rstan.so, 0x0006): symbol not found in flat namespace '__ZN3tbb8internal26task_scheduler_observer_v37observeEb'
Execution haltedThe error here would seem to imply that the version of rstan being used here was built against the old version of RcppParallel, not the current / dev version. Compare e.g.
> install.packages("RcppParallel")
Installing package into ‘/Users/kevin/Library/R/arm64/4.4/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/RcppParallel_5.1.9.tgz'
Content type 'application/x-gzip' length 588289 bytes (574 KB)
==================================================
downloaded 574 KB
The downloaded binary packages are in
/var/folders/5v/jg7ch5gx5jv61wt3cw4xr3yw0000gp/T//RtmpGrjb5B/downloaded_packages
> tbb <- system.file("lib/libtbb.dylib", package = "RcppParallel")
> system(paste("nm", tbb, "| grep task_scheduler_observer"))
000000000001b640 t __ZN3tbb8internal14observer_proxyC1ERNS0_26task_scheduler_observer_v3E
000000000001b600 t __ZN3tbb8internal14observer_proxyC2ERNS0_26task_scheduler_observer_v3E
000000000001be80 T __ZN3tbb8internal26task_scheduler_observer_v37observeEbBut, using the development version of RcppParallel:
> tbb <- system.file("lib/libtbb.dylib", package = "RcppParallel")
> system(paste("nm", tbb, "| grep task_scheduler_observer"))
0000000000011ec0 T __ZN3tbb6detail2r17observeERNS0_2d123task_scheduler_observerEbThat is, the symbols in RcppParallel's bundled tbb library have moved around, and so packages which use TBB through RcppParallel would need to be rebuilt.
I see the same issue if I install a binary of rstan and try to load it, e.g.
> install.packages("rstan", type = "binary")
Installing package into ‘/Users/kevin/Library/R/arm64/4.4/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/rstan_2.32.6.tgz'
Content type 'application/x-gzip' length 8945724 bytes (8.5 MB)
==================================================
downloaded 8.5 MB
The downloaded binary packages are in
/var/folders/5v/jg7ch5gx5jv61wt3cw4xr3yw0000gp/T//Rtmplpac8y/downloaded_packages
> library(rstan)
Error: package or namespace load failed for ‘rstan’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/kevin/Library/R/arm64/4.4/library/rstan/libs/rstan.so':
dlopen(/Users/kevin/Library/R/arm64/4.4/library/rstan/libs/rstan.so, 0x0006): symbol not found in flat namespace '__ZN3tbb8internal26task_scheduler_observer_v37observeEb'But if I rebuild from sources, then all is fine. My intention is to ask CRAN to rebuild all of RcppParallel's downstream dependencies when I submit the next version to CRAN.
tl;dr: How do I force revdepcheck to install all package dependencies from sources here, so that packages are rebuilt against the appropriate version of RcppParallel?