stringi v1.6.2 compilation error on R 4.2 with Mac M1

I tried to renv::restore() a project on my new M1 Pro Mac (Monterey, 12.6) and R 4.2-arm64 (installed through rig). Howeverrenv::restore() fails at the compilation of {stringi}:

*** Compiler settings used:
    CC=gcc
    LD=g++
    CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion -fPIC  
    CPPFLAGS=-I/opt/R/arm64/include   -UDEBUG -DNDEBUG
    CXX=g++ -std=gnu++11
    CXXFLAGS=-falign-functions=64 -Wall -g -O2 -fPIC  
    LDFLAGS=  
    LIBS=  

** libs
g++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/include" -DNDEBUG -I. -Iicu69         -DU_STRINGI_PATCHES         -Iicu69/unicode -Iicu69/common         -Iicu69/i18n -DU_STATIC_IMPLEMENTATION         -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL   -UDEBUG -DNDEBUG  -I/opt/R/arm64/include  -fPIC -fPIC  -falign-functions=64 -Wall -g -O2  -c stri_brkiter.cpp -o stri_brkiter.o
stri_brkiter.cpp:60:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
stri_brkiter.cpp:130:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
stri_brkiter.cpp:171:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
3 errors generated.
make: *** [stri_brkiter.o] Error 1
ERROR: compilation failed for package ‘stringi’
* removing ‘/Users/blacat01/Documents/zz_Git/shurp-respons/renv/staging/1/stringi’
Error: install of package 'stringi' failed [error code 1]

What I already did & checked:

  • Prior to the stringi-error I solved several compilation issues already (e.g. jpeg (header missing) and {cluster}) when running renv::restore(); by installing gcc through brew and creating a ~/.R/Makefile following an SO post (suggested through the R console output).

  • I installed stringi without problem on R 4.2 into my user library (but I guess its the binary version not from source).
    edit: Installed it with install.packages("stringi", type = "source") and it build correctly

  • I succesfully used renv::restore()when I openend the project with R 4.1 (as requested by renv.lock) and there stringi was compiled without error.

Does anyone have an idea, if this is related to renv, rig, R 4.2, stringi, or my compilation settings on M1 Pro? Thanks for any inputs.

Full output from error
Warning message:
Project requested R version '4.1.1' but '4.2.1' is currently being used 
* The project may be out of sync -- use `renv::status()` for more details.
> renv::restore()
The following package(s) will be updated:

# CRAN ===============================
- DBI             [1.1.3 -> 1.1.1]
- MASS            [7.3-57 -> 7.3-53.1]
- Matrix          [1.4-1 -> 1.3-2]
- RColorBrewer    [1.1-3 -> 1.1-2]
- Rcpp            [1.0.9 -> 1.0.7]
- UpSetR          [1.4.0 -> 1.4.0]
- askpass         [1.1 -> 1.1]
- assertthat      [0.2.1 -> 0.2.1]
- backports       [1.4.1 -> 1.2.1]
- blob            [1.2.3 -> 1.2.1]
- broom           [1.0.1 -> 0.7.6]
- callr           [3.7.2 -> 3.7.0]
- cellranger      [1.1.0 -> 1.1.0]
- class           [7.3-20 -> 7.3-19]
- cli             [3.4.0 -> 3.0.1]
- clipr           [0.8.0 -> 0.7.1]
- clisymbols      [1.2.0 -> 1.2.0]
- cluster         [2.1.3 -> 2.1.2]
- colorspace      [2.0-3 -> 2.0-2]
- cpp11           [0.4.2 -> 0.2.7]
- crayon          [1.5.1 -> 1.4.1]
- curl            [4.3.2 -> 4.3.1]
- data.table      [1.14.2 -> 1.14.0]
- dbplyr          [2.2.1 -> 2.1.1]
- diffobj         [0.3.5 -> 0.3.4]
- digest          [0.6.29 -> 0.6.28]
- dplyr           [1.0.10 -> 1.0.6]
- dtplyr          [1.2.2 -> 1.1.0]
- ellipsis        [0.3.2 -> 0.3.2]
- evaluate        [0.16 -> 0.14]
- fansi           [1.0.3 -> 0.5.0]
- farver          [2.1.1 -> 2.1.0]
- forcats         [0.5.2 -> 0.5.1]
- foreign         [0.8-82 -> 0.8-81]
- fs              [1.5.2 -> 1.5.0]
- gargle          [1.2.1 -> 1.1.0]
- generics        [0.1.3 -> 0.1.0]
- ggplot2         [3.3.6 -> 3.3.5]
- glue            [1.6.2 -> 1.4.2]
- googledrive     [2.0.0 -> 1.0.1]
- googlesheets4   [1.0.1 -> 0.3.0]
- gridExtra       [2.3 -> 2.3]
- gtable          [0.3.1 -> 0.3.0]
- haven           [2.5.1 -> 2.4.1]
- hms             [1.1.2 -> 1.1.0]
- htmltools       [0.5.3 -> 0.5.1.1]
- httr            [1.4.4 -> 1.4.2]
- ids             [1.0.1 -> 1.0.1]
- isoband         [0.2.5 -> 0.2.5]
- janitor         [2.1.0 -> 2.1.0]
- jsonlite        [1.8.0 -> 1.7.2]
- knitr           [1.40 -> 1.33]
- labeling        [0.4.2 -> 0.4.2]
- lattice         [0.20-45 -> 0.20-41]
- lifecycle       [1.0.2 -> 1.0.1]
- lubridate       [1.8.0 -> 1.7.10]
- magrittr        [2.0.3 -> 2.0.1]
- mgcv            [1.8-40 -> 1.8-34]
- mime            [0.12 -> 0.10]
- modelr          [0.1.9 -> 0.1.8]
- munsell         [0.5.0 -> 0.5.0]
- naniar          [0.6.1 -> 0.6.1]
- nlme            [3.1-157 -> 3.1-153]
- nnet            [7.3-17 -> 7.3-16]
- norm            [1.0-10.0 -> 1.0-9.5]
- openssl         [2.0.3 -> 1.4.4]
- pillar          [1.8.1 -> 1.6.4]
- pkgconfig       [2.0.3 -> 2.0.3]
- plyr            [1.8.7 -> 1.8.6]
- prettyunits     [1.1.1 -> 1.1.1]
- processx        [3.7.0 -> 3.5.2]
- progress        [1.2.2 -> 1.2.2]
- ps              [1.7.1 -> 1.6.0]
- purrr           [0.3.4 -> 0.3.4]
- readr           [2.1.2 -> 1.4.0]
- readxl          [1.4.1 -> 1.3.1]
- rematch         [1.0.1 -> 1.0.1]
- rematch2        [2.1.2 -> 2.1.2]
- reprex          [2.0.2 -> 2.0.0]
- rlang           [1.0.5 -> 0.4.12]
- rmarkdown       [2.16 -> 2.11]
- rpart           [4.1.16 -> 4.1-15]
- rstudioapi      [0.14 -> 0.13]
- rvest           [1.0.3 -> 1.0.0]
- scales          [1.2.1 -> 1.1.1]
- selectr         [0.4-2 -> 0.4-2]
- snakecase       [0.11.0 -> 0.11.0]
- stringi         [1.7.8 -> 1.6.2]
- stringr         [1.4.1 -> 1.4.0]
- survival        [3.3-1 -> 3.2-13]
- sys             [3.4 -> 3.4]
- tibble          [3.1.8 -> 3.1.5]
- tidylog         [1.0.2 -> 1.0.2]
- tidyr           [1.2.1 -> 1.1.3]
- tidyselect      [1.1.2 -> 1.1.1]
- tidyverse       [1.3.2 -> 1.3.1]
- tinytex         [0.41 -> 0.31]
- utf8            [1.2.2 -> 1.2.2]
- uuid            [1.1-0 -> 0.1-4]
- vctrs           [0.4.1 -> 0.3.8]
- viridis         [0.6.2 -> 0.6.1]
- viridisLite     [0.4.1 -> 0.4.0]
- visdat          [0.5.3 -> 0.5.3]
- waldo           [0.4.0 -> 0.2.5]
- withr           [2.5.0 -> 2.4.2]
- xfun            [0.33 -> 0.23]
- xml2            [1.3.3 -> 1.3.2]
- yaml            [2.3.5 -> 2.2.1]
- BH              [* -> 1.75.0-0]
- DT              [* -> 0.18]
- Formula         [* -> 1.2-4]
- Hmisc           [* -> 4.5-0]
- RcppEigen       [* -> 0.3.3.9.1]
- abind           [* -> 1.4-5]
- arm             [* -> 1.11-2]
- bayestestR      [* -> 0.11.0]
- beeswarm        [* -> 0.4.0]
- checkmate       [* -> 2.0.0]
- coda            [* -> 0.19-4]
- crosstalk       [* -> 1.1.1]
- datawizard      [* -> 0.2.1]
- e1071           [* -> 1.7-7]
- gdata           [* -> 2.18.0]
- ggbeeswarm      [* -> 0.6.0]
- gmodels         [* -> 2.18.1]
- gtools          [* -> 3.9.2]
- htmlTable       [* -> 2.2.1]
- htmlwidgets     [* -> 1.5.3]
- insight         [* -> 0.14.5]
- jpeg            [* -> 0.1-8.1]
- kableExtra      [* -> 1.3.4]
- labelled        [* -> 2.8.0]
- later           [* -> 1.2.0]
- latticeExtra    [* -> 0.6-29]
- lavaan          [* -> 0.6-8]
- lazyeval        [* -> 0.2.2]
- lme4            [* -> 1.1-27]
- markdown        [* -> 1.1]
- minqa           [* -> 1.2.4]
- misty           [* -> 0.4.0]
- mitools         [* -> 2.4]
- mnormt          [* -> 2.0.2]
- nloptr          [* -> 1.2.2.2]
- numDeriv        [* -> 2016.8-1.1]
- pbapply         [* -> 1.4-3]
- pbivnorm        [* -> 0.6.0]
- performance     [* -> 0.8.0]
- png             [* -> 0.1-7]
- promises        [* -> 1.2.0.1]
- proxy           [* -> 0.4-26]
- rptR            [* -> 0.9.22]
- survey          [* -> 4.0]
- svglite         [* -> 2.0.0]
- systemfonts     [* -> 1.0.2]
- tableone        [* -> 0.13.0]
- tmvnsim         [* -> 1.0-2]
- vipor           [* -> 0.4.5]
- webshot         [* -> 0.5.2]
- zoo             [* -> 1.8-9]

# GitHub =============================
- emo             [* -> hadley/emo@HEAD]
- visibly         [* -> m-clark/visibly@HEAD]

Do you want to proceed? [y/N]: y
* Querying repositories for available binary packages ... Done!
* Querying repositories for available source packages ... Done!
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/broom/broom_0.7.6.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-21/bin/macosx/big-sur-arm64/contrib/4.2/stringr_1.4.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/stringi/stringi_1.6.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-07-20/bin/macosx/big-sur-arm64/contrib/4.2/callr_3.7.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/processx/processx_3.5.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/ps/ps_1.6.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/clipr/clipr_0.7.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/colorspace/colorspace_2.0-2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/curl/curl_4.3.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/data.table/data.table_1.14.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-06-08/bin/macosx/big-sur-arm64/contrib/4.2/dbplyr_2.1.1.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/withr/withr_2.4.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/diffobj/diffobj_0.3.4.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/dtplyr/dtplyr_1.1.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/evaluate/evaluate_0.14.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-07-20/bin/macosx/big-sur-arm64/contrib/4.2/farver_2.1.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-20/bin/macosx/big-sur-arm64/contrib/4.2/forcats_0.5.1.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/gargle/gargle_1.1.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/httr/httr_1.4.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/mime/mime_0.10.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/openssl/openssl_1.4.4.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-23/bin/macosx/big-sur-arm64/contrib/4.2/rstudioapi_0.13.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/ggplot2/ggplot2_3.3.5.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-09-01/bin/macosx/big-sur-arm64/contrib/4.2/gtable_0.3.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/scales/scales_1.1.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/RColorBrewer/RColorBrewer_1.1-2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-21/bin/macosx/big-sur-arm64/contrib/4.2/viridisLite_0.4.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/googledrive/googledrive_1.0.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/uuid/uuid_0.1-4.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/googlesheets4/googlesheets4_0.3.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/haven/haven_2.4.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/hms/hms_1.1.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/readr/readr_1.4.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/lubridate/lubridate_1.7.10.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/knitr/knitr_1.33.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/xfun/xfun_0.23.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-19/bin/macosx/big-sur-arm64/contrib/4.2/modelr_0.1.8.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/norm/norm_1.0-9.5.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/viridis/viridis_0.6.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/plyr/plyr_1.8.6.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/readxl/readxl_1.3.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/reprex/reprex_2.0.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/rmarkdown/rmarkdown_2.11.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/tinytex/tinytex_0.31.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/rvest/rvest_1.0.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/xml2/xml2_1.3.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-07-20/bin/macosx/big-sur-arm64/contrib/4.2/tidyverse_1.3.1.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/waldo/waldo_0.2.5.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/Hmisc/Hmisc_4.5-0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-07-04/bin/macosx/big-sur-arm64/contrib/4.2/latticeExtra_0.6-29.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/jpeg/jpeg_0.1-8.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/htmlTable/htmlTable_2.2.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/checkmate/checkmate_2.0.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/RcppEigen/RcppEigen_0.3.3.9.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/arm/arm_1.11-2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/lme4/lme4_1.1-27.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/nloptr/nloptr_1.2.2.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/bayestestR/bayestestR_0.11.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/insight/insight_0.14.5.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/datawizard/datawizard_0.2.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/beeswarm_0.4.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/e1071/e1071_1.7-7.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-06-09/bin/macosx/big-sur-arm64/contrib/4.2/proxy_0.4-26.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/gdata/gdata_2.18.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-05-23/bin/macosx/big-sur-arm64/contrib/4.2/gtools_3.9.2.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/ggbeeswarm_0.6.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/vipor_0.4.5.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/gmodels/gmodels_2.18.1.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/kableExtra_1.3.4.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/webshot/webshot_0.5.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/svglite/svglite_2.0.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/systemfonts/systemfonts_1.0.2.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/labelled/labelled_2.8.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/lavaan/lavaan_0.6-8.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-06-08/bin/macosx/big-sur-arm64/contrib/4.2/mnormt_2.0.2.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/tmvnsim_1.0-2.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/pbivnorm_0.6.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/misty/misty_0.4.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/pbapply/pbapply_1.4-3.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://mran.microsoft.com/snapshot/2022-08-12/bin/macosx/big-sur-arm64/contrib/4.2/performance_0.8.0.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.2/rptR_0.9.22.tgz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/survey/survey_4.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/tableone/tableone_0.13.0.tar.gz' ...
	OK [file is up to date]
Retrieving 'https://cloud.r-project.org/src/contrib/Archive/zoo/zoo_1.8-9.tar.gz' ...
	OK [file is up to date]
Installing sys [3.4] ...
	OK [linked cache]
Installing askpass [1.1] ...
	OK [linked cache]
Installing assertthat [0.2.1] ...
	OK [linked cache]
Installing backports [1.2.1] ...
	OK [linked cache]
Installing rlang [0.4.12] ...
	OK [linked cache]
Installing ellipsis [0.3.2] ...
	OK [linked cache]
Installing glue [1.4.2] ...
	OK [linked cache]
Installing vctrs [0.3.8] ...
	OK [linked cache]
Installing blob [1.2.1] ...
	OK [linked cache]
Installing generics [0.1.0] ...
	OK [linked cache]
Installing lifecycle [1.0.1] ...
	OK [linked cache]
Installing magrittr [2.0.1] ...
	OK [linked cache]
Installing fansi [0.5.0] ...
	OK [linked cache]
Installing cli [3.0.1] ...
	OK [linked cache]
Installing crayon [1.4.1] ...
	OK [linked cache]
Installing utf8 [1.2.2] ...
	OK [linked cache]
Installing pillar [1.6.4] ...
	OK [linked cache]
Installing pkgconfig [2.0.3] ...
	OK [linked cache]
Installing tibble [3.1.5] ...
	OK [linked cache]
Installing purrr [0.3.4] ...
	OK [linked cache]
Installing tidyselect [1.1.1] ...
	OK [linked cache]
Installing dplyr [1.0.6] ...
	OK [linked cache]
Installing stringi [1.6.2] ...
	FAILED
Error installing package 'stringi':
===================================

* installing to library ‘/Users/blacat01/Documents/zz_Git/shurp-respons/renv/staging/1’
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources
checking for R... /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for cat... /bin/cat
checking for local ICUDT_DIR... icu69/data
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking elf.h usability... no
checking elf.h presence... no
checking for elf.h... no
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking whether the C++ compiler supports the long long type... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports Standard Template Library... yes
checking whether std::map is available... yes
checking for pkg-config... no
*** pkg-config cannot be found
*** Trying with 'standard' fallback flags
checking whether an ICU4C-based project can be built... no
*** This version of ICU4C cannot be used.
*** Using the ICU 69 bundle.
checking whether we may compile src/icu69/common/putil.cpp... yes
checking whether we may compile src/icu69/i18n/number_affixutils.cpp... yes
checking whether alignof(std::max_align_t) is available... yes
checking whether the ICU data library can be downloaded... downloading the ICU data library (icudt)
output path: icu69/data/icu4c-69_1-data-bin-l.zip
trying URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip'
Content type 'application/zip' length 11454999 bytes (10.9 MB)
==================================================
downloaded 10.9 MB

icudt has been downloaded successfully
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/uconfig_local.h
config.status: creating src/install.libs.R

*** stringi configure summary:
    ICU_FOUND=0
    ICUDT_DIR=icu69/data
    ICU_BUNDLE_VERSION=69
    ICUDT_ENDIANNESS=little
    STRINGI_CXXSTD=CXX_STD=CXX11
    STRINGI_CFLAGS=   -fPIC
    STRINGI_CPPFLAGS=-I. -Iicu69         -DU_STRINGI_PATCHES         -Iicu69/unicode -Iicu69/common         -Iicu69/i18n -DU_STATIC_IMPLEMENTATION         -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL   -UDEBUG -DNDEBUG
    STRINGI_CXXFLAGS=   -fPIC
    STRINGI_LDFLAGS=  
    STRINGI_LIBS=  

*** Compiler settings used:
    CC=gcc
    LD=g++
    CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion -fPIC  
    CPPFLAGS=-I/opt/R/arm64/include   -UDEBUG -DNDEBUG
    CXX=g++ -std=gnu++11
    CXXFLAGS=-falign-functions=64 -Wall -g -O2 -fPIC  
    LDFLAGS=  
    LIBS=  

** libs
g++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/include" -DNDEBUG -I. -Iicu69         -DU_STRINGI_PATCHES         -Iicu69/unicode -Iicu69/common         -Iicu69/i18n -DU_STATIC_IMPLEMENTATION         -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL   -UDEBUG -DNDEBUG  -I/opt/R/arm64/include  -fPIC -fPIC  -falign-functions=64 -Wall -g -O2  -c stri_brkiter.cpp -o stri_brkiter.o
stri_brkiter.cpp:60:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
stri_brkiter.cpp:130:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
stri_brkiter.cpp:171:9: error: use of undeclared identifier 'isNull'
    if (isNull(opts_brkiter)) {
        ^
3 errors generated.
make: *** [stri_brkiter.o] Error 1
ERROR: compilation failed for package ‘stringi’
* removing ‘/Users/blacat01/Documents/zz_Git/shurp-respons/renv/staging/1/stringi’
Error: install of package 'stringi' failed [error code 1]
Session Info
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.2.1  fastmap_1.1.0   cli_3.4.0       htmltools_0.5.3 tools_4.2.1     rstudioapi_0.14 yaml_2.3.5      rmarkdown_2.16 
 [9] knitr_1.40      digest_0.6.29   xfun_0.33       rlang_1.0.5     renv_0.13.2     evaluate_0.16

Ok - I did some more digging (devtools::install_version("stringi", version = "1.6.2") and it seems to be a combination of R 4.2 and {stringi} 1.6.2.

I consulted both the R 4.2 release notes and the release notes on stringi - but I could not find the culprit..
If anyone has an idea, feel free to comment, otherwise I can just update renv.lock

Looks like this issue was reported and fixed in Unable to build stringi: ‘isNull’ was not declared in this scope · Issue #480 · gagolews/stringi · GitHub.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.