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 on macOS Monterey 12.5 Intel based #217

Open
LilEigenValue opened this issue Aug 16, 2022 · 6 comments
Open

Error installing on macOS Monterey 12.5 Intel based #217

LilEigenValue opened this issue Aug 16, 2022 · 6 comments

Comments

@LilEigenValue
Copy link

Hello,

Ive been trying to install this package for a week. I installed a bunch of Fortran files and moved libraries but to no avail. Any help would be appreciated.

ibrary(devtools)
Loading required package: usethis

install_github("zdk123/SpiecEasi")
Downloading GitHub repo zdk123/SpiecEasi@HEAD
✔ checking for file ‘/private/var/folders/w7/h6vx0pj1107c1dkkv1q46jmw0000gn/T/RtmpFUwB7w/remotesd7b83baa7d28/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.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/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.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/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.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/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.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/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.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/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: malformed universal file: slice content is not mach-o or a static library file '/usr/local/lib/libgfortran.dylib'
    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.2/Resources/library/SpiecEasi’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/w7/h6vx0pj1107c1dkkv1q46jmw0000gn/T//RtmpFUwB7w/filed7b844487317/SpiecEasi_1.1.2.tar.gz’ had non-zero exit status
@zdk123
Copy link
Owner

zdk123 commented Aug 16, 2022

Thanks... Will test macOS install on 4.2...

@zdk123
Copy link
Owner

zdk123 commented Aug 26, 2022

working on Big-Sur with an M1 chip. It looks like the wrong compiler is getting used though. I'll have to dig into this some more. Maybe use the pre-compiled package via bioconda in the meantime?

@mljaniczek
Copy link

Hi! I was having this issue and tried a few things before finally was able to get SpiecEasy installed.
I did the following:

  1. Thought Xcode might need to be updated. Followed an answer from stackoverflow and put the following commands in the command line to update it:
    softwareupdate --list --verbose
    Then:
    softwareupdate -i Command\ Line\ Tools\ for\ Xcode-13.2

Restarted R, still didn't resolve.

  1. So then I used Kevin Ushey's answer from this stackoverflow question and added the following to the file ~/.R/Makevars:
    FLIBS=-L/opt/local/lib/gcc48/

  2. Restarted R, then was able to install SpiecEasi!

I'm not sure precisely what was going on but something about using gcc vs clang?

(I'm on macOS Big Sur 11.5.1 btw)

@azmigueldario
Copy link

The answer by @mljaniczek also worked for me. I could not find the Makevars file initially, so if it is not in your $HOME path, then just create it.

# check if it exists
ls $HOME/.R

# create folder
mkdir -p $HOME/.R

# save command into new file Makevars
echo "FLIBS=-L/opt/local/lib/gcc48/" > $HOME/.R/Makevars

@zdk123
Copy link
Owner

zdk123 commented Mar 29, 2023

Thanks for the answers all. I should put this in the README.

@finally-jay
Copy link

azmigueldario
Thank you very much, this answer works for me !

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

5 participants