LAPKB / Pmetrics

https://lapkb.github.io/Pmetrics/
21 stars 8 forks source link

Installation problem: namespace error #197

Closed justbennet closed 7 months ago

justbennet commented 8 months ago

I have an RHEL 7.9 machine with R/4.3.2, GCC 10.5.0. I installed devtools and all its dependencies. These are all installed into my home directory, default ~/R/x86_64-pc-linux-gnu-library/4.3 library path.

I have no saved .RData file.

I start R and then I run devtools::install_github('LAPKB/Pmetrics') and it produces a number of messages that the namespace 'Pmetrics' is not available and the installation does not succeed. I also have no idea about the missing uid/gid message.

Any thoughts as to what might be going on here and how to fix it so Pmetrics installs?

Transcript:

$ R

R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
. . . .
> devtools::install_github("LAPKB/Pmetrics")
Downloading GitHub repo LAPKB/Pmetrics@HEAD
── R CMD build ─────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpXiiqZf/remotes3e4d512208a0/LAPKB-Pmetrics-123b264/DESCRIPTION’ (429ms)
─  preparing ‘Pmetrics’: (785ms)
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts (1s)
─  checking for empty or unneeded directories
   Removed empty directory ‘Pmetrics/inst/Examples/Runs’
─  building ‘Pmetrics_2.1.1.tar.gz’
   Warning: invalid uid value replaced by that for user 'nobody'
   Warning: invalid gid value replaced by that for user 'nobody'

Installing package into ‘/gpfs1/home/b/f/bfauber/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
* installing *source* package ‘Pmetrics’ ...
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 10.5.0’
g++ -std=gnu++17 -I"/gpfs1/sw/x86_64/rh7/pkgs/stacks/gcc/10.5.0/R/4.3.2/lib64/R/include" -DNDEBUG   -O3 -mtune=native    -fpic  -g -O2  -c knn.cpp -o knn.o
g++ -std=gnu++17 -I"/gpfs1/sw/x86_64/rh7/pkgs/stacks/gcc/10.5.0/R/4.3.2/lib64/R/include" -DNDEBUG   -O3 -mtune=native    -fpic  -g -O2  -c registerDynamicSymbol.cpp -o registerDynamicSymbol.o
g++ -std=gnu++17 -shared -L/gpfs1/sw/x86_64/rh7/pkgs/stacks/gcc/10.5.0/R/4.3.2/lib64/R/lib -L/usr/lib -L/usr/lib64 -o Pmetrics.so knn.o registerDynamicSymbol.o -L/gpfs1/sw/x86_64/rh7/pkgs/stacks/gcc/10.5.0/R/4.3.2/lib64/R/lib -lR
installing to /gpfs1/home/b/f/bfauber/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-Pmetrics/00new/Pmetrics/libs
** R
** data
*** moving datasets to lazyload DB
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘ITex’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘ITex’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘NPex’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘NPex’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘NPex_val’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘NPex_val’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘badData’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘badData’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘dataEx’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘dataEx’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘modEx’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘modEx’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘modelLibrary’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘modelLibrary’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘simEx’
Warning: namespace ‘Pmetrics’ is not available and has been replaced
by .GlobalEnv when processing object ‘simEx’
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘DT’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘Pmetrics’
* removing ‘/gpfs1/home/b/f/bfauber/R/x86_64-pc-linux-gnu-library/4.3/Pmetrics’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpXiiqZf/file3e4d7caa629b/Pmetrics_2.1.1.tar.gz’ had non-zero exit status
mhovd commented 8 months ago

Hi @justbennet! Sorry about this issue, installing Pmetric should be as easy as pie. This source of this error is highlighted here

 there is no package called ‘DT’

To fix it, please manually install the DT package using

 install.packages("DT")

Please make sure to reach out if this doesn't solve your issue.

justbennet commented 8 months ago

That did solve the problem. Sorry, I should have caught that. Got lost in the sea of namespace messages and missed the informative one. Mea culpa, and thank you very much.

mhovd commented 8 months ago

That did solve the problem. Sorry, I should have caught that. Got lost in the sea of namespace messages and missed the informative one. Mea culpa, and thank you very much.

Dont worry about it, we appreciate anyone taking the effort to post their issues, so we can make Pmetrics better :)

justbennet commented 7 months ago

I had to reinstall, and this time, the library 'patchwork' was not installed. Just thought I would let you know in case there is a list of dependencies that can be updated. At least this time I knew where to look to find the name of the missing package.

Please feel free to close the issue again.

mnneely commented 7 months ago

Sorry about this. These are dependencies of dependencies, not actually ones we directly include. I don't know why sometimes R chokes and doesn't install them all. We list all the packages Pmetrics depends on directly so that they also get installed when Pmetrics is installed, but sometimes R doesn't behave the way it should!