Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install because of norm package #294

Closed
jpark-ehc opened this issue Dec 17, 2021 · 3 comments
Closed

Unable to install because of norm package #294

jpark-ehc opened this issue Dec 17, 2021 · 3 comments
Labels

Comments

@jpark-ehc
Copy link


Naniar has norm as an import and I'm unable to install the source. Now, I can install gfortran, it's not a big deal. I wanted to write up this issue since I couldn't find anything in the norm documentation about gfortran or in this package readme. It may be worth considering changing norm from import to suggests but I'm not sure if that's possible without breaking something. Looking at the norm package, it was last published in 2013.

install.packages("naniar")

===== Output ====

Installing package into ‘/home/joshuapark/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependency ‘norm’

trying URL 'https://cloud.r-project.org/src/contrib/norm_1.0-9.5.tar.gz'
Content type 'application/x-gzip' length 18173 bytes (17 KB)
==================================================
downloaded 17 KB

trying URL 'https://cloud.r-project.org/src/contrib/naniar_0.6.1.tar.gz'
Content type 'application/x-gzip' length 2781177 bytes (2.7 MB)
==================================================
downloaded 2.7 MB

* installing *source* package ‘norm’ ...
** package ‘norm’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -ffile-prefix-map=/build/r-base-crNhFx/r-base-4.1.2=. -flto=auto -ffat-lto-objects -fstack-protector-strong  -c norm.f -o norm.o
/bin/bash: line 1: gfortran: command not found
make: *** [/usr/lib/R/etc/Makeconf:191: norm.o] Error 127
ERROR: compilation failed for package ‘norm’
* removing ‘/home/joshuapark/R/x86_64-pc-linux-gnu-library/4.1/norm’
ERROR: dependency ‘norm’ is not available for package ‘naniar’
* removing ‘/home/joshuapark/R/x86_64-pc-linux-gnu-library/4.1/naniar’
@njtierney
Copy link
Owner

Hi @jpark-ehc !

Thanks for posting this issue

We need the norm package for the mcar_test function.

One solution could be to move norm to Suggests and then suggest it is installed when using the software, but I would prefer to avoid that if I could.

Can I ask what operating system you are using, and if you have encountered this with other packages that require Fortran?

@jpark-ehc
Copy link
Author

jpark-ehc commented Dec 20, 2021

I'm using Ubuntu Linux on Pop-Os

R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Pop!_OS 21.10

My solution to this issue was to run sudo apt-get install r-base-dev. This installs the correct version of gfortran so that I could install norm. Attempts to just install gfortran with sudo apt-get install gfortran-$version didn't seem to work.

I haven't had any other issues with this before because I don't believe I've had to install or use any packages that required fortran.

@njtierney
Copy link
Owner

Thanks for documenting this, I'm not sure if there's much I can do on my end here with norm and implementing the functions from that package locally would be out of scope for the time being

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants