morenomancosu / fbSim

Simulates a Facebook user's behavior and stores Fb pages information
GNU General Public License v2.0
17 stars 2 forks source link

Fail to install on R 4.0.2 Windows #5

Closed oyvindbso closed 3 years ago

oyvindbso commented 3 years ago

I haven't been able to install the package. I have the same problem on two different computers running R 4.0.2 on Windows. Since I cannot upgrade to 4.0.3 I'm not able to check if that is the problem. As you can see below it seems to be a problem with the XML package being built under R 4.0.3.

devtools::install_github("morenomancosu/fbSim")
Downloading GitHub repo morenomancosu/fbSim@HEAD
√  checking for file 'C:\Users\oyvinbso\AppData\Local\Temp\RtmpygVASh\remotes18d8347e736b\morenomancosu-fbSim-c4cd576/DESCRIPTION' (339ms)
-  preparing 'fbSim':
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'fbSim_0.1-1.tar.gz'

Installing package into ‘P:/Packages’
(as ‘lib’ is unspecified)
* installing *source* package 'fbSim' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'XML' was built under R version 4.0.3
Execution halted
ERROR: lazy loading failed for package 'fbSim'
* removing 'P:/Packages/fbSim'
Error: Failed to install 'fbSim' from GitHub:
  (converted from warning) installation of package ‘C:/Users/oyvinbso/AppData/Local/Temp/RtmpygVASh/file18d850976720/fbSim_0.1-1.tar.gz’ had non-zero exit status
oyvindbso commented 3 years ago

Tried to replicate this on MacOS R 4.0.2, but it worked correctly. Not sure if this means that the problems above were caused by problems with my other computers.

oyvindbso commented 3 years ago

I've solved the problem by turning off the feature in remotes/devtools that turns warnings into errors:

Setting R_REMOTES_NO_ERRORS_FROM_WARNINGS="false" will cause warning messages during calls to install.packages() to become errors. Often warning messages are caused by dependencies failing to install.

See more here: https://github.com/r-lib/remotes#environment-variables

https://github.com/r-lib/remotes/issues/403