Skip to content

Comments

Fix package installation issue for lisi package for macOS#13

Open
mengxu98 wants to merge 1 commit intoimmunogenomics:masterfrom
mengxu98:master
Open

Fix package installation issue for lisi package for macOS#13
mengxu98 wants to merge 1 commit intoimmunogenomics:masterfrom
mengxu98:master

Conversation

@mengxu98
Copy link

When installing the lisi package using pak::pak on Macbook (Apple Silicon M3), the following error occurs due to missing libraries (Devtools::install_github prompts the same error):

pak::pak('immunogenomics/lisi')
✔ Loading metadata database ... done

→ Will update 1 package.
→ The package (0 B) is cached.

  • lisi 1.0 → 1.0 👷🏿‍♀️🔧 (GitHub: a917556)
    ? 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:
  • installing source package ‘lisi’ ...
    ** 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’
  • removing ‘/private/var/folders/rv/3jnfbs0d6r7d0c5bfj7ft5k00000gn/T/RtmpsDMvkh/pkg-lib5df16f54a7a5/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:

pak::pak('mengxu98/lisi')

ℹ No downloads are needed
✔ 1 pkg + 2 deps: kept 3 [1.6s]

library(lisi)

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

Successfully merging this pull request may close these issues.

1 participant