Issue for package "assurance" installation

Hi

I have a problem for installing the "assurance" package. Do anyone else having the same issue? Do any one know how to fix this? Thank you!

Attached below is the code:

> install.packages("devtools")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.3/devtools_2.4.5.tgz'
Content type 'application/x-gzip' length 430872 bytes (420 KB)
==================================================
downloaded 420 KB


The downloaded binary packages are in
	/var/folders/69/s7mrlv1j0ls_ydvfz68fjp9w0000gn/T//Rtmp3WdqpY/downloaded_packages
> library(devtools)
Loading required package: usethis
> devtools::install_github("scientific-computing-solutions/assurance", build_vignettes = TRUE)
Downloading GitHub repo scientific-computing-solutions/assurance@HEAD
── R CMD build ───────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/69/s7mrlv1j0ls_ydvfz68fjp9w0000gn/T/Rtmp3WdqpY/remotes16dc127456c53/scientific-computing-solutions-assurance-912d7c0/DESCRIPTION’ ...
─  preparing ‘assurance’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  installing the package to build vignettes
         -----------------------------------
─  installing *source* package ‘assurance’ ...
   ** using staged installation
   ** libs
   using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
   using SDK: ‘MacOSX13.3.sdk’
   clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include   `/Library/Frameworks/R.framework/Resources/bin/Rscript -e "Rcpp:::CxxFlags()"` -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -fdiagnostics-color=always -c assurance.cc -o assurance.o
   assurance.cc:2:10: fatal error: 'Rcpp.h' file not found
   #include <Rcpp.h>
            ^~~~~~~~
   1 error generated.
   make: *** [assurance.o] Error 1
   ERROR: compilation failed for package ‘assurance’
─  removing ‘/private/var/folders/69/s7mrlv1j0ls_ydvfz68fjp9w0000gn/T/RtmpFRnXCP/Rinst16e493be99ac0/assurance’
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'assurance' from GitHub:
  ! System command 'R' failed

Hi @ctseng19
Welcome to the Posit/RStudio Community Forum.

The assurance package depends upon several other packages including Rcpp. The lack of Rcpp seems to be causing your error. You can see the list of dependencies in the DESCRIPTION file on GitHub.
You can either install those at the same time as assurance by using

devtools::install_github("scientific-computing-solutions/assurance", 
build_vignettes = TRUE, dependencies=TRUE)

or run
install.packages("Rcpp")
separately first.

is thrown even if Rcpp.h is installed, whether in macOS or Ubuntu. I cloned the repo and tried removing some unnecessary references to Rcpp in the Makevars file without success. I then tried removing the import for Rcpp and that blew things up altogether. I don't see in accurrance.cc() where Rcpp.h is invoked.

The problem is probably due to the age of the package (from 2015) and the changes in RCpp since then.

I see three ways forward

  1. Recruit someone more adept than I am at packages to figure out where the install process is pointing to the wrong directory to find RCpp
  2. Contact the author maintainer the github addresses shown
  3. See if it can be made to work without compilation by using Rcpp source calls.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.