lmrodriguezr / nonpareil

Estimate metagenomic coverage and sequence diversity
http://enve-omics.ce.gatech.edu/nonpareil/
Other
42 stars 11 forks source link

Installation fails with R #22

Closed shaman-narayanasamy closed 6 years ago

shaman-narayanasamy commented 6 years ago

Dear authors/developers,

I am attempting to install nonpareil on my cluster environment. Therefore, I do not have any root access.

However, I keep failing on the R package getting a "Permission denied" error, despite the R package install path belonging to me.

$ make prefix=/mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil R=/mnt/nfs/projects/ecosystem_biology/local_tools/R-ESB install
if [ ! -d /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/bin ] ; then mkdir -p /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/bin ; fi
if [ ! -d /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/man/man1 ] ; then mkdir -p /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/man/man1 ; fi
if [ -e nonpareil ] ; then install -m 0755 nonpareil /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/bin/ ; fi
if [ -e nonpareil-mpi ] ; then install -m 0755 nonpareil-mpi /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/bin/ ; fi
cp docs/_build/man/nonpareil.1 /mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil/man/man1/nonpareil.1
/mnt/nfs/projects/ecosystem_biology/local_tools/R-ESB CMD INSTALL utils/Nonpareil
make: execvp: /mnt/nfs/projects/ecosystem_biology/local_tools/R-ESB: Permission denied
Makefile:44: recipe for target 'install' failed
make: *** [install] Error 127

I attempted the same by giving my $HOME/R as the path with the same outcome.

To further check, I also tried installing the packages outside make install like so:

$ R CMD INSTALL -l /mnt/nfs/projects/ecosystem_biology/local_tools/R-ESB utils/Nonpareil
* installing *source* package ‘Nonpareil’ ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (Nonpareil)

Despite the packages already installed, make install still attempts to install R.

Any idea why this is happening and if there is a fix for it?

I look forward to your reply.

Best regards, Shaman

lmrodriguezr commented 6 years ago

Hello @shaman-narayanasamy , The R package installation is the last step of make install, so you have successfully installed it by manually running the R CMD INSTALL.

However, if you want make to succeed (e.g., if you're automating the installation and want to check exit code, or if you just like clean runs) the way to control the R library is by passing the R library variable. The R variable you're passing to make install is not the library folder, but the actual R command or the path to the binary. In your case, you can run it like this:

make install \
  R_LIBS_USER=/mnt/nfs/projects/ecosystem_biology/local_tools/R-ESB \
  prefix=/mnt/nfs/projects/ecosystem_biology/local_tools/nonpareil

Please feel free to reopen if it fails.