Heroku и ошибка сборки R: «LC_MESSAGES» не объявлено

Недавно я попытался обновить приложение Heroku с Cedar-14 до Heroku-16. Я использую это: сборочный пакет Heroku для R.

После переключения появилось множество ошибок установки зависимостей R, начиная с

ошибка: «LC_MESSAGES» необъявлено (первое использование в этой функции)

Вывод sessionInfo():

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached):
[1] compiler_3.4.4

Соответствующий вывод от heroku push:

remote: -----> R Console app detected
remote:        NOTE: Using R version override [3.3.3]
remote: -----> Vendoring R 3.3.3 for heroku-16 stack (latest)
remote:        Retrieving R binaries from cache
remote: -----> Installing binary dependencies from Aptfile
remote:        Reading package lists...
remote:        Building dependency tree...
remote:        Reading state information...
remote:        libcurl4-openssl-dev is already the newest version (7.47.0-1ubuntu2.13).
remote:        libpq-dev is already the newest version (11.4-1.pgdg16.04+1).
remote:        0 upgraded, 0 newly installed, 0 to remove and 152 not upgraded.

remote: -----> Executing R init script
remote:        Installing package into ‘/usr/local/lib/R/site-library’
remote:        (as ‘lib’ is unspecified)
remote:        also installing the dependency ‘rngWELL’
remote:
remote:        trying URL 'http://cran.rstudio.com/src/contrib/rngWELL_0.10-5.tar.gz'
remote:        Content type 'application/x-gzip' length 61343 bytes (59 KB)
remote:        ==================================================
remote:        downloaded 59 KB
remote:
remote:        trying URL 'http://cran.rstudio.com/src/contrib/randtoolbox_1.30.0.tar.gz'
remote:        Content type 'application/x-gzip' length 1543760 bytes (1.5 MB)
remote:        ==================================================
remote:        downloaded 1.5 MB
remote:
remote:        * installing *source* package ‘rngWELL’ ...
remote:        ** package ‘rngWELL’ successfully unpacked and MD5 sums checked
remote:        checking for gcc... gcc
remote:        checking for C compiler default output file name... a.out
remote:        checking whether the C compiler works... yes
remote:        checking whether we are cross compiling... no
remote:        checking for suffix of executables...
remote:        checking for suffix of object files... o
remote:        checking whether we are using the GNU C compiler... yes
remote:        checking whether gcc accepts -g... yes
remote:        checking for gcc option to accept ISO C89... none needed
remote:        checking how to run the C preprocessor... gcc -E
remote:        checking for grep that handles long lines and -e... /bin/grep
remote:        checking for egrep... /bin/grep -E
remote:        checking for ANSI C header files... yes
remote:        checking for sys/types.h... yes
remote:        checking for sys/stat.h... yes
remote:        checking for stdlib.h... yes
remote:        checking for string.h... yes
remote:        checking for memory.h... yes
remote:        checking for strings.h... yes
remote:        checking for inttypes.h... yes
remote:        checking for stdint.h... yes
remote:        checking for unistd.h... yes
remote:        checking sys/time.h usability... yes
remote:        checking sys/time.h presence... yes
remote:        checking for sys/time.h... yes
remote:        checking time.h usability... yes
remote:        checking time.h presence... yes
remote:        checking for time.h... yes
remote:        checking windows.h usability... no
remote:        checking windows.h presence... no
remote:        checking for windows.h... no
remote:        checking for inttypes.h... (cached) yes
remote:        checking whether byte ordering is bigendian... no
remote:        checking for unsigned long long... yes
remote:        checking size of unsigned long long... 8
remote:        configure: creating ./config.status
remote:        config.status: creating src/config.h
remote:        config.status: src/config.h is unchanged
remote:        ** libs
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL1024a.c -o WELL1024a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL1024b.c -o WELL1024b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL19937a.c -o WELL19937a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL19937b.c -o WELL19937b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL19937c.c -o WELL19937c.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL21701a.c -o WELL21701a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL23209a.c -o WELL23209a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL23209b.c -o WELL23209b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL44497a.c -o WELL44497a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL44497b.c -o WELL44497b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL512a.c -o WELL512a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL521a.c -o WELL521a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL521b.c -o WELL521b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL607a.c -o WELL607a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL607b.c -o WELL607b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL800a.c -o WELL800a.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c WELL800b.c -o WELL800b.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
remote:        gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rngWELL.c -o rngWELL.o
remote:        In file included from locale.h:58:0,
remote:                         from rngWELL.h:60,
remote:                         from rngWELL.c:55:
remote:        rngWELL.c: In function ‘doWELL’:
remote:        locale.h:59:19: error: ‘LC_MESSAGES’ undeclared (first use in this function)
remote:         #define _(String) dgettext ("rngWELL", String)
remote:                           ^
remote:        rngWELL.c:77:15: note: in expansion of macro ‘_’
remote:                 error(_("invalid argument"));
remote:                       ^

AND THEN A BUNCH OF SIMILAR ERRORS

После отката на Кедр-14 все снова стало нормально.

Есть идеи, что здесь может происходить?


person Matt Fordham    schedule 23.07.2019    source источник
comment
Это дикая догадка, но стоит попробовать. Я думаю, что что-то пытается использовать переменную среды LC_MESSAGES, но не может ее найти. Интересно, может ли помочь что-то вроде Sys.setenv(LC_MESSAGES ="en_US.UTF-8") в начале init.R?   -  person stevec    schedule 02.08.2019


Ответы (1)


та же проблема была отправлена ​​в гитхабе разработчиков. Кажется, это было исправлено в 2015 году. Пожалуйста, убедитесь, что пакет обновлен. Также учтите, что, возможно, сопровождающий еще не выпустил версию Heroku, которая подходит для новейшей версии R.

Лучший,

Эли

person Elie Ker Arno    schedule 01.08.2019