[Rd] [R] readline detection problems

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Fri Feb 3 14:07:39 CET 2006


look into config.log towards the end - it gives you the details of what
happened during the failed configure. (the file is created by configure
as it runs).

As for consistency of what --someopt should take, it is all part of
the mess of autoconf. You could read it up at http://www.gnu.org/ and 
look for autoconf docs there.

Prof Ripley had already give you CPPFLAGS and LDFLAGS ; if in doubt, 
stick the -I<readline_include_loc> and -L<readlne_lib_loc>  into CFLAGS 
  FFLAGS and CXXFLAGS as well, like

CFLAGS= -I/home3/fa/faga001/vol/readline-5.1/include \
-L/home3/fa/faga001/vol/readline-5.1/lib

I suspect what you needed was CFLAGS, rather than CPPFLAGS .
This is barbaric, but the alternative is that you'll need to understand
how autoconf works, which is not a easy task.

Good luck.

HTL

Benjamin Otto wrote:
> Dear Mr. Ripley,
> 
> thanks for the quick reply. I set these flags now, however there still seem
> to be some problems with readline. The corresponding cofigure output is:
> 
> checking readline/history.h usability... yes
> checking readline/history.h presence... yes
> checking for readline/history.h... yes
> checking readline/readline.h usability... yes
> checking readline/readline.h presence... yes
> checking for readline/readline.h... yes
> checking for rl_callback_read_char in -lreadline... no
> checking for main in -lncurses... no
> checking for main in -ltermcap... yes
> checking for rl_callback_read_char in -lreadline... no
> checking for history_truncate_file... no
> configure: error: --with-readline=yes (default) and headers/libs are not
> available
> 
> The existing compiler is gcc version 2.8.1 and the linker editor used by gcc
> is an IRIX ld version 7.30. By the way I had read the installation manual
> and already patched readline 5.1.
> 
> 
>>>--with-readline         use readline library (if available) [yes]
> 
> 
> The lpack linking
> 
> --with-lapack="-L/path/to/libs -llapack -lcblas"
> 
> was the reason why I thought I could at least give it a try with the command
> 
> --with-readline="-L/$HOME/vol/readline"
> 
> However, I admit I missed the passage about the LDFLAGS and should have
> search more thoroughly in the docu. Still I'm a little bit confused where
> the current remaining problem is. I gave it a try with readline 5.0, which
> seem to me to be the newest version not needing any patches, same problem.
> Is this some compiler and linker problem?
> 
> regards,
> benjamin
> 
> 
>  which was the reason why I thought I could give it
> 
> 
> 
>>-----Original Message-----
>>From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
>>Sent: 02 February 2006 14:39
>>To: Benjamin Otto
>>Cc: r-devel at stat.math.ethz.ch
>>Subject: Re: [R] readline detection problems
>>
>>
>>Moved to R-devel: please see the posting guide.  This WAY off topic for
>>R-help.
>>
>>Please do read the installation manual:  configure --help says
>>
>>   --with-readline         use readline library (if available) [yes]
>>
>>and note, no path can be specified.  The installation manual says
>>
>>   If you have libraries and header files, e.g., for GNU readline, in
>>   non-system directories, use the variables LDFLAGS (for libraries, using
>>   `-L' flags to be passed to the linker) and CPPFLAGS (for header files,
>>   using `-I' flags to be passed to the C/C++ preprocessors),
>>respectively,
>>   to specify these locations. These default to LDFLAGS=-L/usr/local/lib
>>   (/usr/local/lib64 on most 64-bit Linux OSes) and
>>   CPPFLAGS=-I/usr/local/include to catch the most common cases.
>>
>>My guess is that you need something like
>>
>>CPPFLAGS=-I/usr/local/include -I/home3/fa/faga001/vol/readline-5.1/include
>>LDFLAGS=-L/usr/local/lib -L/home3/fa/faga001/vol/readline-5.1/lib
>>
>>If this really is readline-5.1, don't use it.  It needs a patch
>>(I believe
>>the one found on the GNU mirror suffices) or it is badly broken,
>>enough to
>>crash the calling application.
>>
>>
>>On Thu, 2 Feb 2006, Benjamin Otto wrote:
>>
>>
>>>Dear community,
>>>
>>>I'm trying to install R-2.2.1 on an IRIX 6.2 (Unix System V Release 4)
>>>system without root access. Unfortunately readline is not installed in
>>>default, so I installed it locally in my home directory, more
>>
>>precisely in:
>>
>>>$HOME/vol/readline-5.1, where $HOME is "/home3/fa/faga001". Afterwards I
>>>appended the path to the library with several $PATH variable, which now
>>>looks like:
>>>
>>>
>>
>>PATH=:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/loc
>>al/bin:/us
>>
>>r/freeware/bin:/usr/local/bin:.:/home3/fa/faga001/vol:/home3/fa/fa
>>ga001/vol/
>>
>>>readline-5.1:/home3/fa/faga001/vol/readline-5.1/lib
>>>
>>>Still, readline is not detected by the configure script. I tried the
>>>commands:
>>>
>>>./configure --with-readline="-L/$HOME/vol/readline"
>>>./configure --with-readline="/$HOME/vol/readline"
>>>./configure --with-readline=/$HOME/vol/readline
>>>./configure --x-includes="-L/$HOME/vol/readline"
>>>./configure --x-includes="/$HOME/vol/readline"
>>>./configure --x-libraries="-L/$HOME/vol/readline"
>>>./configure --x-libraries="/$HOME/vol/readline"
>>>
>>>trying out the different path variants which I previously
>>
>>included in the
>>
>>>$PATH variable. Nothing helps yet. According to printenv there
>>
>>is currently
>>
>>>no kind of $LIBRARY or sth. like that defined, but maybe the path should
>>>rather be included in such an env. variable, I didn't find any
>>
>>hint in the
>>
>>>documentation.
>>>
>>>Has someone an idea how I should link my local readline
>>
>>correctly, so that
>>
>>>the library is found not only during installtion but afterwards too?
>>
>>--
>>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
>>
> 
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list