[R-SIG-Mac] problems with getting R to share library with rpy/rpy2

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri Jun 24 09:10:31 CEST 2011


Hi,

Firstly -- I don't think this is the best list for you to be seeking
help in. I guess this is more geared to the list for rpy:

http://rpy.sourceforge.net/maillist.html

But, let's see ...

On Sun, Jun 12, 2011 at 6:05 AM, Daniel Weitzenfeld
<dweitzenfeld at gmail.com> wrote:
> I'm a unix newbie having some issues getting either rpy or rpy2 to install.
>
> 1) Problem 1:  Getting R to share it's library
>
> When I try to install rpy2, I get this error:
>
> running build_ext
> /Library/Frameworks/R.framework/Resources/bin/config: line 142: make:
> command not found
> /Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
> command not found
> R was not built as a library

This "make command not found" business sounds like you don't have
XCode installed on your mac, which you'll need.

In addition to the "xcode install" installing the XCode IDE, you'll
also be installing tools you'll need to build software (like `make`
and `gcc`, etc).

> Also, in the rpy read me (http://rpy.sourceforge.net/rpy/README), it
> says "First of all, you *must* check that you have built R with the
> configure
>    option '--enable-R-shlib'"
>
> BUT: in the R for Mac OS X FAQ
> (http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html), it says "Note
> that the CRAN binary includes R shared library, so there is no need to
> re-compile R with --enable-R-shlib."  I installed R (2.13.0) from the
> Installer package, as the FAQ recommended.
>
> Why isn't R sharing it's library?

I'm not sure that R isn't "sharing it's library" from the error you
provided above ... is there another error popping up as well, or?


>  How do I get R to share it's
> library?  Do I have to install from source - is the FAQ wrong?

Try installing XCode and redo.

> 2) Problem 2:  Configuring path to R Library
>
> In the pry read me, it says:
>
> Linux and Unix Source Installation:
> .
> .
> .
>
>
> "(b) Then, configure the path to the R library.  You have several ways to do
>    this (substitute RHOME with the path where R is installed, usually
>    /usr/local/lib/R):
>
>         make a link to RHOME/bin/libR.so in /usr/local/lib or /usr/lib, then
>          run 'ldconfig',
>
>         or, put the following line in your .bashrc (or equivalent):
>
>            export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:RHOME/bin
>
>         or, edit the file /etc/ld.so.conf and add the following line:
>
>            RHOME/bin
>
>          and then, run 'ldconfig'.
> "
>
> As a unix newbie, this is greek to me.  Which of the three options is
> easiest, and can I get a little more guidance on how to execute it?
> I've identified RHOME to be /Library/Frameworks/R.framework/Resources.

Yeah, you've got the correct R_HOME, but none of those instructions
seem right for OS X.

For instance, you'll realize that there is no file named "libR.so" in
"/Library/Frameworks/R.framework/Resources/bin" -- in fact, I guess it
would be in "RHOME/lib" .. but I guess you also have to deal with the
architecture stuff on os x, like i386 vs x86_64.

So ... I'd follow upon the rpy list I think.

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the R-SIG-Mac mailing list