Reputation: 113
I'm trying to download a R package from github using devtools, and I'm running into some problems. From the error message I'm getting, it seems like the problem has something to do with RcppArmadillo, since "dgemv_" seems to be a part of RcppArmadillo. Uninstalling or reinstalling RcppArmadillo doesn't stop the error.
Since I've had this error message, I've uninstalled R, RStudio, and Rtools. I reinstalled R, installed some packages, installed Rtools, and the error is persisting.
In R, my session info is:
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RcppArmadillo_0.9.100.5.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.19 magrittr_1.5 usethis_1.4.0 devtools_2.0.0 pkgload_1.0.1 R6_2.3.0 rlang_0.3.0 tools_3.5.1
[9] pkgbuild_1.0.2 sessioninfo_1.1.0 cli_1.0.1 withr_2.1.2 remotes_2.0.1 assertthat_0.2.0 digest_0.6.18 rprojroot_1.3-2
[17] crayon_1.3.4 processx_3.2.0 callr_3.0.0 base64enc_0.1-3 fs_1.2.6 ps_1.2.0 curl_3.2 memoise_1.1.0
[25] glue_1.3.0 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2
When I run:
devtools::install_github("irinagain/mixedCCA")
I get the error message:
Downloading GitHub repo irinagain/mixedCCA@master
√ checking for file 'C:\Users\ben\AppData\Local\Temp\RtmpSQ7zwU\remotes2a5c2e561667\irinagain-mixedCCA-af59bb9/DESCRIPTION' (406ms)
- preparing 'mixedCCA':
√ checking DESCRIPTION meta-information
- cleaning src
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'mixedCCA_0.1.0.tar.gz'
* installing *source* package 'mixedCCA' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I"C:/Program Files/R/R-3.5.1/library/Rcpp/include" -I"C:/Program Files/R/R-3.5.1/library/RcppArmadillo/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I"C:/Program Files/R/R-3.5.1/library/Rcpp/include" -I"C:/Program Files/R/R-3.5.1/library/RcppArmadillo/include" -O2 -Wall -mtune=generic -c find_w12.cpp -o find_w12.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o mixedCCA.dll tmp.def RcppExports.o find_w12.o -LC:/PROGRA~1/R/R-35~1.1/bin/i386 -lR
find_w12.o:find_w12.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[__ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE]+0x361): undefined reference to `dgemv_'
find_w12.o:find_w12.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[__ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE]+0x622): undefined reference to `dgemv_'
find_w12.o:find_w12.cpp:(.text$_ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE[__ZN4arma27glue_times_redirect2_helperILb0EE5applyINS_3MatIdEENS_3ColIdEEEEvRNS3_INT_9elem_typeEEERKNS_4GlueIS7_T0_NS_10glue_timesEEE]+0xa6b): undefined reference to `dgemv_'
find_w12.o:find_w12.cpp:(.text$_ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_[__ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_]+0x18c): undefined reference to `dgemv_'
find_w12.o:find_w12.cpp:(.text$_ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_[__ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_]+0x43a): undefined reference to `dgemv_'
find_w12.o:find_w12.cpp:(.text$_ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_[__ZN4arma5ProxyINS_4GlueINS_3MatIdEENS_3ColIdEENS_10glue_timesEEEEC1ERKS7_]+0x987): more undefined references to `dgemv_' follow
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'mixedCCA'
* removing 'C:/Program Files/R/R-3.5.1/library/mixedCCA'
In R CMD INSTALL
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/ben/AppData/Local/Temp/RtmpSQ7zwU/file2a5c4fb94283/mixedCCA_0.1.0.tar.gz’ had non-zero exit status
Upvotes: 1
Views: 489
Reputation: 1
I solved this using the following :
Upvotes: 0
Reputation: 26833
The problem is that the BLAS and LAPACK libraries are not mentioned during linking. For this to happen, the package author should use something like
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
in src/Makevars(.win)
. This happens automatically when one uses RcppArmadillo::RcppArmadillo.package.skeleton()
to set-up the package. However, mixedCCA
does not have a Makevars
file at all: https://github.com/irinagain/mixedCCA/tree/master/src. You should open an issue on GH to get this fixed.
Upvotes: 3
Reputation: 368389
Not an Rcpp issue, or RcppArmadillo issue because it shows
other attached packages:
[1] RcppArmadillo_0.9.100.5.0
that RcppArmadillo is loaded just fone.
I suggest you open a ticket at the mixedCCA
repo.
Upvotes: 2