Issue——compile C code in R

  • I met the following problem when I try to install R package expm:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
* installing *source* package ‘expm’ ...
** package ‘expm’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/app/vendor/R/lib/R/include -DNDEBUG -I/usr/local/include -fpic -g -O2 -c R_dgebal.c -o R_dgebal.o
In file included from locale.h:4:0,
from expm.h:10,
from R_dgebal.c:4:
R_dgebal.c: In function ‘ebal_type’:
locale.h:5:19: error: ‘LC_MESSAGES’ undeclared (first use in this function)
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:11:8: note: in expansion of macro ‘_’
error(_("argument type='%s' must be a character string of string length 1"),
^
locale.h:5:19: note: each undeclared identifier is reported only once for each function it appears in
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:11:8: note: in expansion of macro ‘_’
error(_("argument type='%s' must be a character string of string length 1"),
^
R_dgebal.c: In function ‘R_dgebal’:
locale.h:5:19: error: ‘LC_MESSAGES’ undeclared (first use in this function)
#define _(String) dgettext ("expm", String)
^
R_dgebal.c:28:8: note: in expansion of macro ‘_’
error(_("invalid 'x': not a numeric (classical R) matrix"));
^
make: *** [R_dgebal.o] Error 1
ERROR: compilation failed for package ‘expm’
* removing ‘/app/vendor/R/lib/R/library/expm’
ERROR: dependency ‘expm’ is not available for package ‘msm’
* removing ‘/app/vendor/R/lib/R/library/msm’
ERROR: dependency ‘msm’ is not available for package ‘ltm’
* removing ‘/app/vendor/R/lib/R/library/ltm’
Donate