[BioC] Failed installing SJava on MacOS

Michael Dondrup Michael.Dondrup at uni.no
Mon Jan 18 13:48:17 CET 2010


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
> 

During installation I got the following error message, which I suspect to be relevant:

...
** R
** inst
cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non-directory inst/libs
sh: /usr/bin/tarxf: No such file or directory
....

I also manually copied src/SJava.so to /Library/Frameworks/R.framework/Resources/library/SJava/libs but that didn't change anything.
I put the full output of javareconf,  R CMD INSTALL, and sessionInfo() here. Any help would be appreciated. 

Michael



========================================================================================================

Seneca:compile mdondrup$ R CMD javareconf
Java interpreter : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java
Java version     : 1.6.0_17
Java home path   : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
Java compiler    : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javac
Java headers gen.: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah
Java archive tool: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/jar
Java library path: 
JNI linker flags : -framework JavaVM
JNI cpp flags    : -I$(JAVA_HOME)/include

Updating Java configuration in /Library/Frameworks/R.framework/Resources
sed: -e: No such file or directory
sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory
sed: -e: No such file or directory
sed: s|JAVA_CPPFLAGS =.\{0,\}|JAVA_CPPFLAGS = -I$(JAVA_HOME)/include|g: No such file or directory
Done.

Seneca:compile mdondrup$ sudo R CMD INSTALL -c SJava
Password:
* installing to library '/Library/Frameworks/R.framework/Resources/library'
* installing *source* package 'SJava' ...
checking shlib support in R... checking Java support in R... present:
interpreter : '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java'
archiver    : '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/jar'
compiler    : '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javac'
header prep.: '/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah'
cpp flags   : '-I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include'
java libs   : '-framework JavaVM'
Looking in /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include
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
** arch - x86_64
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RForeignReference.h org.omegahat.R.Java.RForeignReference
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o RManualFunctionActionListener.h org.omegahat.R.Java.RManualFunctionActionListener
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o ROmegahatInterpreter.h org.omegahat.R.Java.ROmegahatInterpreter
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o REvaluator.h org.omegahat.R.Java.REvaluator
make -C RSJava
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javah -classpath /Users/mdondrup/compile/SJava/inst:/Users/mdondrup/compile/SJava/inst/org/omegahat/Jars/Environment.jar -o OmegaInterfaceManager.h \
	  org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include   -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include  -fPIC  -mtune=core2 -g -O2 -c CtoJava.c -o CtoJava.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include   -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include  -fPIC  -mtune=core2 -g -O2 -c ErrorHandling.c -o ErrorHandling.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include   -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include  -fPIC  -mtune=core2 -g -O2 -c ManagerInterfaceUtils.c -o ManagerInterfaceUtils.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include   -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include  -fPIC  -mtune=core2 -g -O2 -c References.c -o References.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include   -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include  -fPIC  -mtune=core2 -g -O2 -c JNIUtils.c -o JNIUtils.o
gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o libRSNativeJava.so CtoJava.o ErrorHandling.o ManagerInterfaceUtils.o References.o JNIUtils.o -framework JavaVM
if  test ! -d /Library/Frameworks/R.framework/Resources/library/SJava/libs ; then \
	    mkdir /Library/Frameworks/R.framework/Resources/library/SJava/libs ; \
	fi
cp CtoJava.h ErrorHandling.h ManagerInterfaceUtils.h References.h JNIUtils.h /Users/mdondrup/compile/SJava/inst/include
mv libRSNativeJava.so /Users/mdondrup/compile/SJava/inst/libs
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c ConverterExamples.c -o ConverterExamples.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c Converters.c -o Converters.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c Reflectance.c -o Reflectance.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c REmbed.c -o REmbed.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c REmbedWin.c -o REmbedWin.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c REval.c -o REval.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RFunctionListener.c -o RFunctionListener.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RReferenceCall.c -o RReferenceCall.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RStoJava.c -o RStoJava.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RtoJava.c -o RtoJava.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RSJava/CtoJava.c -o RSJava/CtoJava.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RSJava/ErrorHandling.c -o RSJava/ErrorHandling.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RSJava/ManagerInterfaceUtils.c -o RSJava/ManagerInterfaceUtils.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RSJava/References.c -o RSJava/References.o
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -D_R_ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/R_ext -I/Users/mdondrup/compile/SJava/src/RSJava  -I. -I/Users/mdondrup/compile/SJava/inst/include  -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/include/include -I/usr/local/include    -fPIC  -mtune=core2 -g -O2 -c RSJava/JNIUtils.c -o RSJava/JNIUtils.o
gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o SJava.so ConverterExamples.o Converters.o Reflectance.o REmbed.o REmbedWin.o REval.o RFunctionListener.o RReferenceCall.o RStoJava.o RtoJava.o RSJava/CtoJava.o RSJava/ErrorHandling.o RSJava/ManagerInterfaceUtils.o RSJava/References.o RSJava/JNIUtils.o -framework JavaVM -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJava/libs/libSJava.so
ln -s SJava.so /Library/Frameworks/R.framework/Resources/library/SJava/libs/libRInterpreter.so
** R
** inst
cp: cannot overwrite directory /Library/Frameworks/R.framework/Resources/library/SJava/libs with non-directory inst/libs
sh: /usr/bin/tarxf: No such file or directory
** preparing package for lazy loading
Creating a new generic function for "merge" in "SJava"
** help
*** installing help indices
** building package indices ...
make -C RSJava -f Makefile clean
rm OmegaInterfaceManager.h
rm RForeignReference.h RManualFunctionActionListener.h ROmegahatInterpreter.h REvaluator.h
* DONE (SJava)








> sessionInfo()
R version 2.10.1 (2009-12-14) 
x86_64-apple-darwin9.8.0 

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] SJava_0.72.0

loaded via a namespace (and not attached):
[1] tools_2.10.1
> 



More information about the Bioconductor mailing list