-
Notifications
You must be signed in to change notification settings - Fork 17
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
Cannot install package on Mac #12
Comments
I have reinstalled gfortran, deleted and reinstalled xcode-build tool, edited and rebuilt the Makevars file (I may have made a mistake here). But I still get the same error. I would be very happy if someone could help. Thank you! My machine info: |
Here is my solution:
In terminal, type
Note: /opt/homebrew/lib/gcc is the location of the gcc installed by homebrew, do |
This approach can be applied to various R packages that require compilation for M-chip MacBooks. Thank you for providing such a valuable solution! |
I'm trying to install SPARK on Mac but getting the following error
R version: 4.3.1
MacOC: M1 Pro
Downloading GitHub repo xzhoulab/SPARK@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/vy/r4cjr09n25j20vl1tfz6_glc0000gq/T/RtmpVBFa4H/remotesd7bb8837a4e/xzhoulab-SPARK-a8b4bf2/DESCRIPTION’ ...
─ preparing ‘SPARK’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ installing the package to process help pages
-----------------------------------
─ installing source package ‘SPARK’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
using C++11
using SDK: ‘MacOSX13.3.sdk’
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -DARMA_64BIT_WORD=1 -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -DARMA_64BIT_WORD=1 -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c rcpparma_hello_world.cpp -o rcpparma_hello_world.o
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -DARMA_64BIT_WORD=1 -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c spark_float.cpp -o spark_float.o
clang++ -arch arm64 -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/opt/R/arm64/lib -o SPARK.so RcppExports.o rcpparma_hello_world.o spark_float.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0'
ld: warning: directory not found for option '-L/opt/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [SPARK.so] Error 1
ERROR: compilation failed for package ‘SPARK’
─ removing ‘/private/var/folders/vy/r4cjr09n25j20vl1tfz6_glc0000gq/T/RtmpLNv8Gq/Rinstd83d752bd7fe/SPARK’
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'SPARK' from GitHub:
! System command 'R' failed
The text was updated successfully, but these errors were encountered: