You are not logged in.

#1 2014-09-08 15:17:32

rogorido
Member
Registered: 2009-08-17
Posts: 111

[SOLVED] Can't compile R package depending on java

I can not compile R packages (like xlsx) which depend on rJava (another R package). Some weeks ago I had no problems.

If I try to compile rJava inside of R I get:

checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/lib/jvm/java-7-openjdk/jre/bin/java'
archiver    : '/usr/lib/jvm/java-7-openjdk/bin/jar'
compiler    : '/usr/lib/jvm/java-7-openjdk/bin/javac'
header prep.: '/usr/lib/jvm/java-7-openjdk/bin/javah'
cpp flags   : '-I/usr/lib/jvm/java-7-openjdk/include -I/usr/lib/jvm/java-7-openjdk/include/linux'
java libs   : '-L/usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... yes
checking whether -Xrs is supported... yes
checking whether JNI programs can be compiled... yes
checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to fix this.
ERROR: configuration failed for package ‘rJava’

Any idea?

Last edited by rogorido (2014-09-08 16:10:15)

Offline

#2 2014-09-08 16:09:59

rogorido
Member
Registered: 2009-08-17
Posts: 111

Re: [SOLVED] Can't compile R package depending on java

I answer myself. The problem is not only archlinux-related[1]. A solution (or workaround) is to write

unset JAVA_HOME

before starting R. Then you can compile rJava.

[1] http://stackoverflow.com/questions/3311 … iling?rq=1

Offline

Board footer

Powered by FluxBB