r-spatial / classInt

Choose Univariate Class Intervals
https://r-spatial.github.io/classInt/
33 stars 8 forks source link

Issues installing from source #4

Closed chris-prener closed 5 years ago

chris-prener commented 5 years ago

Since the update was posted to CRAN yesterday, my Appveyor builds are failing when Appveyor tries to install classInt from source. An example of this can be found here.

The relevant section has the following:

There is a binary version available but the source version is later:
              binary source needs_compilation
classInt  0.2-3  0.3-1              TRUE

installing the source package 'classInt'

trying URL 'https://cran.rstudio.com/src/contrib/classInt_0.3-1.tar.gz'
Content type 'application/x-gzip' length 17320 bytes (16 KB)
==================================================
downloaded 16 KB

* installing *source* package 'classInt' ...
** package 'classInt' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
c:/Rtools/mingw_32/bin/gfortran      -O3  -mtune=generic -c fish1.f -o fish1.o
make: c:/Rtools/mingw_32/bin/gfortran: Command not found
make: *** [fish1.o] Error 127
ERROR: compilation failed for package 'classInt'
* removing 'c:/RLibrary/classInt'
* restoring previous 'c:/RLibrary/classInt'
Error in i.p(...) : 
 (converted from warning) installation of package 'classInt' had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
Command exited with code 1

This happens on all versions of Windows and also happened locally on my macOS machine when I tried to build from source.

Thanks for checking in on this and maintaining this package - I really appreciate it!

edzer commented 5 years ago

Your appveyor is apparently not equipped to build from source (no gfortran available) - it should then fall back to installing the binary version on CRAN (0.2-3) or wait a few days until the binary version of the released classInt appears.

angela-li commented 5 years ago

I ran into a similar error when I was trying to work on spdep earlier - I think the problem was not having gfortran installed on my local computer. Downloading the most recent version of GNU Fortran from the R development tools page fixed my problems!

screen shot 2018-12-18 at 12 52 10 pm

rsbivand commented 5 years ago

Thanks @edzer and @angela-li for your help!

chris-prener commented 5 years ago

Thanks for the help @edzer and @angela-li - here is the Appveyor solution in case anyone finds their way here via Google:

environment:
  global:
    WARNINGS_ARE_ERRORS: 1
    USE_RTOOLS: true

Builds are working again!

rsbivand commented 5 years ago

@edzer : should I set up Appveyor for classInt? If so, how?

edzer commented 5 years ago

What for? I don't see any potential windows-specific issues in it.

rsbivand commented 5 years ago

OK, thanks, I'll leave it.