Re: [R] Installing rJava fails

2011-03-24 Thread jcheng liu
Dear Orvalho Augusto,

Thanks for your response. But we met a new problem. We set as waht you said
in the last email and run installing agian. But we got the error:
rJava.h:22:17: error: jni.h: No such file or directory.
Actually we had found jni.h under {JAVA_HOME}/../include and the path had
been set in JNI linker flags. So we so confuded.

Thanks,
Jiacheng

The below is the detail information.


commandline $ R CMD INSTALL rJava_0.9-0.tar.gz

output:

* installing to library
‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
* installing *source* package ‘rJava’ ...
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux'
java libs   : '-L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
-L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
-L/lib64 -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled... yes
checking JNI data types... ok
checking whether JRI should be compiled (autodetect)... no
checking whether debugging output should be enabled... no
checking whether memory profiling is desired... no
checking whether threads support is requested... no
checking whether callbacks support is requested... no
checking whether JNI cache support is requested... no
checking whether JRI is requested... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
** libs
gcc -std=gnu99
-I/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/include -I.
-I/usr/java/jre1.6.0_24/../include -I/usr/java/jre1.6.0_24/../include/linux
-I/usr/local/include-fpic  -g -O2 -c Rglue.c -o Rglue.o
In file included from Rglue.c:2:
rJava.h:22:17: error: jni.h: No such file or directory
In file included from Rglue.c:2:
rJava.h:123: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:126: error: expected ‘)’ before ‘*’ token
rJava.h:127: error: expected ‘)’ before ‘*’ token
rJava.h:129: warning: parameter names (without types) in function
declaration
rJava.h:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘getSimpleClassNames’
rJava.h:131: warning: parameter names (without types) in function
declaration
rJava.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaStringClass’
rJava.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaObjectClass’
rJava.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaClassClass’
rJava.h:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaFieldClass’
rJava.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘rj_RJavaTools_Class’
rJava.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_forName’
rJava.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getName’
rJava.h:146: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSimpleName’
rJava.h:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSuperclass’
rJava.h:148: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getType’
rJava.h:149: error: expected ‘=’, 

[R] Installing rJava fails

2011-03-18 Thread jcheng liu
Dear all,
Installing rJava fails. The message was listed below. I wonder why cpp flag
could not be detected, although I had installed. Thanks!!!
-Jiacheng

R CMD INSTALL rJava_0.9-0.tar.gz
* installing to library
‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
* installing *source* package ‘rJava’ ...
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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   : ''
java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
-L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
-ljvm'
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’
* removing ‘/R-2.12.0/library/rJava’

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or
you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman


On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote:

 Dear all,
 Installing rJava fails. The message was listed below. I wonder why cpp flag
 could not be detected, although I had installed. Thanks!!!
 -Jiacheng

 R CMD INSTALL rJava_0.9-0.tar.gz
 * installing to library
 ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 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   : ''
 java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
 -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 configure: error: One or more Java configuration variables are not set.
 Make sure R is configured with full Java support (including JDK). Run
 R CMD javareconf
 as root to add Java support to R.

 If you don't have root privileges, run
 R CMD javareconf -e
 to set all Java-related variables and then install rJava.

 ERROR: configuration failed for package ‘rJava’
 * removing ‘/R-2.12.0/library/rJava’

[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Installing rJava fails

2011-03-18 Thread jcheng liu
 Dear Orvalho Augusto,
Thank so much for you response!
We had run R CMD javareconf -e, and even R CMD javareconf in administrator.
Actually, we had install the JDK. And in the output, only the item of JNI
cpp flages could not be detected(I listed output below). What does the item
mean? What need we install?

Thanks,
Jiacheng

R CMD javareconf -e

Java interpreter : /usr/bin/java
Java version : 1.6.0_24
Java home path   : /usr/java/jre1.6.0_24
Java compiler: /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
-L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
-L/lib64 -L/lib -L/usr/lib -ljvm
JNI cpp flags:

The following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Runnig: /bin/tcsh


On 3/18/2011 12:53 PM, Orvalho Augusto wrote:

Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or
you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman


 On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote:

 Dear all,
 Installing rJava fails. The message was listed below. I wonder why cpp flag
 could not be detected, although I had installed. Thanks!!!
 -Jiacheng

 R CMD INSTALL rJava_0.9-0.tar.gz
 * installing to library
 ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 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   : ''
 java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
 -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 configure: error: One or more Java configuration variables are not set.
 Make sure R is configured with full Java support (including JDK). Run
 R CMD javareconf
 as root to add Java support to R.

 If you don't have root privileges, run
 R CMD javareconf -e
 to set all Java-related variables and then install rJava.

 ERROR: configuration failed for package ‘rJava’
 * removing ‘/R-2.12.0/library/rJava’

[[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
It seems that you are not alone with that error  (
http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing).

Defining only JAVA_HOME he would find everything else.

Backup your /etc/R before do this.

Running the R CMD javareconf is to place variables like this in
/etc/R/Makeconf (hope the experts corect me)
JAR = /usr/bin/jar
JAVA = /usr/bin/java
JAVAC = /usr/bin/javac
JAVAH = /usr/bin/javah
JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.24/jre
JAVA_LD_LIBRARY_PATH =
$(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
JAVA_LIBS = -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386
-L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib
-ljvm
JAVA_CPPFLAGS = -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux

Add it manually. Pay attention the amd64 versus my i386. Place on variable
sections

Edit /etc/R/ldpahs place before if test -n...
: ${JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre}
:
${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/i386/server:${JAVA_HOME}/lib/i386:${JAVA_HOME}/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib}

Again correct with your paths.

And try to install rJava.

Caveman


On Fri, Mar 18, 2011 at 7:30 PM, jcheng liu jcheng@gmail.com wrote:

  Dear Orvalho Augusto,
 Thank so much for you response!
 We had run R CMD javareconf -e, and even R CMD javareconf in administrator.

 Actually, we had install the JDK. And in the output, only the item of JNI
 cpp flages could not be detected(I listed output below). What does the item
 mean? What need we install?

 Thanks,
 Jiacheng

 R CMD javareconf -e

 Java interpreter : /usr/bin/java
 Java version : 1.6.0_24
 Java home path   : /usr/java/jre1.6.0_24
 Java compiler: /usr/bin/javac
 Java headers gen.: /usr/bin/javah
 Java archive tool: /usr/bin/jar
 Java library path:
 $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
 JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
 -L/lib64 -L/lib -L/usr/lib -ljvm
 JNI cpp flags:

 The following Java variables have been exported:
 JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
 Runnig: /bin/tcsh



 On 3/18/2011 12:53 PM, Orvalho Augusto wrote:

 Run
 R CMD javareconf -e

 as the being suggest by the output. That will try to guess where is Java.
 Or you can install the JDK_HOME and JAVA_HOME variables.

 Good luck.
 Caveman


  On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote:

 Dear all,
 Installing rJava fails. The message was listed below. I wonder why cpp
 flag
 could not be detected, although I had installed. Thanks!!!
 -Jiacheng

 R CMD INSTALL rJava_0.9-0.tar.gz
 * installing to library
 ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 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   : ''
 java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
 -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 configure: error: One or more Java configuration variables are not set.
 Make 

[R] Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error

2010-08-13 Thread Anthony Staines
Installing rJava fails consistently, whether installed via
the command line as below, or through install.packages(
'rJava' ), and whether 0.84 or 0.85 is used, with the
message :-
checking JNI data types... configure: error: One or more
JNI types differ from the corresponding native type. You may
need to use non-standard compiler flags or a different
compiler in order to fix this.

I've tried to fix it using suggestions from the r-help list,
and the Gentoo java documentation, but had no joy so far.
Other Java stuff works fine on this box.

# R CMD INSTALL rJava_0.8-5.tar.gz
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rJava’ ...
checking for gcc... x86_64-pc-linux-gnu-gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc -std=gnu99 accepts
-g... yes
checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to
accept ISO C89... none needed
checking how to run the C preprocessor...
x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-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:
'/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags   : '-I/opt/sun-jdk-1.6.0.20/jre/../include
-I/opt/sun-jdk-1.6.0.20/jre/../include/linux'
java libs   : '-L/opt/sun-jdk-1.6.0.20/jre/lib/amd64/server
-L/opt/sun-jdk-1.6.0.20/jre/lib/amd64
-L/opt/sun-jdk-1.6.0.20/jre/../lib/amd64 -L
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib
-L/usr/lib -ljvm'
checking whether JNI programs can be compiled... yes
checking JNI data types... configure: error: One or more JNI
types differ from the corresponding native type. You may
need to use non-standard compiler flags or a different
compiler in order to fix this.
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/lib64/R/library/rJava’


# R --version
R version 2.11.1 (2010-05-31)

# java -showversion
java version 1.6.0_20
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed  mode)

The compiler mentioned in the R output :-
/home/astaines/.gentoo/java-config-2/current-user-vm
is a link pointing to
/usr/lib/jvm/sun-jdk-1.6
which in turn is a link pointing to
/opt/sun-jdk-1.6.0.20
however, any of the three will work.

# R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version : 1.6.0_20
Java home path   : /opt/sun-jdk-1.6.0.20/jre
Java compiler:
/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server
-L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib
-L/usr/lib -ljvm
JNI cpp flags: -I$(JAVA_HOME)/../include
-I$(JAVA_HOME)/../include/linux

Updating Java configuration in /usr/lib64/R
Done.

JAVA_HOME is unset by default on my system. As suggested, by
Godmar Back, on the list I've tried setting it. The Gentoo
way is to use
JAVA_HOME=$(java-config --jdk-home)
and this produces what I think is the desired result
#printenv | grep -i JAVA_HOME
JAVA_HOME=/opt/sun-jdk-1.6.0.20

BUT

# env JAVA_HOME=/opt/sun-jdk-1.6.0.20/ R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version : 1.6.0_20
Java home path   : /opt/sun-jdk-1.6.0.20/jre
Java compiler:
/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac
Java headers gen.: