[R] Problem in compilation from source in./configure R.2.2

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Nov 22 15:18:08 CET 2005


Pedro Cordeiro Estrela <pedroestrela at yahoo.com> writes:

> I tried to get old libraries (libreadline4) installed without success.
>  If the configure script checks for old versions of the readline library can't we just comment the corresponding lines?

No, because the code in question still needs to work. If it doesn't,
then you cannot compile against libreadline, you'll just get the error
further down the line.
 
> 

[You need to work on your quoting mechanisms: The next two paragraphs
were from my mail to you, but it doesn't show] 

> This check is in there to check for some really old readline versions
> that didn't allow the style of readline interface that R used. Do you
> happen to have such an older version that could get picked up by the
> linker? 
> 
>    
>    
>  
> What's inside config.log corresponding to the messages? These tests
> generally work by compiling and linking a small test program, and if
> that fails, you get the "no" part. However, sometimes the program
> fails for some other reason and the message becomes misleading.



[and now it's you talking again]
> 
> 
> Here what's in the config.log file for the readline part.
>  Thanks a lot!
>  
>  configure:21592: result: yes
>  configure:21627: checking for readline/readline.h
>  configure:21634: result: yes
>  configure:21652: checking for rl_callback_read_char in -lreadline
>  configure:21682: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lreadline   >&5
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tgetnum'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tgoto'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tgetflag'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `BC'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tputs'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `PC'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tgetent'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `UP'
>  /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/../../../libreadline.so: undefined reference to `tgetstr'


Oho, now those are ncurses routines, which suggests that you need to
install ncurses or ncurses-devel (or so, I'm not aware of how 
Mandrake/-driva organizes things). Either that, or you need to include
-lncurses in the --with-readline stuff.

>  collect2: ld returned 1 exit status
>  configure:21688: $? = 1
>  configure: failed program was:
>  | /* confdefs.h.  */
>  | 
>  | #define PACKAGE_NAME "R"
>  | #define PACKAGE_TARNAME "R"
>  | #define PACKAGE_VERSION "2.2.0"
>  | #define PACKAGE_STRING "R 2.2.0"
>  | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
>  | #define PACKAGE "R"
>  | #define VERSION "2.2.0"
>  | #define R_PLATFORM "i686-pc-linux-gnu"
>  | #define R_CPU "i686"
>  | #define R_VENDOR "pc"
>  | #define R_OS "linux-gnu"
>  | #define Unix 1
>  | #ifdef __cplusplus
>  | extern "C" void std::exit (int) throw (); using std::exit;
>  | #endif
>  | #define STDC_HEADERS 1
>  | #define HAVE_SYS_TYPES_H 1
>  | #define HAVE_SYS_STAT_H 1
>  | #define HAVE_STDLIB_H 1
>  | #define HAVE_STRING_H 1
>  | #define HAVE_MEMORY_H 1
>  | #define HAVE_STRINGS_H 1
>  | #define HAVE_INTTYPES_H 1
>  | #define HAVE_STDINT_H 1
>  | #define HAVE_UNISTD_H 1
>  | #define HAVE_DLFCN_H 1
>  | #define HAVE_LIBM 1
>  | #define HAVE_LIBDL 1
>  | #define HAVE_READLINE_HISTORY_H 1
>  | #define HAVE_READLINE_READLINE_H 1
>  | /* end confdefs.h.  */
>  | 
>  | /* Override any gcc2 internal prototype to avoid an error.  */
>  | #ifdef __cplusplus
>  | extern "C"
>  | #endif
>  | /* We use char because int might match the return type of a gcc2
>  |    builtin and then its argument prototype would still apply.  */
>  | char rl_callback_read_char ();
>  | int
>  | main ()
>  | {
>  | rl_callback_read_char ();
>  |   ;
>  |   return 0;
>  | }
>  configure:21714: result: no
>  configure:21730: checking for main in -lncurses
>  configure:21754: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib conftest.c -lncurses   >&5
>  /usr/bin/ld: cannot find -lncurses
>  collect2: ld returned 1 exit status
>  configure:21760: $? = 1
>  configure: failed program was:
>  | /* confdefs.h.  */
>  | 
>  | #define PACKAGE_NAME "R"
>  | #define PACKAGE_TARNAME "R"
>  | #define PACKAGE_VERSION "2.2.0"
>  | #define PACKAGE_STRING "R 2.2.0"
>  | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
>  | #define PACKAGE "R"
>  | #define VERSION "2.2.0"
>  | #define R_PLATFORM "i686-pc-linux-gnu"
>  | #define R_CPU "i686"
>  | #define R_VENDOR "pc"
>  | #define R_OS "linux-gnu"
>  | #define Unix 1
>  | #ifdef __cplusplus
>  | extern "C" void std::exit (int) throw (); using std::exit;
>  | #endif
>  | #define STDC_HEADERS 1
>  | #define HAVE_SYS_TYPES_H 1
>  | #define HAVE_SYS_STAT_H 1
>  | #define HAVE_STDLIB_H 1
>  | #define HAVE_STRING_H 1
>  | #define HAVE_MEMORY_H 1
>  | #define HAVE_STRINGS_H 1
>  | #define HAVE_INTTYPES_H 1
>  | #define HAVE_STDINT_H 1
>  | #define HAVE_UNISTD_H 1
>  | #define HAVE_DLFCN_H 1
>  | #define HAVE_LIBM 1
>  | #define HAVE_LIBDL 1
>  | #define HAVE_READLINE_HISTORY_H 1
>  | #define HAVE_READLINE_READLINE_H 1
>  | /* end confdefs.h.  */
>  | 
>  | 
>  | int
>  | main ()
>  | {
>  | main ();
>  |   ;
>  |   return 0;
>  | }
>  
> 
> 
> 
> ____________________________________________________________
> 
> Pedro Cordeiro Estrela
> PhD. student
> 
> UMR 2695: Origine structure et Ã©volution de la biodiversitÃ©
> DÃ©partement de systÃ©matique et Ã©volution
> MusÃ©um National d'Histoire Naturelle 
> 
> 55, rue Buffon
> 75005
> Paris - FRANCE
> 
> tel: (33) [0]1 40 79 30 86
> fax: (33) [0]1 40 79 30 63
> [0] : from france only
> _____________________________________________________________
> 		
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.  

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list