Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.jinit/.jpackage hangs #272

Closed
gdkrmr opened this issue Jul 21, 2021 · 2 comments
Closed

.jinit/.jpackage hangs #272

gdkrmr opened this issue Jul 21, 2021 · 2 comments

Comments

@gdkrmr
Copy link

gdkrmr commented Jul 21, 2021

On Manjaro calling .jinit() or .jpackage() make the R session hang with 100% CPU usage.

$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
$ R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 1.8.0_292
Java home path   : /usr/lib/jvm/java-8-openjdk/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
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/amd64/server -ljvm
gcc -I"/home/gkraemer/progs/R/R-4.1.0/include" -DNDEBUG -I/usr/lib/jvm/java-8-openjdk/jre/../include -I/usr/lib/jvm/java-8-openjdk/jre/../include/linux  -I/usr/local/include   -fpic  -g -O2 -flto -c conftest.c -o conftest.o
gcc -shared -g -O2 -flto -fpic -L/home/gkraemer/progs/R/R-4.1.0/lib -L/usr/local/lib64 -o conftest.so conftest.o -L/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/server -ljvm -L/home/gkraemer/progs/R/R-4.1.0/lib -lR


JAVA_HOME        : /usr/lib/jvm/java-8-openjdk/jre
Java library path: $(JAVA_HOME)/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
Updating Java configuration in /home/gkraemer/progs/R/R-4.1.0
Done.

I am coming from here: ifellows/ROSM#13

@gdkrmr
Copy link
Author

gdkrmr commented Jul 21, 2021

Solved it: I had JDK/JRE 1.8 installed and it had to be uninstalled, I also had to reinstall the current version (1.16). I didn't think this would be a problem, because the CRAN page[1] names version 1.2/1.4 as lower bounds. Maybe the lower bounds should be updated?

[1] https://cran.r-project.org/package=rJava

@gdkrmr gdkrmr closed this as completed Jul 21, 2021
@s-u
Copy link
Owner

s-u commented Jul 22, 2021

The requirements are true, apparently there was as issue in your installation, but given the lack of details in this report it is hard to give you any advice other that rJava definitely works with Java 1.8 as we have it deployed like that on many machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants