[R] rJava Error
fabin.ittiachan
fabin.ittiachan at happiestminds.com
Wed Jun 27 06:16:32 CEST 2012
Hi,
I'm receiving an error when I am trying to install rJava. I have posted the
error below.
RHive_0.0-6.tar.gz rJava_0.9-3.tar.gz RJDBC_0.2-0.tar.gz
Rserve_0.6-8.tar.gz
[root at localhost Package]# R CMD INSTALL rJava_0.9-3.tar.gz
* installing to library ‘/usr/local/lib64/R/library’
* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
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/local/Java/jre/bin/java'
archiver : '/usr/local/Java/jre/../bin/jar'
compiler : '/usr/local/Java/jre/../bin/javac'
header prep.: '/usr/local/Java/jre/../bin/javah'
cpp flags : '-I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux'
java libs : '-L/usr/local/Java/jre/lib/amd64
-L/usr/local/Java/jre/lib/amd64/server -ljvm'
checking whether JNI programs can be compiled... yes
checking JNI data types... ok
checking whether JRI should be compiled (autodetect)... yes
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... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
=== configuring in jri (/tmp/RtmpUyYk4N/R.INSTALL6645c827c46/rJava/jri)
configure: running /bin/sh ./configure '--prefix=/usr/local'
--cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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 whether Java interpreter works... checking whether JNI programs can
be compiled... yes
checking whether JNI programs can be run... yes
checking JNI data types... ok
checking whether Rinterface.h exports R_CStackXXX variables... yes
checking whether Rinterface.h exports R_SignalHandlers... yes
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating run
config.status: creating src/config.h
** libs
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c Rglue.c -o Rglue.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c arrayc.c -o arrayc.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c callJNI.c -o callJNI.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c callback.c -o callback.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c fields.c -o fields.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c init.c -o init.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c jri_glue.c -o jri_glue.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c loader.c -o loader.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c otables.c -o otables.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c rJava.c -o rJava.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -DNDEBUG -I.
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/include -fpic -g -O2 -c tools.c -o tools.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o rJava.so Rglue.o arrayc.o
callJNI.o callback.o fields.o init.o jri_glue.o loader.o otables.o rJava.o
tools.o -L/usr/local/Java/jre/lib/amd64
-L/usr/local/Java/jre/lib/amd64/server -ljvm
(cd ../jri && make)
make[1]: Entering directory `/tmp/RtmpUyYk4N/R.INSTALL6645c827c46/rJava/jri'
make -C src JRI.jar
make[2]: Entering directory
`/tmp/RtmpUyYk4N/R.INSTALL6645c827c46/rJava/jri/src'
/usr/local/Java/jre/../bin/javac -target 1.4 -source 1.4 -d . ../Mutex.java
../RBool.java ../RConsoleOutputStream.java ../REXP.java ../RFactor.java
../RList.java ../RMainLoopCallbacks.java ../RVector.java ../Rengine.java
../package-info.java
warning: [options] bootstrap class path not set in conjunction with -source
1.4
1 warning
/usr/local/Java/jre/../bin/javah -d . -classpath . org.rosuda.JRI.Rengine
gcc -std=gnu99 -c -o Rengine.o Rengine.c -g -Iinclude -DRIF_HAS_CSTACK
-DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/lib64/R/include -I/usr/local/lib64/R/include
gcc -std=gnu99 -c -o jri.o jri.c -g -Iinclude -DRIF_HAS_CSTACK
-DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/lib64/R/include -I/usr/local/lib64/R/include
gcc -std=gnu99 -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude
-DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
-I/usr/local/lib64/R/include -I/usr/local/lib64/R/include
gcc -std=gnu99 -c -o Rinit.o Rinit.c -g -Iinclude -DRIF_HAS_CSTACK
-DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic -I/usr/local/lib64/R/include
-I/usr/local/lib64/R/include
gcc -std=gnu99 -c -o globals.o globals.c -g -Iinclude -DRIF_HAS_CSTACK
-DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
gcc -std=gnu99 -c -o rjava.o rjava.c -g -Iinclude -DRIF_HAS_CSTACK
-DRIF_HAS_RSIGHAND -g -O2 -I/usr/local/Java/jre/../include
-I/usr/local/Java/jre/../include/linux -fpic
-I/usr/local/Java/jre/../include -I/usr/local/Java/jre/../include/linux
gcc -std=gnu99 -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o
rjava.o -shared -L/usr/local/Java/jre/lib/amd64
-L/usr/local/Java/jre/lib/amd64/server -ljvm /usr/local/lib64/R/lib/libR.a
-L/usr/local/lib64/R/lib -lRblas -lgfortran -lm -lreadline -lrt -ldl -lm
/usr/bin/ld: /usr/local/lib64/R/lib/libR.a(attrib.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib64/R/lib/libR.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory
`/tmp/RtmpUyYk4N/R.INSTALL6645c827c46/rJava/jri/src'
make[1]: *** [src/JRI.jar] Error 2
make[1]: Leaving directory `/tmp/RtmpUyYk4N/R.INSTALL6645c827c46/rJava/jri'
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/usr/local/lib64/R/library/rJava’
[root at localhost Package]#
I am working on CentOS which is running on top of a VM. I did not get the
error when I installed rJava normally but this happens when I had complied R
with shared library enabled.
Appreciate the help.
Regards,
Fabin
--
View this message in context: http://r.789695.n4.nabble.com/rJava-Error-tp4634572.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list