[R] R-2.7.0 rJava installation failure on x86_64

2008-06-03 Thread Nathan Coulter
attempting to install rJava on R-2.7.0, x86_64 platform, config.log shows the
following error:


configure:3880: checking whether JNI programs can be compiled
configure:3898: gcc -m64 -std=gnu99 -o conftest -g -O2
-I/path/to/x86-64-linux/jdk-1.6.0_06/jre/../include   conftest.c
-L/path/to/x86-64-linux/jdk-1.6.0_06/jre/lib/amd64/server
-L/path/to/x86-64-linux/jdk-1.6.0_06/jre/lib/amd64
-L/path/to/x86-64-linux/jdk-1.6.0_06/jre/../lib/amd64 -L
-L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm 5
/path/to/x86-64-linux/bin/ld: skipping incompatible /usr/lib/libc.so 
when
searching for -lc /usr/lib/libc.a: could not read symbols: File format 
is
ambiguous collect2: ld returned 1 exit status


It looks like the command above could use /lib64/libc.so.6, but running R CMD
javareconf shows that JNI linker flags don't contain any entry similar to
'-L/lib64':


-bash-3.00$ /path/to/noarch/bin/statcomp R-2.7.0 CMD javareconf
Java interpreter : /path/to/x86-64-linux/bin/java
Java version : 1.6.0_06
Java home path   : /path/to/x86-64-linux/jdk-1.6.0_06/jre Java
compiler : /path/to/x86-64-linux/bin/javac
Java headers gen.: /path/to/x86-64-linux/bin/javah
Java archive tool: /path/to/x86-64-linux/bin/jar
Java library path:

$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/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/lib
-L/usr/lib -ljvm JNI cpp flags: -I$(JAVA_HOME)/../include


Suggests on the root of the problem or best workarounds?

-- 
Nathan

__
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] R-2.7.0 rJava installation failure on x86_64

2008-06-03 Thread Nathan Coulter
  From: Nathan Coulter
  
  It looks like the command above could use /lib64/libc.so.6, but running R 
 CMD
  javareconf shows that JNI linker flags don't contain any entry similar to
  '-L/lib64':

It turns out that /usr/lib64/libc.so is what is needed.  I was able to install
rJava after adding /usr/lib64 to the JAVA_LIBS and JAVA_LD_LIBRARY_PATH


env JAVA_LIBS='-L/path/to/x86-64/jdk-1.6.0_06/jre/lib/amd64/server 
-L/path/to/x86-64/jdk-1.6.0_06/jre/lib/amd64 
-L/path/to/x86-64/jdk-1.6.0_06/jre/../lib/amd64 -L 
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib -L/usr/lib -ljvm' 
JAVA_LD_LIBRARY_PATH='/path/to/x86-64/jdk-1.6.0_06/jre/lib/amd64/server:/path/to/x86-64/jdk-1.6.0_06/jre/lib/amd64:/path/to/x86-64/jdk-1.6.0_06/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib:/usr/lib'
 R-2.7.0 CMD javareconf


-- 
Nathan

__
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.