YMa-lab / CARD

GNU General Public License v3.0
94 stars 21 forks source link

install error #4

Closed gancao closed 2 years ago

gancao commented 2 years ago

windows 10 collect2.exe: error: ld returned 1 exit status

katimbach commented 2 years ago

I am having a similar error on OpenSUSE Leap 15.2.

When I try to install, I get the following error:

   installing to /tmp/RtmpmTS2IN/Rinst1b983b3a5014/00LOCK-CARD/00new/CARD/libs
   ** R
   ** data
   ** byte-compile and prepare package for lazy loading
   Warning: replacing previous import ‘RcppML::nmf’ by ‘NMF::nmf’ when loading ‘CARD’
   ** help
   *** installing help indices
   ** building package indices
   ** installing vignettes
   ** testing if installed package can be loaded from temporary location
   Warning: replacing previous import ‘RcppML::nmf’ by ‘NMF::nmf’ when loading ‘CARD’
   Error: package or namespace load failed for ‘CARD’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/tmp/RtmpmTS2IN/Rinst1b983b3a5014/00LOCK-CARD/00new/CARD/libs/CARD.so':
     /tmp/RtmpmTS2IN/Rinst1b983b3a5014/00LOCK-CARD/00new/CARD/libs/CARD.so: undefined symbol: sdot_
   Error: loading failed
   Execution halted
   ERROR: loading failed
─  removing ‘/tmp/RtmpmTS2IN/Rinst1b983b3a5014/CARD’
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'CARD' from GitHub:
  System command 'R' failed, exit status: 1, stdout & stderr were printed
rockdeme commented 2 years ago

Same issue on Win 10

  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed

Fresh system, clean 4.1.3 R with 4.0 Rtools

Detailed error:

-  preparing 'CARD': (415ms)
v  checking DESCRIPTION meta-information ...
-  cleaning src
-  installing the package to process help pages
         -----------------------------------
-  installing *source* package 'CARD' ...
   ** using staged installation
   ** libs
   "C:/R/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/R/R-41~1.3/include" -DNDEBUG  -I'C:/R/R-4.1.3/library/Rcpp/include' -I'C:/R/R-4.1.3/library/RcppArmadillo/include'     -fopenmp    -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c CARDfree.cpp -o CARDfree.o
   "C:/R/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/R/R-41~1.3/include" -DNDEBUG  -I'C:/R/R-4.1.3/library/Rcpp/include' -I'C:/R/R-4.1.3/library/RcppArmadillo/include'     -fopenmp    -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c CARDref.cpp -o CARDref.o
   "C:/R/rtools40/mingw64/bin/"g++  -std=gnu++11 -I"C:/R/R-41~1.3/include" -DNDEBUG  -I'C:/R/R-4.1.3/library/Rcpp/include' -I'C:/R/R-4.1.3/library/RcppArmadillo/include'     -fopenmp    -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
   C:/R/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o CARD.dll tmp.def CARDfree.o CARDref.o RcppExports.o -fopenmp -LC:/R/R-41~1.3/bin/x64 -lRlapack -LC:/R/R-41~1.3/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/R/R-41~1.3/bin/x64 -lR
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text+0x19ac): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text+0x327f): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma6op_dot10direct_dotIfEENS_14arma_real_onlyIT_E6resultEjPKS3_S7_[_ZN4arma6op_dot10direct_dotIfEENS_14arma_real_onlyIT_E6resultEjPKS3_S7_]+0x93): undefined reference to `sdot_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x16d): undefined reference to `sgemm_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x266): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x33d): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x185): undefined reference to `sgemm_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x2ad): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x39c): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb1ELb0ELb0ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x47f): undefined reference to `ssyrk_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x176): undefined reference to `sgemm_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x273): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIfLb0ELb0ELb1ENS_3MatIfEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x33b): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x186): undefined reference to `sgemm_'
C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3Co   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x33f): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x40c): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb0ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x61f): undefined reference to `ssyrk_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x192): undefined reference to `sgemm_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x44d): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x51a): undefined reference to `sgemv_'
C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.te   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDfree.o:CARDfree.cpp:(.text$_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_[_ZN4arma10glue_times5applyIfLb0ELb1ELb1ENS_3ColIfEES3_EEvRNS_3MatIT_EERKT3_RKT4_S5_]+0x732): undefined reference to `ssyrk_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDref.o:CARDref.cpp:(.text+0x19bc): undefined reference to `sgemv_'
   C:/R/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CARDref.o:CARDref.cpp:(.text+0x301f): undefined reference to `sgemv_'
   collect2.exe: error: ld returned 1 exit status
   no DLL was created
   ERROR: compilation failed for package 'CARD'
-  removing 'C:/Users/DEMETE~1/AppData/Local/Temp/Rtmp0YHyeI/Rinst3b1428f460cf/CARD'
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'CARD' from GitHub:
  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed
Yifeng101 commented 2 years ago

error: System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed

How to resolve this problem?

YingMa0107 commented 2 years ago

Hi @gancao @katimbach @Yifeng101 @rockdeme,

Thank you all for your interests in our package! Currently, I failed to reproduce your errors. But based on your output (Thank you for providing the detailed output!), the installation errors might be due to the LAPACK/BLAS library linked by R (or these two libraries are missed) in your Windows 10 System or CentOS system. Specificically, there are no function sdot, `ssyrk', etc that can be applied in R.

You can check by the following. For example, when I type sessionInfo() in R, it will output the following:

sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

If you type sessionInfo() in R, and there are no openblas/libblas.so.3 or libopenblasp-r0.2.20.so, it might cause the problem. In short, these two libraries are for optimized matrix calculations in Rcpp. Details of these two libraries are: https://icl.cs.utk.edu/lapack-for-windows/lapack/ and https://www.openblas.net

I'm currently working on a version that does not depend on those functions in BLAS/LAPCAK library for a wider availability of the package. I will update it soon.

rockdeme commented 2 years ago

Hi @YingMa0107! Thanks for your feedback, I can confirm that this is indeed the case.

> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

I might try installing Microsoft R open (https://csantill.github.io/RPerformanceWBLAS/) or just install it under linux in wsl2.

EDIT: succesfully installed and imported on Ubuntu 20.04 via wsl2 in case anyone would be okay with that option until the issue is solved.

katimbach commented 2 years ago

Hi @YingMa0107, Thank you for your response/insight!

When I run sessionInfo() I get the following:

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2

Matrix products: default
BLAS:   /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so

But I still experienced the error above. A quick search shows my system also has BLAS and LAPACK available on the device (independently from R):

(base) bscuser@localhost:~> /usr/sbin/update-alternatives --config libblas.so.3
There is only one alternative in link group libblas.so.3 (providing /usr/lib64/libblas.so.3): /usr/lib64/libopenblas_pthreads.so.0
Nothing to configure.
(base) bscuser@localhost:~> /usr/sbin/update-alternatives --config liblapack.so.3
There is only one alternative in link group liblapack.so.3 (providing /usr/lib64/liblapack.so.3): /usr/lib64/libopenblas_pthreads.so.0
Nothing to configure.

But the same issue as above still persists. Any idea what might be causing this?

YingMa0107 commented 2 years ago

Hi @katimbach,

Thank you for those details. Currently I don't have a openSUSE system available. I presume that those two BLAS/LAPACK libraries on your system might not have sdot_ function. A quick way to check is, for example in my case, when I type:

nm -D /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3 | grep " sdot_"
### It will show the following output
000000000001d5e0 T sdot_

So in your case, you can check

nm -D /usr/lib64/R/lib/libRblas.so | grep " sdot_"

I guess it will output nothing, so that's why you have that error based on your previous output. I'm currently working on the version that requires no " sdot_" or other functions required by the blas library.

katimbach commented 2 years ago

Hi @YingMa0107,

Thank you so much for this information. You are exactly right- this is the root of the issue. I am similarly unable to install your package in my HPC because BLAS/LAPACK are linked as the libraries libRblas.so and libRlapack.so, which don't have the function "sdot_". I will wait until a newer version is released to install this!

utkarsh0493 commented 2 years ago

Hello @YingMa0107 you did a great job in developing this package !!

I tried installing the package and I am getting error in installation. I am using Mac with M1 chip and macOS Monterey (12.3.1). The error message and the session info can be found below. Thank you in advance for your help.

_ 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.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c CARDfree.cpp -o CARDfree.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.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c CARDref.cpp -o CARDref.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.1/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.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 CARD.so CARDfree.o CARDref.o RcppExports.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: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' ld: warning: directory not found for option '-L/usr/local/gfortran/lib' ld: library not found for -lquadmath clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [CARD.so] Error 1 ERROR: compilation failed for package ‘CARD’ ─ removing ‘/private/var/folders/16/2qzgz8cd2bl65zhgv1x6sy0c0000gn/T/Rtmprukk9k/Rinst102f577830c0c/CARD’

ERROR: package installation failed Error: Failed to install 'CARD' from GitHub: System command 'R' failed, exit status: 1, stdout & stderr were printed

sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.3.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] pillar_1.7.0 compiler_4.1.2 prettyunits_1.1.1 remotes_2.4.2
[5] tools_4.1.2 testthat_3.1.2 pkgbuild_1.3.1 pkgload_1.2.4
[9] memoise_2.0.1 lifecycle_1.0.1 tibble_3.1.7 pkgconfig_2.0.3
[13] rlang_1.0.2 rstudioapi_0.13 DBI_1.1.2 cli_3.3.0
[17] curl_4.3.2 fastmap_1.1.0 withr_2.4.3 dplyr_1.0.9
[21] generics_0.1.2 desc_1.4.0 fs_1.5.2 vctrs_0.4.1
[25] devtools_2.4.3 rprojroot_2.0.2 tidyselect_1.1.1 glue_1.6.1
[29] R6_2.5.1 processx_3.5.2 fansi_1.0.2 sessioninfo_1.2.2 [33] tidyr_1.2.0 purrr_0.3.4 callr_3.7.0 magrittr_2.0.2
[37] ps_1.6.0 ellipsis_0.3.2 usethis_2.1.5 assertthat_0.2.1 [41] utf8_1.2.2 cachem_1.0.6 crayon_1.4.2 brio1.1.3

YingMa0107 commented 2 years ago

Hi @utkarsh0493,

I have opened a new issue for your case since your issue is related to the macOS system while all others in this post have issues related to the openblas library in their system. Please see my answer for your issue here https://github.com/YingMa0107/CARD/issues/8! Thank you!

YingMa0107 commented 2 years ago

Hi @gancao, @katimbach, @rockdeme, @Yifeng101,

Thank you all for reporting the issue and thank you all for your patience!

I have updated the code and have installed it successfully on a very basic Windows 10 system, now it should not require the specific version of the libblas.so.3 object. Briefly, the previous version used floating type in the source c++ code which might require a specific version of the openblas library, now I have updated it to be double type, which will not depend on the specific version of openblas library.

lihuamei commented 2 years ago

Hi, @gancao, @katimbach, @rockdeme, @Yifeng101, I tried to install CARD on a Linux system, but it failed and need help. Thanks ![Uploading image.png…]()

YingMa0107 commented 2 years ago

Hi @lihuamei,

Thank you for your interest in our package! Could you please provide the sessionInfo() output in R. Based on the initial error message you provided, I presume there might be something wrong with the "Matrix" package installed on your system. Could you please check if you can load the "Matrix" library successfully? On my computer, the version of the "Matrix" package is 1.4-1. Try to re-install the newest Matrix package (version 1.4-1) first and then install CARD to see if it helps!

lihuamei commented 2 years ago

@YingMa0107

sessionInfo() R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /mnt/jssqx/home/glht01/softwares/R-4.0.2/lib64/R/lib/libRblas.so LAPACK: /mnt/jssqx/home/glht01/softwares/R-4.0.2/lib64/R/lib/libRlapack.so

locale: [1] LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C [3] LC_TIME=zh_CN.UTF-8 LC_COLLATE=zh_CN.UTF-8 [5] LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES=zh_CN.UTF-8 [7] LC_PAPER=zh_CN.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] Matrix_1.4-1

loaded via a namespace (and not attached): [1] compiler_4.0.2 grid_4.0.2 lattice_0.20-44

YingMa0107 commented 2 years ago

Hi @lihuamei,

Can you try to see if you can load or install all the following packages:

Imports: Rcpp (>= 1.0.7),RcppArmadillo,SingleCellExperiment,SummarizedExperiment, methods, MCMCpack, fields, wrMisc, concaveman, sp, dplyr, sf, Matrix, RANN, ggplot2, reshape2, RColorBrewer, scatterpie, grDevices, ggcorrplot, stats, nnls, pbmcapply, RcppML, NMF, spatstat.random, gtools

Sometimes it might be difficult to install the "sf" package (and also its dependent package "units") which will produce the core dumped error in linux CentOS system.

lihuamei commented 2 years ago

Hi, @YingMa0107/CARD Thank you very much for your kindly help, the problem has been solved.

At 2022-05-18 10:29:46, "YingMa0107" @.***> wrote:

Hi @lihuamei,

Can you try to see if you can load or install all the following packages:

Imports: Rcpp (>= 1.0.7),RcppArmadillo,SingleCellExperiment,SummarizedExperiment, methods, MCMCpack, fields, wrMisc, concaveman, sp, dplyr, sf, Matrix, RANN, ggplot2, reshape2, RColorBrewer, scatterpie, grDevices, ggcorrplot, stats, nnls, pbmcapply, RcppML, NMF, spatstat.random, gtools

Sometimes it might be difficult to install the "sf" package (and also its dependent package "units") which will produce the core dumped error in linux CentOS system.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>