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 in installing packages #253

Open
jlche opened this issue Jan 18, 2024 · 3 comments
Open

Error in installing packages #253

jlche opened this issue Jan 18, 2024 · 3 comments

Comments

@jlche
Copy link

jlche commented Jan 18, 2024

Hi,
I am trying to install the package on my laptop (macOS Monterey 12.7.2) using the RStudio (Version 2023.12.0), but it failed to visit and download via the routine as shown below. May I try the other way or do you know how to solve this error? Thanks a lot.

install_github("zdk123/SpiecEasi")
Downloading GitHub repo zdk123/SpiecEasi@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/57/435jclf55xx08_k5bhcr6j940000gn/T/RtmpHLktoK/remotes370e29da7798/zdk123-SpiecEasi-5f396da/DESCRIPTION’ (355ms)
─ 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.3.tar.gz’

  • installing source package ‘SpiecEasi’ ...
    ** using staged installation
    ** libs
    using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
    using C++11
    using SDK: ‘MacOSX13.1.sdk’
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c ADMM.cpp -o ADMM.o
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c matops.cpp -o matops.o
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c sqrtNewton.cpp -o sqrtNewton.o
    clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c svthresh.cpp -o svthresh.o
    clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/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/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: directory not found for option '-L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0'
    ld: warning: directory not found for option '-L/opt/gfortran/lib'
    ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin20/12.2.0'
    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.3-x86_64/Resources/library/SpiecEasi’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/57/435jclf55xx08_k5bhcr6j940000gn/T//RtmpHLktoK/file370e45e1b19f/SpiecEasi_1.1.3.tar.gz’ had non-zero exit status
@JiatingH
Copy link

JiatingH commented Feb 1, 2024

It works for me in #217 (comment)

@jlche
Copy link
Author

jlche commented Feb 2, 2024

It has been solved.
create folder name .R ; then create subfolder name it with Makevars,
input below code into Makevars:
FC = /usr/local/gcc/bin/gfortran
E77 = /usr/local/opt/gcc/bin/gfortran
FLIBS = -L/usr/local/opt/gcc/lib

@jlche
Copy link
Author

jlche commented Feb 2, 2024 via email

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

2 participants