yijuanhu / LOCOM

A logistic regression model for testing differential abundance in compositional microbiome data
7 stars 0 forks source link

fail of install LOCOM package #1

Open rusher321 opened 12 months ago

rusher321 commented 12 months ago

Hi Hu:

I got an error when I installed LOCOM package, like below;

"D:/Install/rtools40/mingw32/bin/"g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG  -I'D:/Install/envs/rstudio/lib/R/R_LIBS/Rcpp/include' -I'D:/Install/envs/rstudio/lib/R/R_LIBS/RcppArmadillo/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c Newton.cpp -o Newton.o
Newton.cpp: In function 'Rcpp::List Newton(arma::mat, arma::mat, arma::cube, arma::mat, arma::mat, double, int, double, bool, arma::vec, bool)':
Newton.cpp:127:38: warning: comparison of integer expressions of different signedness: 'arma::enable_if2<true, unsigned int>::result' {aka 'unsigned int'} and 'int' [-Wsign-compare]
             if (sum(abs(step) < tol) == K){
                 ~~~~~~~~~~~~~~~~~~~~~^~~~
"D:/Install/rtools40/mingw32/bin/"g++ -std=gnu++11  -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG  -I'D:/Install/envs/rstudio/lib/R/R_LIBS/Rcpp/include' -I'D:/Install/envs/rstudio/lib/R/R_LIBS/RcppArmadillo/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c RcppExports.cpp -o RcppExports.o
D:/Install/rtools40/mingw32/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o LOCOM.dll tmp.def Newton.o RcppExports.o -LC:/PROGRA~1/R/R-41~1.0/bin/i386 -lR
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text+0x1a0c): undefined reference to `ddot_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[__ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0x8a): undefined reference to `dgetrf_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[__ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0xf6): undefined reference to `dgetri_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[__ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0x1de): undefined reference to `dgetri_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj[__ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj]+0x40b): undefined reference to `dtrtri_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj[__ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj]+0x64c): undefined reference to `dpotrf_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj[__ZN4arma15op_inv_gen_full12apply_directINS_3MatIdEELb0EEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEPKcj]+0x698): undefined reference to `dpotri_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[__ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x151): undefined reference to `dgemm_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[__ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x241): undefined reference to `dgemv_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEENS_3ColIdEEEEvRNS2_IT_EERKT3_RKT4_S6_[__ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEENS_3ColIdEEEEvRNS2_IT_EERKT3_RKT4_S6_]+0xfd): undefined reference to `dgemv_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEENS_3ColIdEEEEvRNS2_IT_EERKT3_RKT4_S6_[__ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEENS_3ColIdEEEEvRNS2_IT_EERKT3_RKT4_S6_]+0x101): undefined reference to `dgemv_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma4syrkILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvRNS_3MatIT_EERKT0_S6_S6_[__ZN4arma4syrkILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvRNS_3MatIT_EERKT0_S6_S6_]+0x1c2): undefined reference to `ddot_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma4syrkILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvRNS_3MatIT_EERKT0_S6_S6_[__ZN4arma4syrkILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvRNS_3MatIT_EERKT0_S6_S6_]+0x34c): undefined reference to `dsyrk_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma4gemvILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvPT_RKT0_PKS5_S5_S5_[__ZN4arma4gemvILb1ELb0ELb0EE15apply_blas_typeIdNS_3RowIdEEEEvPT_RKT0_PKS5_S5_S5_]+0xc1): undefined reference to `dgemv_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma7subviewIdE10inplace_opINS_15op_internal_equENS_4GlueINS_2OpINS_11subview_rowIdEENS_9op_htransEEES7_NS_10glue_timesEEEEEvRKNS_4BaseIdT0_EEPKc[__ZN4arma7subviewIdE10inplace_opINS_15op_internal_equENS_4GlueINS_2OpINS_11subview_rowIdEENS_9op_htransEEES7_NS_10glue_timesEEEEEvRKNS_4BaseIdT0_EEPKc]+0x47c): undefined reference to `dgemm_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3RowIdEENS_3MatIdEEEEvRNS4_IT_EERKT3_RKT4_S6_[__ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3RowIdEENS_3MatIdEEEEvRNS4_IT_EERKT3_RKT4_S6_]+0x15d): undefined reference to `dgemm_'
D:/Install/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: Newton.o:Newton.cpp:(.text$_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3RowIdEENS_3MatIdEEEEvRNS4_IT_EERKT3_RKT4_S6_[__ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3RowIdEENS_3MatIdEEEEvRNS4_IT_EERKT3_RKT4_S6_]+0x275): undefined reference to `dgemv_'
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'LOCOM'

Here is my R enviroment

R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

I've looked for what's going wrong but still can't fix the installation; I guess I lack C++ knowledge; I would appreciate if you could provide some help ~.

Best wishes~ Huahui

gthopkins commented 6 months ago

I have the same error when trying to install the package. Has this issue been solved? @yijuanhu

yijuanhu commented 6 months ago

I apologize for this error. I will work on that right now. Please stay tuned.

Yijuan

On May 31, 2024, at 4:06 PM, gthopkins @.***> wrote:

I have the same error when trying to install the package. Has this issue been solved?

— Reply to this email directly, view it on GitHubhttps://github.com/yijuanhu/LOCOM/issues/1#issuecomment-2142909260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFM4UJNSUOLV7XT744C5KPTZFDJ3LAVCNFSM6AAAAABAKV457SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSHEYDSMRWGA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Nathan-Cheng-Yang-Lee commented 3 months ago

Hi there! I've been trying to install LOCOM for my metagenomics data analysis, but I keep getting an error message. I'd be really grateful if you could help me fix it! Thanks so much in advance.

** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘LOCOM’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/00LOCK-LOCOM/00new/LOCOM/libs/LOCOM.so': /usr/local/lib/R/site-library/00LOCK-LOCOM/00new/LOCOM/libs/LOCOM.so: undefined symbol: dpotrf_ Error: loading failed Execution halted ERROR: loading failed

Ziyu-Liu-WCM commented 3 months ago

I got similar error messages but my error lay on the lapack library:

C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetrf.f.obj):dgetrf.f:(.text+0x4f9): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetrf2.f.obj):dgetrf2.f:(.text+0x25a): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetrf2.f.obj):dgetrf2.f:(.text+0x46b): undefined reference to `idamax' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetrf2.f.obj):dgetrf2.f:(.text+0x52e): undefined reference to `dscal' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetri.f.obj):dgetri.f:(.text+0x48a): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dgetri.f.obj):dgetri.f:(.text+0x754): undefined reference to `dswap' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dpotrf.f.obj):dpotrf.f:(.text+0x479): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dpotrf.f.obj):dpotrf.f:(.text+0x821): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dpotrf2.f.obj):dpotrf2.f:(.text+0x254): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dpotrf2.f.obj):dpotrf2.f:(.text+0x3ae): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrtri.f.obj):dtrtri.f:(.text+0x327): undefined reference to `dtrmm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrtri.f.obj):dtrtri.f:(.text+0x3a6): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrtri.f.obj):dtrtri.f:(.text+0x6ca): undefined reference to `dtrmm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrtri.f.obj):dtrtri.f:(.text+0x773): undefined reference to `dtrsm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dlauum.f.obj):dlauum.f:(.text+0x2a5): undefined reference to `dtrmm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dlauum.f.obj):dlauum.f:(.text+0x638): undefined reference to `dtrmm' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrti2.f.obj):dtrti2.f:(.text+0x233): undefined reference to `dtrmv' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrti2.f.obj):dtrti2.f:(.text+0x254): undefined reference to `dscal' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrti2.f.obj):dtrti2.f:(.text+0x3a4): undefined reference to `dtrmv' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dtrti2.f.obj):dtrti2.f:(.text+0x3d0): undefined reference to `dscal' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dlauu2.f.obj):dlauu2.f:(.text+0x25c): undefined reference to `dscal' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: C:/rtools43/x8664-w64-mingw32.static.posix/lib/liblapack.a(dlauu2.f.obj):dlauu2.f:(.text+0x3ea): undefined reference to `dscal' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: c:/rtools43/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/12.3.0/libgfortran.a(write.o):(.text$determine_en_precision+0x1e7): undefined reference to quadmath_snprintf' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: c:/rtools43/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/12.3.0/libgfortran.a(write.o):(.text$get_float_string+0x26f): undefined reference toquadmath_snprintf' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: c:/rtools43/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/12.3.0/libgfortran.a(write.o):(.text$get_float_string+0xd61): undefined reference to quadmath_snprintf' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: c:/rtools43/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/12.3.0/libgfortran.a(write.o):(.text$get_float_string+0x1752): undefined reference toquadmath_snprintf' C:\rtools43\x86_64-w64-mingw32.static.posix\bin/ld.exe: c:/rtools43/x86_64-w64-mingw32.static.posix/bin/../lib/gcc/x86_64-w64-mingw32.static.posix/12.3.0/libgfortran.a(write.o):(.text$get_float_string+0x193a): undefined reference to `quadmath_snprintf'

gthopkins commented 3 months ago

@yijuanhu do you have any update regarding the install errors? It seems several users are encountering issues while installing LOCOM. Thank you for your help!

Ziyu-Liu-WCM commented 3 months ago

@yijuanhu do you have any update regarding the install errors? It seems several users are encountering issues while installing LOCOM. Thank you for your help!

Hi gthopkins, I've been looking into this problem but there are very limited information. Do you have BLAS and LAPACK in your R environment?(usually shown in the output of sessionInfo(), just one line after "Matrix products: default") Also are you using a simplified Chinese Windows system?

Ziyu-Liu-WCM commented 3 months ago

@rusher321 @gthopkins Seems that our dear authors are not working on this project. I'm almost sure the error is caused by the different configuration of BLAS/LAPACK libraries between macOS and Windows. I asked people around me and the package could be installed properly on macOS machines, but not on Windows machines. If you do need this package recently, you can either swap to a macOS PC or install the older version using devtools::install_github("yijuanhu/LOCOM-Archive")

gthopkins commented 3 months ago

@Ziyu-Liu-WCM @yijuanhu I do not have BLAS or LAPACK in my R environment, and I am using a Windows system. Thank you for your suggested solution. I know one person using macOS who was able to install, however another was not. Hopefully the team can debug this software.