rse-standrewscs / distance-binder-demo

0 stars 0 forks source link

Can't install dssd #1

Open olexandr-konovalov opened 3 years ago

olexandr-konovalov commented 3 years ago

I am able to run GettingStarted-distill.ipynb which is based on the example by @LHMarshall from https://examples.distancesampling.org/dssd-getting-started/GettingStarted-distill.html locally, but I can't install in on Binder:

ERROR: dependency ‘units’ is not available for package ‘sf’
* removing ‘/srv/rlibs/sf’
ERROR: dependencies ‘sf’, ‘rgdal’ are not available for package ‘dssd’
* removing ‘/srv/rlibs/dssd’

The downloaded source packages are in
        ‘/tmp/Rtmp37knOV/downloaded_packages’
Warning messages:
1: In install.packages("dssd") :
  installation of package ‘units’ had non-zero exit status
2: In install.packages("dssd") :
  installation of package ‘rgdal’ had non-zero exit status
3: In install.packages("dssd") :
  installation of package ‘sf’ had non-zero exit status
4: In install.packages("dssd") :
  installation of package ‘dssd’ had non-zero exit status

Installing units fails with

  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.

and installing gdal fails with

checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.

@LHMarshall have you seen such problem before? On my machine, I had a fresh install of R yesterday, the same version which is used on Binder, and it runs perfectly fine.

olexandr-konovalov commented 3 years ago

P.S. At the moment, I've removed dssd from install.R, to speed up the build, as it does not work anyway.

olexandr-konovalov commented 3 years ago

This is the full build log from mybinder.org: binder_dssd.txt

olexandr-konovalov commented 3 years ago

My understanding now is that a better way would be to use a docker container for R (apparently one of https://github.com/rocker-org?), and that will allow to run additional shell commands to install dependencies), and also will substantially speed up the time needed for the build. This (use of Docker) is actually similar to what we do for GAP in https://github.com/rse-standrewscs/gap-binder-template.