rspatial / terra

R package for spatial data handling https://rspatial.github.io/terra/reference/terra-package.html
GNU General Public License v3.0
541 stars 89 forks source link

R CMD Check fails in MacOS: there is no package called 'terra' #412

Closed salvafern closed 2 years ago

salvafern commented 2 years ago

Hi,

Apologies if this issue has been already raised, I couldn't find anything that helped me.

I'm and maintaining sdmpredictors, which is dependent on raster. The last R CMD Checks are failing on mac os. For some reason terra cannnot be installed. I don't work on mac so it is being hard to debug. Do you have any idea of what's going on?

For instance see: https://github.com/lifewatch/sdmpredictors/runs/4299515863?check_suite_focus=true


Run options(crayon.enabled = TRUE)
── R CMD build ─────────────────────────────────────────────────────────────────
pdflatex not found! Not building PDF manual.
* checking for file ‘.../DESCRIPTION’ ... OK
* preparing ‘sdmpredictors’:
* checking DESCRIPTION meta-information ... OK
* installing the package to process help pages
      -----------------------------------
* installing *source* package ‘sdmpredictors’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘terra’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘sdmpredictors’
* removing ‘/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpHYtvHi/Rinst115144510ff9/sdmpredictors’
      -----------------------------------
ERROR: package installation failed
Error: Error in proc$get_built_file() : Build process failed
Calls: <Anonymous> ... build_package -> with_envvar -> force -> <Anonymous>
Execution halted
Error: Process completed with exit code 1.

Many thanks in advance!

rhijmans commented 2 years ago

I assume that is because terra currently does not build on OSX on CRAN because I used, unwittingly, some C++14 while only specifying C++11. I will send a new version to CRAN today, and the problem should go away within a week (it can take a while before the OSX builds are available.)