NNLM icon indicating copy to clipboard operation
NNLM copied to clipboard

clang error in macos Monterey (M1)

Open parkjooyoung99 opened this issue 2 years ago • 2 comments

Hello, I am using below code to install NNLM

library(devtools)
install_github('linxihui/NNLM')

and keep getting clang error below image

Does anyone have an idea to solve this problem??

Thank you!

parkjooyoung99 avatar Jan 05 '23 12:01 parkjooyoung99

I have the same problem and need help.

zhibisora avatar Mar 27 '23 08:03 zhibisora

Same question: devtools::install_github('linxihui/NNLM')

  • installing source package ‘NNLM’ ... ** using staged installation ** libs using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’ using SDK: ‘MacOSX13.3.sdk’ clang++ -arch arm64 -std=gnu++17 -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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppProgress/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++17 -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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppProgress/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c base_algorithms.cpp -o base_algorithms.o clang++ -arch arm64 -std=gnu++17 -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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppProgress/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c nnlm.cpp -o nnlm.o clang++ -arch arm64 -std=gnu++17 -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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppProgress/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c nnmf.cpp -o nnmf.o clang++ -arch arm64 -std=gnu++17 -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'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppProgress/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c update_with_missing.cpp -o update_with_missing.o clang++ -arch arm64 -std=gnu++17 -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 NNLM.so RcppExports.o base_algorithms.o nnlm.o nnmf.o update_with_missing.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: *** [NNLM.so] Error 1 ERROR: compilation failed for package ‘NNLM’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/NNLM’ Warning message: In i.p(...) : installation of package ‘/var/folders/8j/bb57c4r12px0dyr9phxq9jj40000gn/T//RtmpIx2ufg/filebea742a092e6/NNLM_0.4.4.tar.gz’ had non-zero exit status

christophechu avatar Jun 24 '23 17:06 christophechu