Fix package installation issue for lisi package for macOS#13
Open
mengxu98 wants to merge 1 commit intoimmunogenomics:masterfrom
Open
Fix package installation issue for lisi package for macOS#13mengxu98 wants to merge 1 commit intoimmunogenomics:masterfrom
mengxu98 wants to merge 1 commit intoimmunogenomics:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When installing the lisi package using
pak::pakon Macbook (Apple Silicon M3), the following error occurs due to missing libraries (Devtools::install_githubprompts the same error):→ Will update 1 package.
→ The package (0 B) is cached.
? Do you want to continue (Y/n) y
ℹ No downloads are needed, 1 pkg is cached
ℹ Building lisi 1.0
✖ Failed to build lisi 1.0 (2.7s)
Error:
! error in pak subprocess
Caused by error in
stop_task_build(state, worker):! Failed to build source package lisi.
Full installation output:
** this is package ‘lisi’ version ‘1.0’
staged installation is only possible with locking
** using non-staged installation
** libs
using C++ compiler: ‘Apple clang version 17.0.0 (clang-1700.0.13.3)’
using C++11
using SDK: ‘’
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -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.5-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/RcppArmadillo/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c utils.cpp -o utils.o
clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o lisi.so RcppExports.o utils.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/14.2.0 -L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R
ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0' not found
ld: library 'emutls_w' not found
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lisi.so] Error 1
ERROR: compilation failed for package ‘lisi’
Type .Last.error to see the more details.
To fix this issue, I commented out the line
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)in the Makevars file.With this modification, the lisi package installs successfully on Apple Silicon:
ℹ No downloads are needed
✔ 1 pkg + 2 deps: kept 3 [1.6s]