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

Daniel Merl dan at stat.duke.edu
Wed Oct 31 15:10:05 CET 2007

many thanks Simon --

On 10/31/07, Simon Urbanek <simon.urbanek at r-project.org> wrote:
> 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.

How can you fix this in startup scripts?

\> 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).

Thanks, this probably does work, but I didn't check it for the reason
below (I'm on the daily digest mailings so I had sent mine before
reading your post)

> 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).

I have standard installations of X11, Xcode, and gfortran 4.2.1 from
your site.  I did upgrade my previous developer tools with the version
on the leopard dvd, possibly that is the cause?  Either way, I figured
out that calling configure as:

configure  --x-libraries='-L/usr/X11/lib' --x-includes='-I/usr/X11/include/X11'

succeeds, and then the build can be completed with X11 support, and
the ability to build packages without specifying the PKG_LIBS variable
as you suggested.

To answer your other question, calling "configure" with no arguments
fails for inability to link the library Xt (from config.log:

configure:45035: gcc -std=gnu99 -o conftest -g -O2 -fPIC
-I/usr/local/include -no-cpp-precomp -L/usr/local/lib conftest.c -lXt
-lm  -liconv >&5
ld: library not found for -lXt
collect2: ld returned 1 exit status


Anyway, I certainly didn't move around any of the X11 libs or headers
since installing them.  Perhaps you have some symlinks or the X_LIBS
variable already set, either of which probably circumvent this

thanks again,

More information about the R-SIG-Mac mailing list