[R-sig-Debian] r-cran-rjava dependencies on debian jesse, library(rJava) fails when default-jre is missing

Dirk Eddelbuettel edd at debian.org
Wed May 17 12:54:36 CEST 2017


On 17 May 2017 at 08:46, Vaidotas Zemlys wrote:
| Hi,
| 
| > Le 17 mai 2017 à 00:42, Dirk Eddelbuettel <edd at debian.org> a écrit :
| > 
| > 
| > On 8 May 2017 at 15:39, Vaidotas Zemlys wrote:
| > | Hi,
| > | 
| > | Dirk Eddelbuettel advised me to write here. Here is my original letter to him:
| > | 
| > | I would like to enquire about package r-cran-rjava on Debian jesse. It seems that if default-jre package is not installed, but openjdk-7-jre is installed, then library(rJava) in R fails. I’ve been bitten by this today and I wonder whether this an issue of mine, or is this a possible bug. 
| > | 
| > | My server admin used apt-get update and apt-get upgrade today and R started throwing an error that it cannot find libjvm.so, when trying to do library(rJava). At first I thought that this is a problem of setting JAVA_HOME, and setting it to JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 before starting R seemed to solve the problem. But this setting was ignored by shiny-server, so I spent some time figuring out how to force shiny-server to respect it. Only after repeated failure I’ve noticed that LD_LIBRARY_PATH in Sys.getenv() points to /usr/lib/jvm/default-java/jre/lib/amd64/server and there was no directory /usr/lib/jvm/default-java/ in the system. Then I found out that this library is provided by default-jre and when it was installed everything start to work. Then I investigated further and found that this package is only optional for r-cran-rjava. Hence the question.
| > | 
| > | 
| > | Here is my configuration:
| > | 
| > | > lsb_release -a
| > | No LSB modules are available.
| > | Distributor ID:	Debian
| > | Description:	Debian GNU/Linux 8.8 (jessie)
| > | Release:	8.8
| > | Codename:	jessie
| > | 
| > | 
| > | dpkg -l with relevant packages:
| > | 
| > | Desired=Unknown/Install/Remove/Purge/Hold
| > | | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
| > | |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
| > | ||/ Name                              Version               Architecture          Description
| > | +++-=================================-=====================-=====================-========================================================================
| > | ii  r-cran-rjava                      0.9-6-3               amd64                 GNU R low-level interface to Java
| > | ii  r-base                            3.3.3-1~jessiecran.0  all                   GNU R statistical computation and graphics system
| > | ii  openjdk-7-jre:amd64                7u121-2.6.8-2~deb8u1               amd64        OpenJDK Java runtime, using Hotspot JIT
| > | ii  openjdk-7-jre-headless:amd64       7u121-2.6.8-2~deb8u1               amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
| > | 
| > | Sorry for bothering if this is an issue from my side. 
| > 
| > You have the ‘jre', you need the 'jdk'.
| > 
| 
| But the r-cran-rjava Depends: do not mention that. Of course having packages openjdk-7-jre and openjdk-7-jdk is not at all confusing, but that is Java.

I hear you but the 'jdk' is the build-depends, and needed when you want to
build other packages. The 'jre' is the smaller minimal set needed to only run
code. At least that was the idea, and at some point it worked.  Maybe I need
to enlarge the Depends to use the jdk.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-SIG-Debian mailing list