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

error installing via Rstudio #222

Open
spencerlong1 opened this issue Sep 28, 2022 · 1 comment
Open

error installing via Rstudio #222

spencerlong1 opened this issue Sep 28, 2022 · 1 comment

Comments

@spencerlong1
Copy link

spencerlong1 commented Sep 28, 2022

Hi,
I am having the current error when installing via R-studio on personal macbook (sorry if this is already covered somewhere else, but couldnt find it when searching):

library("devtools")
install_github("zdk123/SpiecEasi")
Downloading GitHub repo zdk123/SpiecEasi@HEAD
✔ checking for file ‘/private/var/folders/lj/w_2_h2hx29jcfj_0r46j1j0m0000gp/T/Rtmpgd9ImH/remotes195f53884e54/zdk123-SpiecEasi-c463727/DESCRIPTION’ ...
─ preparing ‘SpiecEasi’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘SpiecEasi/inst’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘SpiecEasi_1.1.2.tar.gz’

  • installing source package ‘SpiecEasi’ ...
    ** using staged installation
    ** libs
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c ADMM.cpp -o ADMM.o
    In file included from ADMM.cpp:1:
    In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
    In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25:
    In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/RcppCommon.h:30:
    In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/r/headers.h:62:
    In file included from /Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /Users/sdl1c18/opt/miniconda3/bin/../include/c++/v1/cmath:308:
    /Users/sdl1c18/opt/miniconda3/bin/../include/c++/v1/math.h:300:15: fatal error: 'math.h' file not found
    #include_next <math.h>
    ^~~~~~~~
    1 error generated.
    make: *** [/Library/Frameworks/R.framework/Resources/etc/Makeconf:175: ADMM.o] Error 1
    ERROR: compilation failed for package ‘SpiecEasi’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/SpiecEasi’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/lj/w_2_h2hx29jcfj_0r46j1j0m0000gp/T//Rtmpgd9ImH/file195f19ce97a4/SpiecEasi_1.1.2.tar.gz’ had non-zero exit status

Do you know what may solve this? is it an rcpp issue?

Thanks

@spencerlong1
Copy link
Author

spencerlong1 commented Sep 29, 2022

UPDATE ON THIS STEP: I HAVE SINCE RESOLVED ISSUE ON THIS SYSTEM AND INSTALLED- followed advice in this thread #217

Hi, to update this, on my work (more used) macbook I don't seem to get the above erroor. However, now when I try and install on R on this machine I get the following:

Downloading GitHub repo zdk123/SpiecEasi@HEAD
✔ checking for file ‘/private/var/folders/lj/w_2_h2hx29jcfj_0r46j1j0m0000gp/T/RtmpuY8PIr/remotes24f2948a28a/zdk123-SpiecEasi-c463727/DESCRIPTION’ ...
─ preparing ‘SpiecEasi’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘SpiecEasi/inst’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘SpiecEasi_1.1.2.tar.gz’

  • installing source package ‘SpiecEasi’ ...
    ** using staged installation
    ** libs
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c ADMM.cpp -o ADMM.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c matops.cpp -o matops.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c sqrtNewton.cpp -o sqrtNewton.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c svthresh.cpp -o svthresh.o
    clang++ -mmacosx-version-min=10.13 -std=gnu++11 -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 SpiecEasi.so ADMM.o RcppExports.o matops.o sqrtNewton.o svthresh.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
    ld: library not found for -lgfortran
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [SpiecEasi.so] Error 1
    ERROR: compilation failed for package ‘SpiecEasi’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/SpiecEasi’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/lj/w_2_h2hx29jcfj_0r46j1j0m0000gp/T//RtmpuY8PIr/file24f56fe74ad/SpiecEasi_1.1.2.tar.gz’ had non-zero exit status

This seem to be a gfortran issue, but is not something I am sure how to fix. Do you know how I would get round this? Admittedly I am not an expert on the gfortran side of things, so unsure where this unfound library may be or how I would resolve it. As far as I know, xcode is already installed and I have updated it in the terminal via softwareupdate --install -a , but this doesnt seem to help the issue?

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

No branches or pull requests

1 participant