Fedora Account System
Red Hat Associate
Red Hat Customer
This is very strange: since the latest update, if I install an R package compiled against the openjdk in a clean system, it fails to load because it doesn't find libjvm.so. Reporting against the openjdk because nothing has changed in the R spec, and reporting against rawhide because it fails for all versions. Steps to reproduce, e.g., with Fedora 34: $ podman run fedora:34 $ dnf install 'dnf-command(copr)' $ dnf copr enable iucar/cran $ dnf install R-CRAN-rJava $ Rscript -e 'library(rJava)' 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/local/lib/R/library/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory Execution halted Interestingly enough, $ dnf install R-java $ Rscript -e 'library(rJava)' and the package loads correctly. Even more interestingly, $ dnf uninstall R-java $ Rscript -e 'library(rJava)' and the package still loads correctly. So my guess is that the installation of R-java (which, please note, is an *empty* package) triggers something that should be triggered when Java is installed.
Adding @spot to the CC. Maybe the R spec is doing something wrong, but this used to work. Simpler example: $ podman run --rm -it fedora:32 # dnf -y install R # ll $(R CMD config JAVA_HOME) lrwxrwxrwx. 1 root root 21 Oct 29 13:31 /usr/lib/jvm/jre -> /etc/alternatives/jre However, since F33 on (so I suspect this is since some recent Java 11 update): $ podman run --rm -it fedora:33 # dnf -y install R # ll $(R CMD config JAVA_HOME) ls: cannot access '/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-0.fc33.x86_64': No such file or directory Wrong path. The R spec uses %{_jvmdir} in %post to set the proper paths: https://src.fedoraproject.org/rpms/R/blob/rawhide/f/R.spec#_861. So apparently %{_jvmdir} takes a wrong path?
I found the issue. Alternatives creation was moved to posttrans: - https://src.fedoraproject.org/rpms/java-11-openjdk/blob/rawhide/f/java-11-openjdk.spec#_2503 - https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/blob/rawhide/f/java-1.8.0-openjdk.spec#_2674 So the call to javareconf must be moved to posttrans too. Issue moved to the R component.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
This was fixed in https://src.fedoraproject.org/rpms/R/pull-request/6