r-spatial / classInt

Choose Univariate Class Intervals

Home Page:https://r-spatial.github.io/classInt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

installation error

ds221 opened this issue · comments

commented

Hello

I am receiving the following error:

* installing *source* package ‘classInt’ ...
** package ‘classInt’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls  -fPIC  -O2  -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4  -c fish1.f -o fish1.o
f951: Warning: command-line option ‘-Wformat=1’ is valid for C/C++/ObjC/ObjC++ but not for Fortran

My OS is PCLinuxOS 2020, Kernel Version: 5.9.4-pclos1, OS Type: 64-bit

[dave@localhost ~]$ gfortran --version
GNU Fortran (PCLinuxOS 10.2.0-2pclos2020) 10.2.0

Thanks
Dave

I do not know what PCLinuxOS. I run Fedora 32 (soon to be 33 when I upgrade), and see:

$ gfortran --version
GNU Fortran (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6)

How was R installed - from source? The flags I see when I run that step are:

gfortran -fno-optimize-sibling-calls  -fpic  -g -O2  -c fish1.f -o fish1.o

Your flags were generated by your installed R, which suggests that you installed an RPM that mis-set a lot of flags which may actually not work on your platform.

Trying with the Fedora R RPM I see:

gfortran -m64 -fno-optimize-sibling-calls  -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection --no-optimize-sibling-calls  -c fish1.f -o fish1.o
f951: Warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid for Fortran

Note that this is only a warning, and R CMD check passes, and installation is not prevented by the warning.

So youu need to raise this with the R RPM packager, not here. If there was a problem with the package, it would fail CRAN checks, which it does not: https://cran.r-project.org/web/checks/check_results_classInt.html . Post a question on an appropriate R list for the source of your R package.

commented

Thank you for your answer. I installed R from the distro's repository so will enquire there.