[R-SIG-Mac] some suggestions for building R on leopard

Simon Urbanek simon.urbanek at r-project.org
Wed Oct 31 14:32:01 CET 2007


Dan,

On Oct 30, 2007, at 11:17 PM, Daniel Merl wrote:

> upgrading to leopard seems to cause a couple of problems for R, and  
> while I'm sure the R for OS X developers will come up with better  
> solutions soon, in the meantime I thought I'd post my current work- 
> around, hopefully someone out there might find it useful, and/or be  
> able to fill in a couple gaps.
>
> 1) The latest patched framework build and GUI from http://r.research.att.com/ 
>  seem to work ok in leopard.  One comment on this:  apple's made  
> some major changes to the X11 server in leopard. a lot of people are  
> saying the new x11 is "broken", but I've also read that the new x11  
> is based on a more modern codebase.  so maybe it's not worth  
> deleting.  anyway, one major difference is that you no longer need  
> to open X11.app manually prior to opening a plotting window if you  
> are running R from the command line.  Also, it is no longer  
> necessary to manually set the environment variable DISPLAY=:0.0 in  
> a .bashrc for example.  After removing this line from my .bashrc  
> (and reopening terminal),   the X11 plotting from the command line  
> worked.
>

This is a bit misleading - this has nothing to do with X11 per-se.  
What Apple did is something far more awful - they set DISPLAY by  
default to a special service that attempts to start X11 automatically  
when a connection is initiated. This is a matter of taste, but I must  
say that I'm not fond of that change, because I don't want X11 on by  
default (just remember the CRAN mirror selection - terrible in Tcl/Tk  
no keyboard interaction, but very easy to choose in the CL).  
Fortunately you can fix that in your startup scripts.


> 2) Building shared objects using R CMD SHLIB doesn't work using the  
> pre-compiled builds mentioned above (maybe this is too technical for  
> this list, but it's relevant for mac users I think).

Please read my previous post on the list about R and Leopard, it has  
the fix. (For R CMD SHLIB it's as easy as PKG_LIBS=-mmacosx-version- 
min=10.4 R CMD SHLIB).


>   This often happens when apple releases a new OS, due to the new  
> operating system moving around and renaming dynamic libraries.    
> However, due to the changes to X11, compiling R from source in  
> leopard doesn't seem to get past the configure script unless you set  
> with-x=no.


I works for me flawlessly (on the last seed). Are sure you have  
installed X11 and Xcode properly?
In any case please post the relevant parts of config.log (or send me  
the whole thing if you wish).

Cheers,
Simon



More information about the R-SIG-Mac mailing list