[R] trouble with installing SJava

Jiiindo jiindoo at yahoo.com
Tue Jan 12 14:33:00 CET 2010


Colleagues, 
How i can solve this error when i install SJava package
Thanks
----------------
R CMD INSTALL -c /usr/local/lib/R/SJava_0.69-0.tar.gz

* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘SJava’ ...
checking for java... /usr/lib/jvm/java-6-sun/bin/java
Java VM /usr/lib/jvm/java-6-sun/bin/java
checking for javah... /usr/lib/jvm/java-6-sun/bin/javah
Looking in /usr/lib/jvm/java-6-sun/include
Looking in /usr/lib/jvm/java-6-sun/include/linux
checking for g++... g++
checking for C++ compiler default output... 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 g++ accepts -g... yes
checking for gcc... gcc
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 for Rf_initEmbeddedR in -lR... no
No R shared library found
configure: creating ./config.status
config.status: creating Makevars
config.status: creating src/Makevars
config.status: creating src/RSJava/Makefile
config.status: creating Makefile_rules
config.status: creating inst/scripts/RJava.bsh
config.status: creating inst/scripts/RJava.csh
config.status: creating R/zzz.R
config.status: creating cleanup
config.status: creating inst/scripts/RJava
Copying the cleanup script to the scripts/ directory
Building libRSNativeJava.so in
/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava
if  test ! -d /usr/local/lib/R/site-library/SJava/libs ; then \
	    mkdir /usr/local/lib/R/site-library/SJava/libs ; \
	fi
gcc -std=gnu99 -g -O2 -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include 
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux 
-c CtoJava.c
CtoJava.cweb:148: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'vm1_args'
CtoJava.cweb:215: error: static declaration of 'std_env' follows non-static
declaration
CtoJava.cweb:195: error: previous declaration of 'std_env' was here
CtoJava.cweb: In function 'create_Java_vm':
CtoJava.cweb:256: error: 'vm1_args' undeclared (first use in this function)
CtoJava.cweb:256: error: (Each undeclared identifier is reported only once
CtoJava.cweb:256: error: for each function it appears in.)
make: *** [CtoJava.o] Error 1
Generating JNI header files from Java classes.
   RForeignReference, RManualFunctionActionListener, ROmegahatInterpreter &
REvaluator
*************
Warning:
    At present, to use the library you must set the 
    LD_LIBRARY_PATH environment variable
    to
     
/usr/local/lib/R/site-library/SJava/libs:/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/i386/server:/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.14/jre/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
    or use one of the RJava.bsh or RJava.csh scripts
*************
** libs
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c ConverterExamples.c -o
ConverterExamples.o
ConverterExamples.cweb: In function ‘RS_JAVA_setFunctionConverter’:
ConverterExamples.cweb:213: warning: assignment discards qualifiers from
pointer target type
ConverterExamples.cweb: In function ‘RS_JAVA_toJavaFunctionConverter’:
ConverterExamples.cweb:312: warning: passing argument 1 of
‘getOmegahatReferenceValue’ discards qualifiers from pointer target type
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c Converters.c -o Converters.o
Converters.cweb: In function ‘RS_JAVA_removeConverter’:
Converters.cweb:399: warning: assignment discards qualifiers from pointer
target type
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c REmbed.c -o REmbed.o
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c REmbedWin.c -o REmbedWin.o
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c REval.c -o REval.o
REval.cweb: In function
‘Java_org_omegahat_Interfaces_NativeInterface_OmegaInterfaceManager_nativeSetup’:
REval.cweb:249: warning: implicit declaration of function ‘setJNIEnv’
REval.cweb:250: warning: implicit declaration of function ‘computeJavaVM’
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c RFunctionListener.c -o
RFunctionListener.o
RFunctionListener.cweb: In function ‘RFunctionConverter’:
RFunctionListener.cweb:133: warning: assignment discards qualifiers from
pointer target type
RFunctionListener.cweb:140: warning: implicit declaration of function
‘s_catch_exception’
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c RReferenceCall.c -o
RReferenceCall.o
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c RStoJava.c -o RStoJava.o
RStoJava.cweb: In function ‘s_to_java_basic’:
RStoJava.cweb:798: warning: cast from pointer to integer of different size
RStoJava.cweb: In function ‘RS_genericJavaCall’:
RStoJava.cweb:274: warning: assignment discards qualifiers from pointer
target type
RStoJava.cweb: In function ‘argsToArray’:
RStoJava.cweb:623: warning: passing argument 3 of ‘s_to_java_basic’ discards
qualifiers from pointer target type
RStoJava.cweb: In function ‘userReferenceToJava’:
RStoJava.cweb:1615: warning: assignment discards qualifiers from pointer
target type
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c Reflectance.c -o Reflectance.o
gcc -std=gnu99 -I/usr/local/lib/R/include -D_R_ -I/usr/local/lib/R/include
-I/usr/local/lib/R/include/R_ext
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/src/RSJava  -I.
-I/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/include  -IRSJava
-I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux
-I/usr/local/include    -fpic  -g -O2 -c RtoJava.c -o RtoJava.o
gcc -std=gnu99 -shared -L/usr/local/lib -o SJava.so ConverterExamples.o
Converters.o REmbed.o REmbedWin.o REval.o RFunctionListener.o
RReferenceCall.o RStoJava.o Reflectance.o RtoJava.o
-L/tmp/RtmpdcTvTv/R.INSTALL327b23c6/SJava/inst/libs
-L/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/i386/server
-L/usr/lib/jvm/java-6-sun-1.6.0.14/jre/lib/i386
-L/usr/lib/jvm/java-6-sun-1.6.0.14/jre/../lib/i386
-L/usr/java/packages/lib/i386 -L/lib -L/usr/lib
-L/usr/local/lib/R/site-library/SJava/libs -lRSNativeJava -ljvm
-L/usr/local/lib/R/lib -lR
/usr/bin/ld: cannot find -lRSNativeJava
collect2: ld returned 1 exit status
make: *** [SJava.so] Error 1
ERROR: compilation failed for package ‘SJava’
* removing ‘/usr/local/lib/R/site-library/SJava’
-- 
View this message in context: http://n4.nabble.com/trouble-with-installing-SJava-tp1012097p1012097.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list