gagolews / stringi

Fast and portable character string processing in R (with the Unicode ICU)
https://stringi.gagolewski.com/
Other
304 stars 44 forks source link

stringi won't update from 1.1.7 on Windows 10 #313

Closed JoeUX closed 5 years ago

JoeUX commented 6 years ago

Hi all -- This issue has been an issue for many weeks. With both R 3.5.0 and 3.5.1 (64-bit), I've not been update to update stringi 1.1.7, first to 1.2.2 and now to 1.2.3. So I've been stuck on 1.1.7 due to the following error:

make: *** No rule to make target '$(CXX11STD)''. Stop. ERROR: compilation failed for package 'stringi'

I don't know where this make target is, or how this stringi dependency works. Any ideas? Every time I try to update stringi, I get a pop-up asking if I want to compile from source, to which I say yes (if I say no, it proceeds without error but stringi does not get updated). That pop-up appears regarding various packages when a new version is available, when it's only available as source, and it usually stops appearing a couple of days after a new release of a package because by then they apparently have a binary available. stringi doesn't seem to have a binary available since 1.1.7, or perhaps before.

I'm using R within RStudio 1.1.453 (latest release) on Windows 10 Pro 64-bit version 1803.

gagolews commented 6 years ago

As a temporary workaround, you can try:

# R 3.4:
install.packages("https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.4/stringi_1.2.4.zip?raw=true", repos=NULL)
# R 3.5:
install.packages("https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.5/stringi_1.2.4.zip?raw=true", repos=NULL)

I created a binary version for R 3.4 and 3.5 using https://win-builder.r-project.org/

The win build fails on the CRAN machines (https://cran.r-project.org/web/checks/check_results_stringi.html) with R-release and R-oldrel, but R-devel is fine. I asked the CRAN team of the possible reason why icudt download fails there, so far with no response.

JoeUX commented 6 years ago

Thanks for your help. Is your binary specific to 3.5.0? I get this error with the workaround:

Warning in install.packages : package ‘https://github.com/gagolews/stringi/raw/master/devel/winbuilder/stringi_1.2.3.zip’ is not available (for R version 3.5.1)

gagolews commented 6 years ago

Could you try downloading the aforementioned file first and then try to install.packages("local\\path\\stringi_1.2.3.zip"). I'm not 100% sure how this works on Windows.

siddharthprabhu commented 6 years ago

I tried both your suggestions gagolews but so far without success. I'm getting the same error as JoeUX.

Warning in install.packages :
  package ‘stringi_1.2.3.zip’ is not available (for R version 3.4.3)
gagolews commented 6 years ago

what about adding repos=NULL arg?

siddharthprabhu commented 6 years ago

Thanks gagolews! Adding the repos = NULL argument worked while installing the file from my local machine.

siddharthprabhu commented 6 years ago

Although I was able to install the package using your suggestion, calling the library generates the following message:

Error: package ‘stringi’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

Any ideas on what's causing this?

gagolews commented 6 years ago

Hi, I updated the binaries:

# R 3.4:
install.packages("https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.4/stringi_1.2.4.zip?raw=true", repos=NULL)
# R 3.5:
install.packages("https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.5/stringi_1.2.4.zip?raw=true", repos=NULL)
siddharthprabhu commented 6 years ago

I get the following error when executing your command for R 3.4 (the version I'm using):

Installing package into ‘C:/Users/siddh/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) Error in download.file(p, destfile, method, mode = "wb", ...) : cannot open destfile 'C:\Users\siddh\AppData\Local\Temp\Rtmp6JkhAv/downloaded_packages/stringi_1.2.4.zip?raw=true', reason 'Invalid argument' Error in install.packages : type == "both" cannot be used with 'repos = NULL'

I tried adding type = "win.binary" to your command and that gets rid of the last error message. But the 'Invalid argument' error still persists and the package fails to install.

gagolews commented 6 years ago

I guess you should try downloading the file first and using install.packages("local_file_name.zip", repos=NULL)

siddharthprabhu commented 6 years ago

That did the trick. Thank you so much for the help gagolews!

shawnlunny commented 6 years ago

The url does not work for me at all. Does it still exist?

siddharthprabhu commented 6 years ago

@shawnlunny Both URLs are still working at the moment. Be sure to use the links from gagolews' latest post. Reposting them below for your convenience.

# Binary for R 3.4:
https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.4/stringi_1.2.4.zip?raw=true

# Binary for R 3.5:
https://github.com/gagolews/stringi/blob/master/devel/winbuilder/3.5/stringi_1.2.4.zip?raw=true
gagolews commented 5 years ago

This is fixed now.