Problem: before upgrading, under Ubuntu14.04, I just installed the default JRE and JDK, and R 3.0.2 (the default for that rev of Ubuntu),and sucessfully ran R CMD javareconf
.
However, since upgrading to 14.10, and verifying I have the latest java7 JRE and JDK, trying to run the javareconf
fails with the following dump:
cellocgw@cellocgw-Studio-1747:~$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.7.0_65
Java home path : /usr/lib/jvm/java-7-openjdk-amd64/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
trying to compile and link a JNI progam
detected JNI cpp flags : -I$(JAVA_HOME)/../include
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o
In file included from conftest.c:1:0:
/usr/lib/jvm/java-7-openjdk-amd64/jre/../include/jni.h:39:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
/usr/lib/R/etc/Makeconf:133: recipe for target 'conftest.o' failed
make: *** [conftest.o] Error 1
Unable to compile a JNI program
JAVA_HOME : /usr/lib/jvm/java-7-openjdk-amd64/jre
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /usr/lib/R
Done.
Something is not installed or isn't where it "should" be. I've tried most of the tricks listed at similar questions (doing updates and the like), but so far I haven't found a question where the stdio.h
file missing was the error message.
<stdio.h>
standard C library header, then that would require thelibc6-dev
package I thinkstdio.h
file right in the current../include
directory