GeoDaCenter / rgeoda

R library for spatial data analysis based on libgeoda and GeoDa
70 stars 13 forks source link

rgeoda fails to compile on Windows #2

Closed angela-li closed 3 years ago

angela-li commented 4 years ago

We ran this in our workshop and this was an error message we got:

remotes::install_github("lixun910/rgeoda") Downloading GitHub repo lixun910/rgeoda@master √ checking for file 'C:\Users\Public\Documents\Wondershare\CreatorTemp\Rtmp61QG7m\remotes4628bf64594\lixun910-rgeoda-abd3684/DESCRIPTION' ...

  • preparing 'rgeoda': √ 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 'rgeoda_0.0.3.tar.gz'

Installing package into ‘C:/Users/aryaa/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

*** arch - i386 rm -f rgeoda.dll rgeoda.o mkdir -p ../inst "C:/PROGRA~1/R/R-36~1.1/bin/i386/Rscript.exe" --vanilla "../tools/winlibs.R" 2.2.3 Warning message: In unzip("wxlib.zip", exdir = "../windows") : internal error in 'unz' code cp -r ../windows/gdal2-2.2.3/share/gdal ../inst/ cp -r ../windows/gdal2-2.2.3/share/proj ../inst/ C:/RBuildTools/3.5/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I../windows/gdal2-2.2.3/include/gdal -I../windows/gdal2-2.2.3/include/geos -I../windows/gdal2-2.2.3/include/proj -I../windows/libgeoda_static-0.0.3.3/include -I../windows/wx_static-3.0.4/include -I../windows/wx_static-3.0.4/lib/i386/baseu -I../windows/ANN_static-1.1.2/include -O2 -Wall -mtune=generic -c rgeoda.cpp -o rgeoda.o In file included from rgeoda.cpp:3544:0: ../windows/libgeoda_static-0.0.3.3/include/GeodaWeight.h:24:23: fatal error: wx/string.h: No such file or directory

include <wx/string.h>

                   ^

compilation terminated. make: *** [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:215: rgeoda.o] Error 1 ERROR: compilation failed for package 'rgeoda'

arya-muralidharan commented 4 years ago

While install.packages("https://github.com/lixun910/rgeoda/releases/download/0.0.3/rgeoda_0.0.3.zip") didn't work, we were able to resolve the issue by downloading the binary package as a .zip file from the link and installing the package from the local file.

lixun910 commented 4 years ago

@angela-li @arya-muralidharan Thank you for reporting this! I can replicate this as well. It seems the download link https://codeload.github.com/rgeoda/wx_static/zip/master doesn't work anymore in the winlibs.R script.

I updated the download link and you should be able to compile rgeoda from source on windows after "git pull" to get the changes. Please delete the directory rgeoda/windows and try to build again. In this way, you should be able to work on the source code, and make changes to rgeoda.