gagolews / stringi

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

Unable to build stringi: ‘isNull’ was not declared in this scope #480

Closed bovender closed 2 years ago

bovender commented 2 years ago

stringi suddenyl fails to build on my system with an error message "'isNull' was not declared in this scope", which prevents me from running my R scripts, and any help would be appreciated.

g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H    -fpic -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-apO4Ea/r-base-4.2.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c stri_brkiter.cpp -o stri_brkiter.o
stri_brkiter.cpp: In member function ‘void StriBrkIterOptions::setType(SEXP, const char*)’:
stri_brkiter.cpp:60:8: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
$ R --version
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.13.0-51-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 23,4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20L8S02D00
System Version: ThinkPad T480s
gagolews commented 2 years ago

I’ll correct it later this week (sick now) 🤒

Sent from my mobile device. Please excuse my brevity.

bovender commented 2 years ago

Thanks, I appreciate it. Take your time and be well! :muscle:

gagolews commented 2 years ago

Could you please try the current git version and confirm it works for you?

For example, devtools::install_github("gagolews/stringi")

bovender commented 2 years ago

Yes, this went through well, thanks a million for the quick fix!

danleibovitz commented 1 year ago

For those with the same problem who need to install the binary for whatever reason (e.g., to restore an environment for renv), I found that stringi failed to build specifically under R v.4.2.*, and that downgrading to R v.4.1.1 was sufficient.

solarchemist commented 11 months ago

Found myself in exactly the situation you described. Thanks @danleibovitz for the tip! I noticed that R v4.1.2 also works (R 4.1.2 happens to be included in Jammy universe repos, making it easy to install).