Open serbinsh opened 4 years ago
Oh also I noticed make no longer shows where the packages are installing to. That was a handy feature to be sure it was using the correct R/library path
And also based on the debug suggestion by @infotroph
10-4-27-175:pecan sserbin$ Rscript -e '.libPaths()'
[1] "/Users/sserbin/R/library"
[2] "/Library/Frameworks/R.framework/Versions/4.0/Resources/library"
So i think its looking in the right place
Only new library installed recently is libglpk-dev
. Can you install tmvtnorm
in Rstudio?
Also looks like you are using R version 4.0, so not sure all dependencies are ready for that (it should since I think travis has been building with that).
Probably related to a package dependency
> library(tmvtnorm)
Loading required package: mvtnorm
Loading required package: Matrix
Loading required package: stats4
Loading required package: gmm
Loading required package: sandwich
Error: package or namespace load failed for 'gmm' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/sserbin/R/library/gmm/libs/gmm.so':
dlopen(/Users/sserbin/R/library/gmm/libs/gmm.so, 6): Library not loaded: /usr/local/gfortran/lib/libgomp.1.dylib
Referenced from: /Users/sserbin/R/library/gmm/libs/gmm.so
Reason: image not found
Error: package 'gmm' could not be loaded
>
But after install gmm I still have issues
> library(gmm)
Loading required package: sandwich
Error: package or namespace load failed for ‘gmm’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/sserbin/R/library/gmm/libs/gmm.so':
dlopen(/Users/sserbin/R/library/gmm/libs/gmm.so, 6): Library not loaded: /usr/local/gfortran/lib/libgomp.1.dylib
Referenced from: /Users/sserbin/R/library/gmm/libs/gmm.so
Reason: image not found
Since you started with a new version of R, did you remove all existing files from /Users/sserbin/R/library
? Did you update gfortran as well? What does ls - /usr/local/gfortran/lib/libgomp*
return?
I ran update.packages. I have not updated gfortran from last install. Nothing in the lib folder it is referencing...hmm
Others have had this issue as well but need to find a solution: https://community.rstudio.com/t/loading-gmm-package-on-macosx/63594
Tried from source
> install.packages("gmm_1.6-4.tar.gz", repo = NULL, type = "source")
Installing package into ‘/Users/sserbin/R/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘gmm’ ...
** package ‘gmm’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c lambda_met.f -o lambda_met.o
gcc-9 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -mtune=native -g -O2 -Wall -pedantic -Wconversion -c src.c -o src.o
gcc-9 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o gmm.so lambda_met.o src.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/Cellar/gcc/9.2.0/lib/gcc/9 -lgomp -L/usr/local/Cellar/gcc/9.2.0/lib/gcc/9 -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/sserbin/R/library/00LOCK-gmm/00new/gmm/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gmm)
>
> library(gmm)
Loading required package: sandwich
>
> library(tmvtnorm)
Loading required package: mvtnorm
Loading required package: Matrix
Loading required package: stats4
>
A mew one
./scripts/time.sh " modules/data.atmosphere" Rscript -e "devtools::document('"modules/data.atmosphere"')"
Updating PEcAn.data.atmosphere documentation
Updating roxygen version in /Users/sserbin/Data/GitHub/pecan/modules/data.atmosphere/DESCRIPTION
Loading PEcAn.data.atmosphere
Registered S3 method overwritten by 'hoardr':
method from
print.cache_info httr
Error: Dependency package(s) 'nneo' not available.
Backtrace:
█
1. └─devtools::document("modules/data.atmosphere")
2. ├─withr::with_envvar(...)
3. │ └─base::force(code)
4. └─roxygen2::roxygenise(pkg$path, roclets, load_code = load_code)
5. └─roxygen2:::load_code(base_path)
6. └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
7. └─pkgload:::load_imports(path)
8. └─pkgload:::abort_for_missing_packages(res, imports$package)
In addition: Warning message:
In (function (dep_name, dep_ver = "*") :
Dependency package 'nneo' not available.
Execution halted
make: *** [.doc/modules/data.atmosphere] Error 1
10-4-26-86:pecan sserbin$ R
> install.packages('nneo')
Installing package into ‘/Users/sserbin/R/library’
(as ‘lib’ is unspecified)
Warning message:
package ‘nneo’ is not available (for R version 4.0.0)
>
So nneo is archived, am I missing something or is this still needed for pecan.atmosphere? This is the NEON package yes?
We should drop that package and switch to the newer neonUtilities package
> devtools::install_github("ropenscilabs/nneo")
Skipping install of 'nneo' from a github remote, the SHA1 (37bb3d2d) has not changed since last install.
Use `force = TRUE` to force installation
> devtools::install_github("ropenscilabs/nneo", force = TRUE)
Downloading GitHub repo ropenscilabs/nneo@master
OK thanks @mdietze
See https://github.com/PecanProject/pecan/issues/2206 for more on nneo
vs neonUtilities
Build finished once I sorted out all of these issues.
Hi - I still have an error when loading gmm
after installing from source - do you have any tips? Thank you!!
I ended up having to update my OS to Big Sur so that I could download Xcode and installed gfortran from this source https://github.com/fxcoudert/gfortran-for-macOS/releases - problem solved!
Bug Description
As discussed on Slack, I am suddenly struggling to get make to build PEcAn on my Mac OSX desktop. I have been successfully building on this machine for a few years now, this is a new problem. Idid recently update to R v4.0, which has caused other headaches, so maybe that is related? Basically here is the issue:
Running make at cmd
Results in
I have installed that package. Also I can successfully do this in R studio
Both are pointing to the same R library??
To Reproduce
make install
Expected behavior
PEcAn builds
Screenshots
NA
Machine (please complete the following information):
Additional context
Add any other context about the problem here.