Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RStudio and Travis CI build check do NOT match (libudunits2.so)

Travis CI detects and issue which is not found by the Build > Check in RStudio for my lares library (found in Github as laresbernardo/lares). My last "Passed" commit, according to Travis CI, was literally a typo change so the library's code should not be the problem; so, when I run devtools::check() for the library, I get the nice R CMD check succeeded message with 0 errors, warnings, or notes.

I've tried what the messages suggest and other stuff too:

  • Run brew install udunits in Terminal (macOS)
  • Install the library via CRAN with install.packages(units)
  • and via Github (dev) with devtools::install_github("r-quantities/units", args="--configure-args='--with-udunits2-lib=/usr/local/lib'")
  • and devtools::install_github("r-quantities/units", args="--configure-args='--with-udunits2-include=/usr/include/udunits2'")

This is the end of the Travis CI log, also found here: https://travis-ci.org/laresbernardo/lares

(...)
checking for ut_read_xml in -ludunits2... no
configure: error: in `/tmp/RtmpITNXhh/R.INSTALL3d3b9a0f951/units':
configure: error: 
--------------------------------------------------------------------------------
  Configuration failed because libudunits2.so was not found. Try installing:
    * deb: libudunits2-dev (Debian, Ubuntu, ...)
    * rpm: udunits2-devel (Fedora, EPEL, ...)
    * brew: udunits (OSX)
  If udunits2 is already installed in a non-standard location, use:
    --configure-args='--with-udunits2-lib=/usr/local/lib'
  if the library was not found, and/or:
    --configure-args='--with-udunits2-include=/usr/include/udunits2'
  if the header was not found, replacing paths with appropriate values.
  You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
--------------------------------------------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/home/travis/R/Library/units’
Error in i.p(...) : 
  (converted from warning) installation of package ‘units’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .
Your build has been stopped.

I am out of ideas. Is it a change in stringi or units libraries? Or a Travis CI issue? Or something in my library set differently?

like image 985
Bernardo Avatar asked Jan 26 '23 17:01

Bernardo


1 Answers

Solved adding the following to the .travis.yml file! Me must specify that this library needs to be installed.

addons:
  apt:
    packages:
      - libudunits2-dev

Thanks to Iñaki Ucar, developer of the units library, for the very useful answer.

like image 151
Bernardo Avatar answered Jan 31 '23 20:01

Bernardo