[BioC] Failed installing SJava on MacOS and Linux!
Michael Dondrup
Michael.Dondrup at uni.no
Wed Jan 20 14:06:04 CET 2010
Hi,
I thought I could do a quick test on Ubuntu in my virtual box and compare, but that went even worse. I started on a
freshly installed R 2.10.1 (from CRAN) in ubuntu 9.04. Here are the details, any ideas?
michi at michi-laptop:~$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.6.0_16
Java home path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path: $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386::/usr/java/packages/lib/i386:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm
JNI cpp flags : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux
Updating Java configuration in /etc/R
Done.
michi at michi-laptop:~$ sudo R CMD INSTALL -c Desktop/SJava_0.73.0.tar.gz
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘SJava’ ...
checking shlib support in R... 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/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../include/linux'
java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386 -L/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/i386 -L -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib -ljvm'
Looking in /usr/lib/jvm/java-6-sun-1.6.0.16/jre/include
Exception in thread "main" java.lang.NullPointerException
at jniParameters.findJniInclude(jniParameters.java:76)
at jniParameters.findJniInclude(jniParameters.java:61)
at jniParameters.compute(jniParameters.java:40)
at jniParameters.<init>(jniParameters.java:12)
at jniBashParameters.<init>(jniBashParameters.java:11)
at jniBashParameters.main(jniBashParameters.java:7)
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 ISO C89... none needed
checking for Rf_initEmbeddedR in -lR... yes
configure: creating ./config.status
config.status: creating Makevars
config.status: creating src/Makevars
config.status: creating src/RSJava/Makefile
config.status: creating inst/scripts/RJava.bsh
config.status: creating inst/scripts/RJava.csh
config.status: creating cleanup
config.status: creating inst/scripts/RJava
Copying the cleanup script to the scripts/ directory
** libs
/usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference
/usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener
/usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter
/usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator
make -C RSJava
make[1]: Entering directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava'
/usr/bin/javah -classpath /tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst:/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \
org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager
gcc -std=gnu99 -I/usr/share/R/include -D_R_ -I/usr/lib/R/include -I/usr/lib/R/include/R_ext -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava -I. -I/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/inst/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/jre/include/ -fpic -g -O2 -c CtoJava.c -o CtoJava.o
In file included from CtoJava.c:6:
CtoJava.h:9:17: error: jni.h: No such file or directory
In file included from CtoJava.c:6:
CtoJava.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NullObject’
CtoJava.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OmegahatInterfaceManagerClass’
CtoJava.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BasicClassValueAccessors’
CtoJava.h:100: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.h:106: error: expected ‘)’ before ‘Manager’
CtoJava.h:109: error: expected ‘)’ before ‘*’ token
CtoJava.h:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘RS_createForeignReference’
CtoJava.h:116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getInterfaceManager’
CtoJava.h:117: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setInterfaceManager’
CtoJava.h:120: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
CtoJava.h:123: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.h:123: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.h:123: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.h:126: error: expected ‘)’ before ‘*’ token
CtoJava.h:129: error: expected ‘)’ before ‘*’ token
CtoJava.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘findGetPrimitiveMethodID’
CtoJava.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.h:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘releaseThreadJNIEnv’
CtoJava.h:149: error: expected ‘)’ before ‘*’ token
CtoJava.h:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from CtoJava.c:8:
ErrorHandling.h:14: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
ErrorHandling.h:19: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
ErrorHandling.h:20: error: expected ‘)’ before ‘*’ token
ErrorHandling.h:21: error: expected ‘)’ before ‘*’ token
ErrorHandling.h:24: error: expected declaration specifiers or ‘...’ before ‘jthrowable’
ErrorHandling.h:24: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
ErrorHandling.h:27: error: expected ‘)’ before ‘*’ token
ErrorHandling.h:30: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
In file included from CtoJava.c:9:
JNIUtils.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_method_id’
JNIUtils.h:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_object_class_name’
JNIUtils.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_java_class_name’
JNIUtils.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘VMNewStringArray’
JNIUtils.h:26: error: expected ‘)’ before ‘obj’
In file included from CtoJava.c:13:
ManagerInterfaceUtils.h:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘callGenericOmegaMethod’
ManagerInterfaceUtils.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘callConstructorMethod’
ManagerInterfaceUtils.h:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘evalOmegaExpression’
ManagerInterfaceUtils.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_object_datatype’
ManagerInterfaceUtils.h:31: error: expected ‘)’ before ‘OmegahatInterfaceManagerClass’
ManagerInterfaceUtils.h:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getOmegahatReferenceValue’
In file included from CtoJava.c:14:
OmegaInterfaceManager.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘jboolean’
CtoJava.c:17: error: expected ‘)’ before ‘*’ token
CtoJava.c:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vm1_args’
CtoJava.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vm2_args’
CtoJava.c:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘interfaceManager’
CtoJava.c:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘doubleValueID’
CtoJava.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BasicClassValueAccessors’
CtoJava.c:76: error: expected ‘)’ before ‘Manager’
CtoJava.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OmegahatInterfaceManagerClass’
CtoJava.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘BasicClassValueAccessors’
CtoJava.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NullObject’
CtoJava.c:89: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘MetaForeignReferenceClass’
CtoJava.c:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘MetaForeignReferenceConstructorId’
CtoJava.c:96: error: expected ‘)’ before ‘*’ token
CtoJava.c:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘arrayClasses’
CtoJava.c:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wrapperClasses’
CtoJava.c:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wrapperConstructor’
CtoJava.c: In function ‘interface_start_VM’:
CtoJava.c:164: error: too many arguments to function ‘create_Java_vm’
CtoJava.c: At top level:
CtoJava.c:182: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.c: In function ‘create_Java_vm’:
CtoJava.c:184: error: ‘jint’ undeclared (first use in this function)
CtoJava.c:184: error: (Each undeclared identifier is reported only once
CtoJava.c:184: error: for each function it appears in.)
CtoJava.c:184: error: expected ‘;’ before ‘res’
CtoJava.c:187: error: ‘std_env’ undeclared (first use in this function)
CtoJava.c:189: error: ‘jvm’ undeclared (first use in this function)
CtoJava.c:204: error: ‘vm_args’ undeclared (first use in this function)
CtoJava.c:204: error: ‘JDK1_1InitArgs’ undeclared (first use in this function)
CtoJava.c:204: error: expected expression before ‘)’ token
CtoJava.c:210: error: expected expression before ‘)’ token
CtoJava.c:210: error: ‘vm1_args’ undeclared (first use in this function)
CtoJava.c:211: error: ‘JNI_VERSION_1_1’ undeclared (first use in this function)
CtoJava.c:213: warning: implicit declaration of function ‘JNI_GetDefaultJavaVMInitArgs’
CtoJava.c: At top level:
CtoJava.c:283: warning: data definition has no type or storage class
CtoJava.c:283: warning: type defaults to ‘int’ in declaration of ‘tmp’
CtoJava.c:283: error: ‘user_classpath’ undeclared here (not in a function)
CtoJava.c:283: error: ‘vm_args’ undeclared here (not in a function)
CtoJava.c:283: warning: initialization makes integer from pointer without a cast
CtoJava.c:283: error: initializer element is not constant
CtoJava.c:285: warning: data definition has no type or storage class
CtoJava.c:285: warning: type defaults to ‘int’ in declaration of ‘strcpy’
CtoJava.c:285: warning: parameter names (without types) in function declaration
CtoJava.c:285: error: conflicting types for ‘strcpy’
CtoJava.c:286: error: expected ‘)’ before string constant
CtoJava.c:287: error: expected ‘)’ before ‘->’ token
CtoJava.c:288: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
CtoJava.c:291: error: expected identifier or ‘(’ before ‘if’
CtoJava.c:298: error: expected identifier or ‘(’ before ‘if’
CtoJava.c:305: error: expected identifier or ‘(’ before ‘return’
CtoJava.c:306: error: expected identifier or ‘(’ before ‘}’ token
CtoJava.c: In function ‘exists_Java_vm’:
CtoJava.c:311: error: ‘std_env’ undeclared (first use in this function)
CtoJava.c: At top level:
CtoJava.c:316: error: expected ‘)’ before ‘Manager’
CtoJava.c:354: error: expected ‘)’ before ‘Manager’
CtoJava.c:475: error: expected ‘)’ before ‘*’ token
CtoJava.c:517: error: expected declaration specifiers or ‘...’ before ‘JNIEnv’
CtoJava.c: In function ‘whatJavaType’:
CtoJava.c:518: error: ‘jobject’ undeclared (first use in this function)
CtoJava.c:518: error: expected ‘;’ before ‘obj’
CtoJava.c:519: error: ‘obj’ undeclared (first use in this function)
CtoJava.c:519: error: expected ‘;’ before ‘javaObject’
CtoJava.c:526: error: ‘env’ undeclared (first use in this function)
CtoJava.c:526: error: ‘arrayClasses’ undeclared (first use in this function)
CtoJava.c:526: error: ‘JNI_TRUE’ undeclared (first use in this function)
CtoJava.c:530: error: ‘primitiveClasses’ undeclared (first use in this function)
CtoJava.c: At top level:
CtoJava.c:552: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.c:553: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.c:553: error: expected declaration specifiers or ‘...’ before ‘jboolean’
CtoJava.c: In function ‘which_java_type’:
CtoJava.c:562: error: ‘builtIn’ undeclared (first use in this function)
CtoJava.c:563: error: ‘JNI_TRUE’ undeclared (first use in this function)
CtoJava.c:566: error: ‘JNI_FALSE’ undeclared (first use in this function)
CtoJava.c: At top level:
CtoJava.c:708: error: expected ‘)’ before ‘*’ token
CtoJava.c:866: error: expected ‘)’ before ‘*’ token
CtoJava.c:1047: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:1074: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:1081: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:1132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘releaseThreadJNIEnv’
CtoJava.c:1152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:1159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
CtoJava.c:1166: error: expected ‘)’ before ‘*’ token
CtoJava.c: In function ‘RS_JAVA_terminateJava’:
CtoJava.c:1174: error: ‘JavaVM’ undeclared (first use in this function)
CtoJava.c:1174: error: ‘vm’ undeclared (first use in this function)
CtoJava.c:1174: warning: implicit declaration of function ‘getJavaVM’
CtoJava.c:1177: error: ‘jvm’ undeclared (first use in this function)
CtoJava.c: At top level:
CtoJava.c:1184: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getInterfaceManager’
CtoJava.c:1188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setInterfaceManager’
CtoJava.c:1202: error: expected ‘)’ before ‘*’ token
CtoJava.c:1225: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘RS_createForeignReference’
CtoJava.c:1243: error: expected ‘)’ before ‘*’ token
CtoJava.c:1292: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘findGetPrimitiveMethodID’
make[1]: *** [CtoJava.o] Error 1
make[1]: Leaving directory `/tmp/RtmpkgwAO7/R.INSTALL327b23c6/SJava/src/RSJava'
make: *** [subdir] Error 2
ERROR: compilation failed for package ‘SJava’
* removing ‘/usr/local/lib/R/site-library/SJava’
michi at michi-laptop:~$
-----------------------------------------------------------------------------------------------------------------------
> sessionInfo()
R version 2.10.1 (2009-12-14)
i486-pc-linux-gnu
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
-----------------------------------------------------------------------------------------------------------------------
michi at michi-laptop:~$ java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
-----------------------------------------------------------------------------------------------------------------------
michi at michi-laptop:~$ uname -a
Linux michi-laptop 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux
Thanx again for reading that far ;)
Am Jan 19, 2010 um 6:37 PM schrieb Seth Falcon:
> On 1/19/10 8:58 AM, Martin Morgan wrote:
>> Michael Dondrup wrote:
>>> Am Jan 19, 2010 um 3:39 PM schrieb Martin Morgan:
>>>
>>>> Michael Dondrup wrote:
>>>>> Hi,
>>>>> I would like to use RWebServices and therefore SJava on Mac OS snow leopard. The documentation does not explicitly mention Mac os, so it's
>>>>> maybe not supported, but i hope it can be made working anyway.
>>>>> Maybe somebody out there got this configuration running and could help? I am trying to install SJava 0.72. I try the following:
>>>>>
>>>>>> library(SJava)
>>>>> Load the Java VM with .JavaInit()
>>>>>> .JavaInit()
>>>>>> example(.Java)
>>>>> .Java> v<- .JavaConstructor("java.util.Vector", as.integer(10))
>>>>>
>>>>> .Java> .Java(v, "add", "A string element")
>>>>> Error in .Java(v, "add", "A string element") :
>>>>> Can't find org.omegahat.R.Java.RForeignReference
>>
>> this is in org.omegahat/Jars/RJava.jar, e.g.,
>>
>> jar tf org.omegahat/Jars/RJava.jar
>>
>
> Curious, as this jar did not appear on your classpath in your previous mail.
>
> I'm able to reproduce the error on my Snow Leopard laptop. I also notice that I don't have this jar. There are .class files under the package structure in org/omegahat/R/Java/*.class. RForeignReference.class is among them and this would seem to be the purpose of the "<...>/SJava/org/.." entry in class path.
>
[snip]
More information about the Bioconductor
mailing list