inbo / n2khab

R package with preprocessing functions and standard reference data for Flemish Natura 2000 (N2K) habitat (HAB) analyses
https://inbo.github.io/n2khab
GNU General Public License v3.0
2 stars 1 forks source link

Installation under Windows fails #8

Closed florisvdh closed 5 years ago

florisvdh commented 5 years ago

I received the following issue from @w-jan:

Installation in Windows fails with following output:

> remotes::install_github("inbo/n2khab",
+                         build_opts = c("--no-resave-data", "--no-manual"))
Downloading GitHub repo inbo/n2khab@master
These packages have more recent versions available.
Which would you like to update?

1:   raster (2.9-5 -> 2.9-23) [CRAN]

Enter one or more numbers separated by spaces, or an empty line to cancel
1: 1
raster (2.9-5 -> 2.9-23) [CRAN]
Installing 1 packages: raster
Installing package into ‘C:/R/Library’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
       binary source needs_compilation
raster  2.9-5 2.9-23              TRUE

  Binaries will be installed
trying URL 'http://cloud.r-project.org/bin/windows/contrib/3.5/raster_2.9-5.zip'
Content type 'application/zip' length 3667751 bytes (3.5 MB)
downloaded 3.5 MB

package ‘raster’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\jan_wouters\AppData\Local\Temp\Rtmp2b8esq\downloaded_packages
√  checking for file 'C:\Users\jan_wouters\AppData\Local\Temp\Rtmp2b8esq\remotes1fe4437d5fc\inbo-n2khab-be9fe24/DESCRIPTION' (402ms)
-  preparing 'n2khab': (352ms)
√  checking DESCRIPTION meta-information ...
-  cleaning src
-  installing the package to build vignettes (337ms)
         -----------------------------------
-  installing *source* package 'n2khab' ...
   ** libs
   no DLL was created
   ERROR: compilation failed for package 'n2khab'
-  removing 'C:/Users/JAN_WO~1/AppData/Local/Temp/RtmpCcwlvA/Rinst5e87757383c/n2khab'
   In R CMD INSTALL
         -----------------------------------
   ERROR: package installation failed
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  :
  System command error
florisvdh commented 5 years ago

This problem looks similar to this one and appears to be cured by a22a843.

Source code to generate vc-formatted data sources and a few miscellaneous R-scripts to aid in package development was in a (package-ignored) folder src. However, even though src was listed in .RBuildignore, compilation under Windows failed while it posed no problem in Linux. An src folder can be used to feed C++ source code to the package building process, hence should be avoided for other uses.