Closed thomasxue1 closed 5 years ago
There is a closed issue which stated almost the identical problem.
Thank you for your help. I noticed that issue. I think the main takeaway from that issue is rkdb shouldn't be run on 32-bit but 64-bit. I believe that I have already made sure everything is on the 64-bit, but the issue still arise. That's why I'm posting this issue.
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o rkdb.dll tmp.def rkdb.o -Lw32 -lestatic -lws232 -liphlpapi -LC:/PROGRA1/R/R-351.3/bin/i386 -lR C:/Rtools/mingw_32/bin/../lib/gcc/i686-w64-mingw32/4.9.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -le_static
Those error message shows that the compiler being used is 32-bit. And it's trying to link with some 32-bit libraries. So there are still some configurations still not set correctly (use 64-bit compiler).
How would we go about changing those configurations (to point to the mingw_64 directory presumably)? Thanks!
I don't use Windows and not that familiar with the details of the OS. I found this page from CRAN. Seems like you can rerun the installer to get the correct components to be used in R.
I don't use Windows and not that familiar with the details of the OS. I found this page from CRAN. Seems like you can rerun the installer to get the correct components to be used in R.
Hi Linwei,
Thank you for your help. I tried to configure R to use mingw_64 by setting "Sys.setenv(BINPREF = "C:/Rtools/mingw_64/bin/")" and I got the following error
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o rkdb.dll tmp.def rkdb.o -Lw32 -le_static -lws2_32 -liphlpapi -LC:/PROGRA~1/R/R-35~1.3/bin/i386 -lR C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -le_static C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-35~1.3/bin/i386/R.dll when searching for -lR C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-35~1.3/bin/i386/R.dll when searching for -lR C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lR collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'rkdb'
It seems that R opts to use 32bit gcc in the mingw_64. This is weird. Also, if I tried to add other into environmental variable as refered in (https://www.r-bloggers.com/quirks-about-running-rcpp-on-windows-through-rstudio/), it shows that Rtools package cannot be found. This is weird.
I have solved this issue. I think the key problem is after configuring everything to 64-bit, R CMD INSTALL for a package with compiled code will fail if compilation fails for any of the installed sub-architectures. Need to use "--no-multiarch" here to override this. Thus we need to run with "devtools::install_github('kxsystems/rkdb', INSTALL_opts = c("--no-multiarch", "--no-test-load"))".
Hi, I tried to install rkdb in my windows 10 system. And found error as shown below. The same error has been reported for windows 7 before. I think I have made my R to run 64-bit already.
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o rkdb.dll tmp.def rkdb.o -Lw32 -le_static -lws2_32 -liphlpapi -LC:/PROGRA~1/R/R-35~1.3/bin/i386 -lR C:/Rtools/mingw_32/bin/../lib/gcc/i686-w64-mingw32/4.9.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -le_static collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'rkdb'
My R versions are below and I use 3.5 Rtools:
Thank you so much for your help!