[Rd] cannot load rJava in R
Lothar Rubusch
l.rubusch at web.de
Sat Apr 15 22:59:38 CEST 2006
Hi all!
I recently tried to install the rJava package on my notebook (Debian Etch / Kernel 2.6.15 / jdk 1.5.0-5 / R 2.2.1 / rJava ?? the repo one, have a look below). I compiled R myself with "--with-readline=no" and "--enable-R-shlib flags". Now, each time loading the library rJava I encouter the same error. I reinstalled several times (as root), always the same problem:
JNI_GetCreatedJavaVMs is undefined, isn't it?! I couldn't find anything to that problem so far..
What went wrong?
Do I have the recent repository for rJava?
How can I fix this?
Many thanks in advance!!
Lothar
[code]
drops R-2.2.1 # R
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1 (2005-12-20 r36812)
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages("rJava",contriburl="http://www.rosuda.org/R/")
trying URL 'http://www.rosuda.org/R//rJava_0.3-6.tar.gz'
Content type 'application/x-tar' length 60116 bytes
opened URL
==================================================
downloaded 58Kb
* Installing *source* package 'rJava' ...
checking for gcc... gcc
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 accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... 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
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for memset... yes
checking for mkdir... yes
checking for rmdir... yes
checking for select... yes
checking for socket... yes
checking endianess... intel-like
checking for java... /usr/bin/java
checking Java environment home... in /usr/local/java/current
checking for /usr/local/java/current/include/jni.h... yes
checking for /usr/local/java/current/include/./jni_md.h... no
checking for /usr/local/java/current/include/linux/jni_md.h... yes
checking whether JNI programs can be compiled... yes
checking JNI data types... ok
checking whether threads support 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 -I/usr/local/lib/R/include -I/usr/local/include -I/usr/local/java/current/include -I/usr/local/java/current/include/linux -fPIC -g -O2 -c callJNI.c -o callJNI.o
gcc -I/usr/local/lib/R/include -I/usr/local/include -I/usr/local/java/current/include -I/usr/local/java/current/include/linux -fPIC -g -O2 -c initJNI.c -o initJNI.o
gcc -I/usr/local/lib/R/include -I/usr/local/include -I/usr/local/java/current/include -I/usr/local/java/current/include/linux -fPIC -g -O2 -c Rglue.c -o Rglue.o
gcc -I/usr/local/lib/R/include -I/usr/local/include -I/usr/local/java/current/include -I/usr/local/java/current/include/linux -fPIC -g -O2 -c rJava.c -o rJava.o
gcc -shared -L/usr/local/lib -o rJava.so callJNI.o initJNI.o Rglue.o rJava.o -L -ljvm -L/usr/local/lib/R/lib -lR
** R
** help
>>> Building/Updating help pages for package 'rJava'
Formats: text html latex example
accessOp text html latex example
jarray text html latex example
jarrayRef-class text html latex
jcall text html latex example
jcast text html latex example
jfloat-class text html latex
jfloat text html latex
jinit text html latex example
jnew text html latex example
jnull text html latex example
jobjRef-class text html latex
jreflection text html latex example
print text html latex
** building package indices ...
* DONE (rJava)
The downloaded packages are in
/tmp/RtmptQkoVL/downloaded_packages
> library(rJava)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/usr/local/lib/R/library/rJava/libs/rJava.so':
/usr/local/lib/R/library/rJava/libs/rJava.so: undefined symbol: JNI_GetCreatedJavaVMs
Error in library(rJava) : .First.lib failed for 'rJava'
> hum???
[/code]
More information about the R-devel
mailing list