Problem when publishing an app

Hi!

Since a couple of days I get an error when trying to publish a slightly updated version of an app that has ran for months without any issue. I looks like it fails to compile stringi (see full log below). Note that I don't even import it (even if I cannot exclude it is required by some package I actually use)

  building: Building package: stringi
################################ Begin Task Log ################################ 
[2022-05-13T04:53:13.209851239+0000] Execute script: packages/build/rJava.sh
+ set -e
+ /usr/bin/R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 11.0.14.1
Java home path   : /usr/lib/jvm/java-11-openjdk-amd64
Java compiler    : /usr/bin/javac
Java headers gen.: 
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
gcc -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux  -I/usr/local/include   -fpic  -g -O2  -c conftest.c -o conftest.o
gcc -shared -L/opt/R/4.2.0/lib/R/lib -L/usr/local/lib -o conftest.so conftest.o -L/usr/lib/jvm/java-11-openjdk-amd64/lib/server -ljvm -L/opt/R/4.2.0/lib/R/lib -lR


JAVA_HOME        : /usr/lib/jvm/java-11-openjdk-amd64
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /opt/R/4.2.0/lib/R
Done.

[2022-05-13T04:53:16.505198105+0000] Installing R package: MASS (7.3-56)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘MASS’ ...
* DONE (MASS)
[2022-05-13T04:53:16.761269725+0000] Installing R package: R6 (2.5.0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘R6’ ...
* DONE (R6)
[2022-05-13T04:53:16.943478027+0000] Installing R package: RColorBrewer (1.1-2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘RColorBrewer’ ...
* DONE (RColorBrewer)
[2022-05-13T04:53:17.119392916+0000] Installing R package: Rcpp (1.0.6)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘Rcpp’ ...
* DONE (Rcpp)
[2022-05-13T04:53:18.113924604+0000] Installing R package: backports (1.2.1)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘backports’ ...
* DONE (backports)
[2022-05-13T04:53:18.298316505+0000] Installing R package: base64enc (0.1-3)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘base64enc’ ...
* DONE (base64enc)
[2022-05-13T04:53:18.475157074+0000] Installing R package: bitops (1.0-7)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘bitops’ ...
* DONE (bitops)
[2022-05-13T04:53:18.650153864+0000] Installing R package: colorspace (2.0-0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘colorspace’ ...
* DONE (colorspace)
[2022-05-13T04:53:19.022813999+0000] Installing R package: commonmark (1.7)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘commonmark’ ...
* DONE (commonmark)
[2022-05-13T04:53:19.252347250+0000] Installing R package: crayon (1.4.1)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘crayon’ ...
* DONE (crayon)
[2022-05-13T04:53:19.433514643+0000] Installing R package: digest (0.6.27)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘digest’ ...
* DONE (digest)
[2022-05-13T04:53:19.653587763+0000] Installing R package: fansi (0.4.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘fansi’ ...
* DONE (fansi)
[2022-05-13T04:53:19.849935087+0000] Installing R package: farver (2.1.0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘farver’ ...
* DONE (farver)
[2022-05-13T04:53:20.242210004+0000] Installing R package: fastmap (1.1.0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘fastmap’ ...
* DONE (fastmap)
[2022-05-13T04:53:20.443246315+0000] Installing R package: fs (1.5.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘fs’ ...
* DONE (fs)
[2022-05-13T04:53:20.681261642+0000] Installing R package: generics (0.1.0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘generics’ ...
* DONE (generics)
[2022-05-13T04:53:20.856307036+0000] Installing R package: glue (1.6.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘glue’ ...
* DONE (glue)
[2022-05-13T04:53:21.049169634+0000] Installing R package: gtable (0.3.0)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘gtable’ ...
* DONE (gtable)
[2022-05-13T04:53:21.287023083+0000] Installing R package: isoband (0.2.4)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘isoband’ ...
* DONE (isoband)
[2022-05-13T04:53:21.852439934+0000] Installing R package: jsonlite (1.7.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘jsonlite’ ...
* DONE (jsonlite)
[2022-05-13T04:53:22.061472157+0000] Installing R package: labeling (0.4.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘labeling’ ...
* DONE (labeling)
[2022-05-13T04:53:22.236362556+0000] Installing R package: lattice (0.20-45)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘lattice’ ...
* DONE (lattice)
[2022-05-13T04:53:22.478125107+0000] Installing R package: magrittr (2.0.3)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘magrittr’ ...
* DONE (magrittr)
[2022-05-13T04:53:22.677080382+0000] Installing R package: mime (0.10)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘mime’ ...
* DONE (mime)
[2022-05-13T04:53:22.852777305+0000] Installing R package: pkgconfig (2.0.3)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘pkgconfig’ ...
* DONE (pkgconfig)
[2022-05-13T04:53:23.026211123+0000] Installing R package: rJava (1.0-6)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘rJava’ ...
* DONE (rJava)
[2022-05-13T04:53:23.374632810+0000] Installing R package: rappdirs (0.3.3)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘rappdirs’ ...
* DONE (rappdirs)
[2022-05-13T04:53:23.554980358+0000] Installing R package: rlang (1.0.2)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘rlang’ ...
* DONE (rlang)
[2022-05-13T04:53:23.838332730+0000] Installing R package: sourcetools (0.1.7)
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *binary* package ‘sourcetools’ ...
* DONE (sourcetools)
[2022-05-13T04:53:24.061307176+0000] Building R package: stringi (1.5.3)
/mnt/packages/build /mnt
checking for R_HOME... /opt/R/4.2.0/lib/R
checking for R... /opt/R/4.2.0/lib/R/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... /usr/bin/cat
checking for local ICUDT_DIR... icu61/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... 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... yes
checking elf.h presence... yes
checking for elf.h... yes
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... /usr/bin/pkg-config
checking with pkg-config for the system ICU4C... 66.1
checking for ICU4C >= 55... yes
checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done
checking whether we may build an ICU4C-based project... yes
checking programmatically for sufficient U_ICU_VERSION_MAJOR_NUM... yes
checking programmatically if U_CHARSET_IS_UTF8 is defined and set... yes
checking for available ICU data library (ucnv, uloc, utrans)... yes
checking for available ICU data library (ucol)... yes
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=1
    STRINGI_CXXSTD=CXX_STD=CXX11
    STRINGI_CFLAGS=   -fpic
    STRINGI_CPPFLAGS=-I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H
    STRINGI_CXXFLAGS=   -fpic
    STRINGI_LDFLAGS=-L/usr/lib/x86_64-linux-gnu  
    STRINGI_LIBS=-licui18n -licuuc -licudata  

*** compiler settings used:
    CC=gcc
    LD=g++ -std=gnu++14
    CFLAGS=-g -O2 -fpic  
    CPPFLAGS=-I/usr/local/include   -UDEBUG -DNDEBUG
    CXX=g++ -std=gnu++11
    CXXFLAGS=-g -O2 -fpic  
    LDFLAGS=  
    LIBS=  

make: Entering directory '/tmp/RtmpZB2MAr/R.INSTALL1c53d36d521/stringi/src'
g++ -std=gnu++11 -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H  -I/usr/local/include  -fpic -fpic  -g -O2  -c stri_brkiter.cpp -o stri_brkiter.o
g++ -std=gnu++11 -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H  -I/usr/local/include  -fpic -fpic  -g -O2  -c stri_collator.cpp -o stri_collator.o
g++ -std=gnu++11 -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H  -I/usr/local/include  -fpic -fpic  -g -O2  -c stri_common.cpp -o stri_common.o
g++ -std=gnu++11 -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -I.    -UDEBUG -DNDEBUG -DU_HAVE_ELF_H  -I/usr/local/include  -fpic -fpic  -g -O2  -c stri_compare.cpp -o stri_compare.o
make: Leaving directory '/tmp/RtmpZB2MAr/R.INSTALL1c53d36d521/stringi/src'
make: Entering directory '/tmp/RtmpZB2MAr/R.INSTALL1c53d36d521/stringi/src'
make: Leaving directory '/tmp/RtmpZB2MAr/R.INSTALL1c53d36d521/stringi/src'
Warning: unknown option ‘--vanilla’
* installing to library ‘/opt/R/4.2.0/lib/R/library’
* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
stri_brkiter.cpp: In member function ‘void StriBrkIterOptions::setType(SEXP, const char*)’:
stri_brkiter.cpp:60:9: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
   60 |     if (isNull(opts_brkiter)) {
      |         ^~~~~~
      |         Rf_isNull
stri_brkiter.cpp: In member function ‘void StriBrkIterOptions::setLocale(SEXP)’:
stri_brkiter.cpp:130:9: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
  130 |     if (isNull(opts_brkiter)) {
      |         ^~~~~~
      |         Rf_isNull
stri_brkiter.cpp: In member function ‘void StriBrkIterOptions::setSkipRuleStatus(SEXP)’:
stri_brkiter.cpp:171:9: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
  171 |     if (isNull(opts_brkiter)) {
      |         ^~~~~~
      |         Rf_isNull
stri_collator.cpp: In function ‘UCollator* stri__ucol_open(SEXP)’:
stri_collator.cpp:70:10: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
   70 |     if (!isNull(opts_collator) && !Rf_isVectorList(opts_collator))
      |          ^~~~~~
      |          Rf_isNull
stri_collator.cpp:73:20: error: ‘isNull’ was not declared in this scope; did you mean ‘Rf_isNull’?
   73 |     R_len_t narg = isNull(opts_collator)?0:LENGTH(opts_collator);
      |                    ^~~~~~
      |                    Rf_isNull
make: *** [/opt/R/4.2.0/lib/R/etc/Makeconf:177: stri_brkiter.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/opt/R/4.2.0/lib/R/etc/Makeconf:177: stri_collator.o] Error 1
ERROR: compilation failed for package ‘stringi’
* removing ‘/opt/R/4.2.0/lib/R/library/stringi’
################################# End Task Log ################################# 
Error: Unhandled Exception: Child Task 1152321097 failed: Error building image: Error building stringi (1.5.3). Build exited with non-zero status: 1
Execution halted

...

1 Like

Had the same issue, but this was caused by using an older version of stringi. I guess something in the build options for R 4.2.0 changed, so either use an older version of R or use a newer version of stringi (for me 1.7.3 still didn't compile, but the version on GitHub - gagolews/stringi: THE String Processing Package for R (with ICU) did), so my guess (didn't test) is that the latest version on CRAN would work (1.7.6).

1 Like

Yes. I updated stringi to 1.7.6 and everything works as normal. I imagine this is the solution.

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.