[R-SIG-Mac] Problem with readline when building R from source.

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 24 08:59:16 CEST 2010

On Mon, 24 May 2010, Rolf Turner wrote:

> On 22/05/2010, at 2:23 PM, Ben Madin wrote:
>> Rolf,
>> Given the weekend status, I'll hazard a guess that you want to add 
>> these as environment variables, so in an attempt to be 
>> monosyllabic:
>> Assuming that you are using the bash shell (which has been the 
>> default for a while) log in as the user you are going to run the 
>> ./configure script as, and at the command prompt type
>> export F77="gfortran -arch x86_64"
>> export FC="gfortran -arch x86_64"
>> to see what is currently set, just type
>> export
>> (if you are still using the tcsh shell, the I think the command 
>> becomes setenv instead of export, and it is slightly different, so 
>> you will have to look that up)
>> good luck, I may have the wrong end of the stick here.
> Thanks for the input.  Seems to work.  I actually use tcsh, so I did the
> equivalent tcsh thing:
> setenv F77 "gfortran -arch x86_64"
> setenv FC "gfortran -arch x86_64"

But the documented way is to put these in a config.site file: and 
yes, it is in the R-admin manual.  So all that was needed was to put 
in file config.site (in the top-level R build directory)

CC='gcc -arch x86_64'
CXX='g++ -arch x86_64'
F77='gfortran -arch x86_64'
FC='gfortran -arch x86_64'
OBJC='gcc -arch x86_64'

(copied from the manual).

> That solved the fortran problem, and the configure goes on well past 
> the point where it hung up last time.  But it eventually comes to a 
> shuddering halt with an error about X11 --- which is where I came 
> in, really.  I'm toadally mystified.  The error I'm getting is:
> configure: error: --with-x=yes (default) and X11 headers/libs are not available
> That is just like the error I was getting in respect of readline; I 
> was told to update my readline (via a fancy ``curl'' command).  I 
> looked in //r.research.att.com/libs and could not see any X11 
> package to which to apply a curly.

This one is probably that mentioned in the the R-admin manual for Snow 
Leopard, to wit

'Another quirk is that people have found that the X11 libraries are 
not in the default linking path, so something like 
@samp{LIBS=-L/usr/X11/lib} may be required.'

So add that line to the config.site file.

> What the <expletive deleted> do I do now?
> (And why do these things always happen to ***me***???)

Perhaps because you don't study the manuals?  I've yet to see anything 
in this thread that is not covered in the general advice and the Mac 
OS X section of the R-admin manual.

We can't spell out the exact details for every possible system -- the 
possibilities are too many and the info would go out of date too 
rapidly.  But for a '0 new features' release, Snow Leopard sure did 
introduce a whole raft of barely documented changes and we've not yet 
caught up with some in configure (ideally X11 would be looked for in 
/usr/X11/lib, but what was Apple thinking of in dropping it?).

> 	cheers,
> 		Rolf

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-SIG-Mac mailing list