Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Hi Emmanuel, On 20 May 2015 at 17:00, Emmanuel Bourg wrote: | Control: reassign -1 r-base | Control: tags -1 patch | Control: affects -1 rjava | | Hi Dirk, | | I looked at this issue again and I think this could be trivially fixed | with the patch attached (applied to r-base and not rjava). With this | modification rjava properly uses the default JDK in | /usr/lib/jvm/default-java instead of /usr/lib/jvm/java-7-openjdk-, | making the rjava build resilient to any future change in the default JDK. That looks like a good idea in case someone has several Java packages installed. I'll apply this. Thank you! Dirk | Emmanuel Bourg | | x[DELETED ATTACHMENT fix-java-home.patch, plain text] -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Control: reassign -1 r-base Control: tags -1 patch Control: affects -1 rjava Hi Dirk, I looked at this issue again and I think this could be trivially fixed with the patch attached (applied to r-base and not rjava). With this modification rjava properly uses the default JDK in /usr/lib/jvm/default-java instead of /usr/lib/jvm/java-7-openjdk-, making the rjava build resilient to any future change in the default JDK. Emmanuel Bourg >From 13f4fd164bf8355a4d63cd6da8270638731677d9 Mon Sep 17 00:00:00 2001 From: Emmanuel Bourg Date: Wed, 20 May 2015 16:48:18 +0200 Subject: [PATCH] Set JAVA_HOME to always use the defaut JDK (Closes: #745098) --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index 9be87b1..82c35fa 100755 --- a/debian/rules +++ b/debian/rules @@ -240,6 +240,7 @@ configure-stamp: R_BROWSER=xdg-open \ PAGER=/usr/bin/pager\ PERL=/usr/bin/perl \ + JAVA_HOME=/usr/lib/jvm/default-java \ R_UNZIPCMD=/usr/bin/unzip \ R_ZIPCMD=/usr/bin/zip \ R_PRINTCMD=/usr/bin/lpr \ -- 2.1.4
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Hi Emmanuel, On 15 August 2014 at 22:56, Emmanuel Bourg wrote: | Le 14/08/2014 14:46, Dirk Eddelbuettel a écrit : | | > Sorry if I missed something ere, and I rushed the email out as I am on my way | > out of the door. | | Ok, let me recap. | | r-base build depends on default-jdk. Today default-jdk is an alias for | openjdk-7-jdk, it installs a symlink from /usr/lib/jvm/default-java to | /usr/lib/jvm/java-7-openjdk-amd64. r-base keeps the path to openjdk-7 in On amd64, possibly a different symlink on other arches. Having the indirection is usually a good thing. | its configuration (/usr/lib/jvm/java-7-openjdk-amd64), instead of | /usr/lib/jvm/default-java, and this path is used to build rJava. | | The issue arises when the default-jdk package is updated and points to | the next version of Java. Since rjava build depends on default-jdk, it Right. Usually we get a 'call' to rebuild. | pulls openjdk-8-jdk, but the r-base configuration still points to | /usr/lib/jvm/java-7-openjdk-amd64. Since openjdk-7 hasn't been installed | the build fails. | | I think there is an inconsistency, because if you build depend on | default-jdk you should use /usr/lib/jvm/default-java. And if you need | /usr/lib/jvm/java-7-openjdk-amd64 you should build depend on openjdk-7-jdk. | | I see 3 possible solutions: | | 1. Change r-base to keep the path to /usr/lib/jvm/default-java in its | configuration instead of /usr/lib/jvm/java-7-openjdk-amd64. This fixes | the issue once and for all. | | 2. Change r-base and rjava to build depend on openjdk-7-jdk instead of | default-jdk. They'll have to be updated again later to build depend on | openjdk-8. | | 3. Wait until OpenJDK 8 becomes the default version of Java in Debian | and rebuild r-base and rjava. But the issue will reappear when we | transition to openjdk-9. Good list and discussion, thanks for that. | Which solution do you prefer? I'd would prefer to keep it simple and go with 3. In the past we had explicitly named Depends, and I did get bug reports asking to renamed to the more indirect 'default-$foo' style packages. I still think that is best. Java major versions do not change that much. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Le 14/08/2014 14:46, Dirk Eddelbuettel a écrit : > Sorry if I missed something ere, and I rushed the email out as I am on my way > out of the door. Ok, let me recap. r-base build depends on default-jdk. Today default-jdk is an alias for openjdk-7-jdk, it installs a symlink from /usr/lib/jvm/default-java to /usr/lib/jvm/java-7-openjdk-amd64. r-base keeps the path to openjdk-7 in its configuration (/usr/lib/jvm/java-7-openjdk-amd64), instead of /usr/lib/jvm/default-java, and this path is used to build rJava. The issue arises when the default-jdk package is updated and points to the next version of Java. Since rjava build depends on default-jdk, it pulls openjdk-8-jdk, but the r-base configuration still points to /usr/lib/jvm/java-7-openjdk-amd64. Since openjdk-7 hasn't been installed the build fails. I think there is an inconsistency, because if you build depend on default-jdk you should use /usr/lib/jvm/default-java. And if you need /usr/lib/jvm/java-7-openjdk-amd64 you should build depend on openjdk-7-jdk. I see 3 possible solutions: 1. Change r-base to keep the path to /usr/lib/jvm/default-java in its configuration instead of /usr/lib/jvm/java-7-openjdk-amd64. This fixes the issue once and for all. 2. Change r-base and rjava to build depend on openjdk-7-jdk instead of default-jdk. They'll have to be updated again later to build depend on openjdk-8. 3. Wait until OpenJDK 8 becomes the default version of Java in Debian and rebuild r-base and rjava. But the issue will reappear when we transition to openjdk-9. Which solution do you prefer? Emmanuel Bourg -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
On 14 August 2014 at 14:20, Emmanuel Bourg wrote: | Le 14/08/2014 13:58, Dirk Eddelbuettel a écrit : | | > We really need / want a JDK as rJava is often used to /program/ with Java, | > not just to run. | | I don't know R so I may be missing something, but if you depend on When R is built ("configure" is run) it analyses all that, and stores the information in its Makeconf which I symlink into /etc/R/ -- have a look. | default-jdk you do get a full JDK and not just a JRE. When you install | default-jdk you get a JDK under /usr/lib/jvm/default-java (which is | actually a symlink to /usr/lib/jvm/java-7-openjdk-amd64). Err, yes. I said I want a JDK, I do get a JDK, and you are telling me I get a JDK. But I knew that. I must be missing your point. I have been over this a lot when rJava was first packaged maybe a decade ago and it was a HUGE pain in the arse to get everything right (as Java is complex, and hard to package). It works now. I have no interest in changing it. As I pointed out earlier, one of the reason of rJava (and the JDK) is that people can install __other__ R and Java-using packages __from source__ for which a JDK is needed. To recap: I want the Depends to express the need for JDK. We get a JDK. Feature, not bug. Sorry if I missed something ere, and I rushed the email out as I am on my way out of the door. Dirk | | Emmanuel Bourg | | x[DELETED ATTACHMENT signature.asc, application/pgp-signature] -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Le 14/08/2014 13:58, Dirk Eddelbuettel a écrit : > We really need / want a JDK as rJava is often used to /program/ with Java, > not just to run. I don't know R so I may be missing something, but if you depend on default-jdk you do get a full JDK and not just a JRE. When you install default-jdk you get a JDK under /usr/lib/jvm/default-java (which is actually a symlink to /usr/lib/jvm/java-7-openjdk-amd64). Emmanuel Bourg signature.asc Description: OpenPGP digital signature
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Emmanuel, On 9 August 2014 at 23:52, Emmanuel Bourg wrote: | Hi Dirk, | | As I understand the default R configuration contains the path to Java 7: | | ebourg@icare:~$ R CMD config JAVA_CPPFLAGS | -I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include | | Would it be possible to change the default configuration and use the | path to the default JRE instead (/usr/lib/jvm/default-java) ? Thus rjava | would always build even if the default JRE changes. We really need / want a JDK as rJava is often used to /program/ with Java, not just to run. Dirk | Emmanuel Bourg | | | x[DELETED ATTACHMENT signature.asc, application/pgp-signature] -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Hi Dirk, As I understand the default R configuration contains the path to Java 7: ebourg@icare:~$ R CMD config JAVA_CPPFLAGS -I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include Would it be possible to change the default configuration and use the path to the default JRE instead (/usr/lib/jvm/default-java) ? Thus rjava would always build even if the default JRE changes. Emmanuel Bourg signature.asc Description: OpenPGP digital signature
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
On 18 April 2014 at 00:31, Emmanuel Bourg wrote: | Source: rjava | Version: 0.9-6-1 | Severity: important | User: debian-j...@lists.debian.org | Usertags: openjdk-8-transition | | Hi, | | During a rebuild of all Java packages in sid with OpenJDK 8, | your package failed to build with the following error: | | checking for gcc... gcc -std=gnu99 | checking whether the C compiler works... yes | checking for C compiler default output file name... a.out | checking for suffix of executables... | checking whether we are cross compiling... no | checking for suffix of object files... o | checking whether we are using the GNU C compiler... yes | checking whether gcc -std=gnu99 accepts -g... yes | checking for gcc -std=gnu99 option to accept ISO C89... none needed | checking how to run the C preprocessor... gcc -std=gnu99 -E | checking for grep that handles long lines and -e... /bin/grep | checking for egrep... /bin/grep -E | checking for ANSI C header files... yes | checking for sys/wait.h that is POSIX.1 compatible... yes | checking for sys/types.h... yes | checking for sys/stat.h... yes | checking for stdlib.h... yes | checking for string.h... yes | checking for memory.h... yes | checking for strings.h... yes | checking for inttypes.h... yes | checking for stdint.h... yes | checking for unistd.h... yes | checking for string.h... (cached) yes | checking sys/time.h usability... yes | checking sys/time.h presence... yes | checking for sys/time.h... yes | checking for unistd.h... (cached) yes | checking for an ANSI C-conforming const... yes | checking whether time.h and sys/time.h may both be included... yes | configure: checking whether gcc -std=gnu99 supports static inline... | yes | 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/bin/java' | archiver: '/usr/bin/jar' | compiler: '/usr/bin/javac' | header prep.: '/usr/bin/javah' | cpp flags : '-I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include' | java libs : '-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm' | checking whether Java run-time works... yes | checking whether -Xrs is supported... yes | configure: error: Cannot compile a simple JNI program. See config.log for details. | | Make sure you have Java Development Kit installed and correctly registered in R. | If in doubt, re-run "R CMD javareconf" as root. ^^^ It will probably once you do that, or if you rebuild R (which is called here) with Java8 instead of Java7. Dirk | ERROR: configuration failed for package 'rJava' | | | The full build log is available from: | http://87.98.165.193/debian/openjdk8-rebuild/logs-failed-jdk8/rjava_0.9-6-1_unstable_jdk8.log | | You can download OpenJDK 8 packages for testing here: | http://87.98.165.193/debian/openjdk-8u5-b13/ -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#745098: rjava: FTBFS with Java 8: configure: error: Cannot compile a simple JNI program
Source: rjava Version: 0.9-6-1 Severity: important User: debian-j...@lists.debian.org Usertags: openjdk-8-transition Hi, During a rebuild of all Java packages in sid with OpenJDK 8, your package failed to build with the following error: checking for gcc... gcc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc -std=gnu99 option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -std=gnu99 -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for string.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking for an ANSI C-conforming const... yes checking whether time.h and sys/time.h may both be included... yes configure: checking whether gcc -std=gnu99 supports static inline... yes 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/bin/java' archiver: '/usr/bin/jar' compiler: '/usr/bin/javac' header prep.: '/usr/bin/javah' cpp flags : '-I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include' java libs : '-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm' checking whether Java run-time works... yes checking whether -Xrs is supported... yes configure: error: Cannot compile a simple JNI program. See config.log for details. Make sure you have Java Development Kit installed and correctly registered in R. If in doubt, re-run "R CMD javareconf" as root. ERROR: configuration failed for package 'rJava' The full build log is available from: http://87.98.165.193/debian/openjdk8-rebuild/logs-failed-jdk8/rjava_0.9-6-1_unstable_jdk8.log You can download OpenJDK 8 packages for testing here: http://87.98.165.193/debian/openjdk-8u5-b13/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org