3

When installing rJava, the install completes successfully, but there are loads and loads of warnings in the process. This is the first one:

jri_glue.c: In function ‘PushToREXP’:
jri_glue.c:24:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   jpar[1].j = (jlong) robj;
           ^
jri_glue.c: In function ‘RReleaseREXP’:
jri_glue.c:52:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  SEXP x = (SEXP) r;
           ^

This is the second block of warnings:

warning: [options] bootstrap class path not set in conjunction with -source 1.4
warning: [options] source value 1.4 is obsolete and will be removed in a future release
warning: [options] target value 1.4 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
4 warnings

Here are the first lines of the third block of warnings, which in total contains almost 500 lines:

In file included from Rengine.c:4:0:
Rengine.c: In function ‘Java_org_rosuda_JRI_Rengine_rniParse’:
jri.h:21:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 #define SEXP2L(s) ((jlong)(s))
                    ^
Rengine.c:121:14: note: in expansion of macro ‘SEXP2L’
       return SEXP2L(pstr);
              ^

The reason why I think there is a problem is the following: When I try to install another package that depends on rJava, namely XLConnectJars, I get a segmentation fault:

> install.packages("XLConnectJars")
[...]
* installing *source* package ‘XLConnectJars’ ...
** Paket ‘XLConnectJars’ erfolgreich entpackt und MD5 Summen überprüft
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed

Why is this happening, what can I do about this?

In June / July 2017, similar problems appeared after the update to kernel 4.4.0-81-generic, but the kernel has since been patched:

https://github.com/miraisolutions/xlconnect/issues/70

(My current kernel is 4.10.0-35-generic.)

Also, the suggested workarounds there and in related threads (like increasing the thread stack size using the -Xss2048k option) do not work on my machine.

Installing rJava via sudo apt-get install r-cran-rjava as suggested in numerous places did not help, either.

My java version is

~$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK Server VM (build 25.131-b11, mixed mode)

and sessionInfo() returns

R version 3.4.2 (2017-09-28)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 16.04.3 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=de_DE.UTF-8       LC_NUMERIC=C              LC_TIME=de_DE.UTF-8       
 [4] LC_COLLATE=de_DE.UTF-8     LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=de_DE.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] rJava_0.9-8

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

Thanks for any help.

geeeero
  • 31
  • 3

0 Answers0