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

Rolf Turner r.turner at auckland.ac.nz
Fri May 21 03:27:51 CEST 2010


On 21/05/2010, at 12:55 PM, Simon Urbanek wrote:

> 
> On May 20, 2010, at 8:33 PM, Rolf Turner wrote:
> 
>> 
>> I (just now) attempted to build an older version of R (2.10.1)
>> from source.  The ./configure step came to a halt with an error:
>> 
>>> configure: error: --with-readline=yes (default) and headers/libs are not available
>> 
>> In the past I had been able to build R from source with no problems.
>> 
>> A short time ago, after installing R 2.11.0 (and having some problems with x11()
>> plotting) I attempted to go back to 2.10.1 by building from source, and found
>> that I couldn't, due to the foregoing configure error.
>> 
>> I was then told I could resolve the x11() plotting problems by updating my OS.
>> I finally got around to doing that --- just now --- and indeed this fixed the
>> x11() plotting problems.
>> 
>> I then figured I'd check and if it had also fixed the ``headers/libs are not
>> available'' problem --- it hadn't.
>> 
>> So can anyone tell me (preferably in monosyllables, i.e. please make it easy
>> to understand)
> 
> Install readline (library + headers) - it is explained in the FAQ.
> 
> monosyllabic instructions: run
> 
> curl -s http://r.research.att.com/libs/readline-5.2-12-darwin8-bin4.tar.gz | sudo tar fvxz - -C /
> 
> The error you get means that you have some broken readline (or compatible) in your system. The only way to find out exactly is to look at config.log since it is specific to your particular setup (stock OS X does not have that problem AFAIK).

Your instructions were certainly clear enough; even I was able to follow them. :-)

However the impact of following these instructions was nil.  The screen output following
my execution of your recipe was:

> $ curl -s http://r.research.att.com/libs/readline-5.2-12-darwin8-bin4.tar.gz | sudo tar fvxz - -C /
> Password:
> usr/
> usr/local/
> usr/local/include/
> usr/local/include/readline/
> usr/local/include/readline/chardefs.h
> usr/local/include/readline/history.h
> usr/local/include/readline/keymaps.h
> usr/local/include/readline/readline.h
> usr/local/include/readline/rlconf.h
> usr/local/include/readline/rlstdc.h
> usr/local/include/readline/rltypedefs.h
> usr/local/include/readline/tilde.h
> usr/local/info/
> usr/local/info/dir
> usr/local/info/history.info
> usr/local/info/readline.info
> usr/local/info/rluserman.info
> usr/local/lib/
> usr/local/lib/libhistory.5.2.dylib
> usr/local/lib/libhistory.5.dylib
> usr/local/lib/libhistory.a
> usr/local/lib/libhistory.dylib
> usr/local/lib/libreadline.5.2.dylib
> usr/local/lib/libreadline.5.dylib
> usr/local/lib/libreadline.a
> usr/local/lib/libreadline.dylib
> usr/local/man/
> usr/local/man/man3/
> usr/local/man/man3/history.3
> usr/local/man/man3/readline.3

But when I then tried the ./configure trick I got the same error message as before.

Looking into config.log I found:

>          .
>          .
>          .
> configure:21583: checking for readline/readline.h
> configure:21591: result: yes
> configure:21609: checking for rl_callback_read_char in -lreadline
> configure:21644: gcc -o conftest -g -O2 -I/sw/include -I/usr/local/include -L/sw/lib -L/usr/local/lib conftest.c -lreadline   >&5
> ld: warning: in /sw/lib/libreadline.dylib, file was built for i386 which is not the architecture being linked (x86_64)
> Undefined symbols:
>   "_rl_callback_read_char", referenced from:
>       _main in ccRxZQbm.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> configure:21650: $? = 1
>          .
>          .
>          .

Can you suggest anything that I might do about this problem?

Ta.

	cheers,

		Rolf
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com
######################################################################



More information about the R-SIG-Mac mailing list