Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: In the file /usr/lib64/R/etc/ldpaths, : ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server} must be : ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/server because OpenJDK 8 and 11 don't have the amd64 sub dir. Version-Release number of selected component (if applicable): R-core-3.6.0-1.el7.x86_64 How reproducible: Every time Steps to Reproduce: 1. To to load the R Module rJava Actual results: It fails with: Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/usr/lib64/R/library/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory Expected results: That libjvm.so is found. Additional info: Workaround: modify /usr/lib64/R/etc/ldpaths via hand.
Hmmm. Do you have R-java installed? That should pull in a dependency on "java-headless". Looking at the java-1.8.0-openjdk-headless package from Centos 7 (OpenJDK 8): [spot@localhost sandbox]$ rpm -qlp java-1.8.0-openjdk-headless-1.8.0.242.b08-1.el7.x86_64.rpm |grep libjvm.so /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/lib/amd64/server/libjvm.so java-11-openjdk-headless is a different story. I believe the system default in EL7 is OpenJDK 8 though...
Hi, it looks like R-java is only an meta package, because it don't contains any files.
Yes, R-java used to have files, but modern R has made them obsolete. Now, it mostly serves as a way to split out the "optional" java dependencies, which of course, are only optional as long as you don't need to use Java with R. :)
Ok I understand, R-java will only deliver Java8 and when Java11 is needed, simple don't install R-java. Can /usr/lib64/R/etc/ldpaths so modified, to that the libjvm.so will searched in both paths? : ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server} and : ${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/amd64/server} I don't have very deep knowledge about the way R searching libs.
I think so. Is ${JAVA_HOME}/amd64/server correct though? I believe in OpenJDK 11+, the pathing is as you originally suggested, ${JAVA_HOME}/lib/server.
Hi Tom, no(my mistake). for Java 1.8.0: ${JAVA_HOME}/lib/amd64/server} ll /usr/lib/jvm/jre-1.8.0/lib/amd64/server/ insgesamt 38696 drwxr-xr-x. 2 root root 74 30. Apr 06:15 . drwxr-xr-x. 5 root root 4096 30. Apr 06:15 .. -r--r--r--. 1 root root 22347776 30. Apr 06:15 classes.jsa lrwxrwxrwx. 1 root root 13 30. Apr 06:15 libjsig.so -> ../libjsig.so -rwxr-xr-x. 1 root root 17265304 29. Apr 11:20 libjvm.so -rw-r--r--. 1 root root 1423 29. Apr 11:05 Xusage.txt And for Java 11: ${JAVA_HOME}/lib/server ll /usr/lib/jvm/jre-11/lib/server/ insgesamt 41448 drwxr-xr-x. 2 root root 74 30. Apr 06:15 . drwxr-xr-x. 7 root root 4096 30. Apr 06:15 .. -r--r--r--. 1 root root 18112512 30. Apr 06:15 classes.jsa -rwxr-xr-x. 1 root root 13752 29. Apr 11:22 libjsig.so -rwxr-xr-x. 1 root root 24302424 29. Apr 11:22 libjvm.so -rw-r--r--. 1 root root 1322 29. Apr 11:06 Xusage.txt
Okay, I'll amend the R CMD javareconf calls in the scriptlets (for both R-core and R-java*) to include %{_jvmdir}/jre/lib/server as an additional valid path. My plan is to just make this change in rawhide for now, but it will be inherited into the next R updates for EPEL8 and Fedora. We're not actually doing any additional R updates for EPEL7 because of the outdated toolchain.