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

Simon Urbanek simon.urbanek at r-project.org
Wed Oct 31 15:54:03 CET 2007


On Oct 31, 2007, at 10:10 AM, Daniel Merl wrote:

> 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?
>

unset DISPLAY


> \> 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'
> X_LIBS=-L/usr/X11/lib
>
> 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 problem?
>

No, they are there to start with. I have tested both a fresh machine  
with the latest seed as well as a fresh Leopard release install and  
this is what I get in both cases:

ginaz:~$ ls -ld /usr/X11*
drwxr-xr-x  9 root  wheel  306 Oct 13 15:22 /usr/X11
lrwxr-xr-x  1 root  wheel    3 Oct 13 15:22 /usr/X11R6 -> X11

So the usual /usr/X11R6 prefix works. What have you got there and how  
did you install Leopard (fresh, archive or upgrade)?

Cheers,
Simon



More information about the R-SIG-Mac mailing list