[BioC] Issues with RWebServices on MacOSX, ant rservices-test fails (1)

Michael Dondrup Michael.Dondrup at uni.no
Tue Feb 23 16:37:15 CET 2010




Am Feb 23, 2010 um 3:41 PM schrieb Martin Morgan:

> On 02/23/2010 05:04 AM, Michael Dondrup wrote:
>> Hi,
>> 
> 
>> after I installed SJava on MacOS with lots of help from this list, I
> am trying to approach my original aim of
>> getting RWebServices to run on the mac. I have run into some
>> problems
> again, maybe because this platform
>> might not really be supported yet, or maybe I forgot to set one
> environment variable.
>> 
>> I was able to resolve the first issue, but the second issue seems to
> be more difficult:
> 
> Hi Michael --
> 
> Yes, I made a fix to the development version of RWebServices and will
> port it to the release version when I have a chance to test on a mac. A
> quick fix more approximating the change I made, rather than editing the
> file, is along the lines of
> 
> LD_LIBRARY_PATH=/Library/Frameworks/R.framework/Resources/library/SJava/libs/x86_64:$LD_LIBRARY_PATH
> ant rservices-test
> 
> What about the second problem?
> 
> Martin

Well, I wanted to be 100% sure and debugged more, it seemed to be a version conflict or something, and now it's working, so I don't report this. 
From the output of 
 ant basic-propBuildfile: build.xml
 
basic-prop:
     [echo] os.arch = x86_64
     [echo] r.home = /Library/Frameworks/R.framework/Resources
     [echo] RWebServices.home = /Users/mdondrup/Library/R/2.10/library/RWebServices
     [echo] sjava.home = /Users/mdondrup/Library/R/2.10/library/SJava
....

 I see that it is actually using SJava in my personal library, so I set 
 <jvmarg value="-Djava.library.path=/Users/mdondrup/Library/R/2.10/library/SJava/libs/x86_64/"/>
(Setting the LD_LIBRARY_PATH had no effect for me, it's either ignored by java or not passed on by ant)


I believe something is still odd with my SJava build on MacOS, 
as I had to install SJava separately for each R binary  (R-gui, R64-gui, /usr/bin/R-commdline) to be able to use SJava in each.
I don't know so much about the R build system, but I think it normally handles the different sub-architectures that might exist on
a single machine, such that a single install is sufficient.

The directory which is added to java.library.path needs to contain these symbolic links:
libRInterpreter.dylib -> SJava.so
libSJava.dylib -> SJava.so

Then it works. Maybe one could leave the generation of the dynamic library to R? Then the naming convention of the 
platform would be automatically followed. I can try to look a bit further into this, if that helps.

Anyway, the tests are now all successful.

Best 
Michael
  




> 
>> 
>> Issue 1:
>> 
>> According to the manual (Installing and testing RWebServices) I installed the required software:
>> I followed the manual to section 2, point 3. (ant basic-prop -- success).
>> In the console I type:   
>> Seneca:tmp mdondrup$  ant rservices-test
>> Buildfile: build.xml
>>     [echo]  RWebservicesHome : /Users/mdondrup/Library/R/2.10/library/RWebServices 
>> 
>> -check-for-RJava.jar:
>> 
>> -build-RJava.jar:
>> 
>> rservices-clean:
>> 
>> rservices-compile:
>>    [javac] Compiling 12 source files to /Users/mdondrup/tmp/test/bin
>> 
>> rservices-test:
>>    [junit] Test org.bioconductor.packages.rservices.CLevelConverterTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.RClassTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.RFileReferencesTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.RJFileReferencesTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.RJTypeTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.RObjectsTest FAILED
>>    [junit] Test org.bioconductor.packages.rservices.SJavaTypeTest FAILED
>>     [echo] ===== See the directory '/Users/mdondrup/tmp/test/output' for more information ====
>> 
>> BUILD SUCCESSFUL
>> Total time: 6 seconds
>> 
>> The test output contains the following:
>> Testcase: org.bioconductor.packages.rservices.RClassTest took 0 sec
>>        Caused an ERROR
>> no RInterpreter in java.library.path
>> java.lang.UnsatisfiedLinkError: no RInterpreter in java.library.path
>>        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1792)
>>        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
>>        at java.lang.System.loadLibrary(System.java:1045)
>>        at org.omegahat.R.Java.ROmegahatInterpreter.<clinit>(Unknown Source)
>>        at org.bioconductor.packages.rservices.TypeTestUtil.setupR(Unknown Source)
>> 
>> partial solution:
>> 
>> The libRInterpreter.dylib library is not found, so edit:
>> ./Library/R/2.10/library/RWebServices/unitTests/build.xml 
>> this is the ant script that runs the tests
>> after line 17, add the location where the dynamic libraries are:
>> 
>> <junit fork="yes" haltonfailure="no" dir="${test.dir}/output">
>> +    <jvmarg value="-Djava.library.path=/Library/Frameworks/R.framework/Resources/library/SJava/libs/x86_64/"/>
>>        <batchtest todir="${test.dir}/output">
>> 
>> Then, the tests are executed, but they still fail.
>> 
>> I will put the second issue in a second mail, otherwise it will become too confusing.
>> 
>> 
>>> sessionInfo()
>> R version 2.10.1 (2009-12-14) 
>> x86_64-apple-darwin9.8.0 
>> 
>> locale:
>> [1] C
>> 
>> attached base packages:
>> [1] tools     stats     graphics  grDevices utils     datasets  methods  
>> [8] base     
>> 
>> other attached packages:
>> [1] RWebServices_1.10.0 TypeInfo_1.12.0     SJava_0.72.0       
>> 
>> loaded via a namespace (and not attached):
>> [1] RCurl_1.3-1
>>> 
>> 
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
> 
> 
> -- 
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
> 
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793



More information about the Bioconductor mailing list