On 19 October 2017 at 15:47, Simon Urbanek wrote:
| R CMD javareconf is always needed to register Java support with R (on all 
unix platforms).

s/always/sometimes/

The values get encoded when I build R binaries.  For many years now, that was
good enough. 

| Like I said, I don't know what deb packages do here -

'R CMD INSTALL sourceTarball_1.2-3.tar.gz  -- what else do you think I do?

| I presume you must do something in your R binary and all I can presume is 
that whatever the setup is then doesn't match what's there now.

500+ CRAN packages packaged _exactly_ this.  rJava is a little different (for
an understandable reason; RInside is different too).

So ... tried that, still no luck:

---
[...]
R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version     : 9-Debian
Java home path   : /usr/lib/jvm/java-9-openjdk-amd64
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/server -ljvm
make[1]: Entering directory '/tmp/Rjavareconf.e0Jzrq'
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG 
-I/usr/lib/jvm/java-9-openjdk-amd64/include 
-I/usr/lib/jvm/java-9-openjdk-amd64/include/linux     -fpic  -g -O2 
-fdebug-prefix-map=/build/r-base-3.4.2=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o 
conftest.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o conftest.so conftest.o 
-L/usr/lib/jvm/java-9-openjdk-amd64/lib/server -ljvm -L/usr/lib/R/lib -lR
make[1]: Leaving directory '/tmp/Rjavareconf.e0Jzrq'


JAVA_HOME        : /usr/lib/jvm/java-9-openjdk-amd64
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /usr/lib/R
/usr/lib/R/bin/javareconf: 406: /usr/lib/R/bin/javareconf: cannot create 
/usr/lib/R/etc/Makeconf.new: Permission denied
*** cannot create /usr/lib/R/etc/Makeconf.new
*** Please run as root if required.
[...]
---

All this is running as root.  But /usr may be mounted read-only.

Dirk
| 
| Cheers,
| Simon
| 
| 
| > On Oct 18, 2017, at 9:50 PM, Dirk Eddelbuettel <e...@debian.org> wrote:
| > 
| > 
| > Simon,
| > 
| > On 18 October 2017 at 21:34, Simon Urbanek wrote:
| > | Dirk,
| > | 
| > | I don't have the details but this looks like as incorrect Java 
configuration in R - the Java home is obviously incomplete as it's missing 
bin/java and/or that path is wrong. Also I'm surprised to the the odd paths 
"/usr/lib/jvm/default-java/" since at least in my installations I see the 
actual JVM being used - but then I don't know how your package (or Debian?) 
abstracts the Java version mess.
| > 
| > This was vanilla 'openjdk-9-jdk' and nothing else.
| > 
| > Could I / should invoke 'R CMD javareconf' ?
| > 
| > Dirk
| > 
| > | Cheers,
| > | Simon
| > | 
| > | 
| > | > On Oct 17, 2017, at 10:24 PM, Dirk Eddelbuettel <e...@debian.org> wrote:
| > | > 
| > | > 
| > | > Simon,
| > | > 
| > | > With your new rJava_0.9-9 I tried this against Debian's openjdk-9-jdk 
-- but
| > | > with R 3.4.2 as built against openjdk-7 -- and it still fails:
| > | > 
| > | > 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/default-java/jre/bin/java'
| > | > archiver    : '/usr/lib/jvm/default-java/bin/jar'
| > | > compiler    : '/usr/lib/jvm/default-java/bin/javac'
| > | > header prep.: '/usr/lib/jvm/default-java/bin/javah'
| > | > cpp flags   : '-I/usr/lib/jvm/default-java/include 
-I/usr/lib/jvm/default-java/include/linux'
| > | > java libs   : '-L/usr/lib/jvm/default-java/jre/lib/amd64/server -ljvm'
| > | > checking whether Java run-time works... ./configure: line 3736: 
/usr/lib/jvm/default-java/jre/bin/java: No such file or directory
| > | > no
| > | > configure: error: Java interpreter 
'/usr/lib/jvm/default-java/jre/bin/java' does not work
| > | > ERROR: configuration failed for package 'rJava'
| > | > * removing 
'/build/rjava-0.9-9/debian/r-cran-rjava/usr/lib/R/site-library/rJava'
| > | > /usr/share/R/debian/r-cran.mk:101: recipe for target 'R_any_arch' failed
| > | > make: *** [R_any_arch] Error 1
| > | > dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
| > | > 
| > | > 
| > | > Any ideas?  I saw that r-devel got some changes related to javareconf.  
Do we
| > | > need to port that to r-patched?  Can you advise?
| > | > 
| > | > Many thanks,  Dirk
| > | > 
| > | > -- 
| > | > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| > | > 
| > | 
| > 
| > -- 
| > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| > 
| 

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

Reply via email to