Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: 4-stroke on March 05, 2010, 06:46:41 AM

Title: Readline
Post by: 4-stroke on March 05, 2010, 06:46:41 AM
I'm trying to compile fim from here:
http://mirrors.aixtools.net/sv/fbi-improved/ (http://mirrors.aixtools.net/sv/fbi-improved/)
Configure complains:
Code: [Select]
checking for rl_replace_line in -lreadline... no
configure: error: *** GNU readline library headers not found !  please install them or run ./configure --disable-readline ***
I've installed readline.tcz and readline-dev.tcz.
 ???
Title: Re: Readline
Post by: Jason W on March 05, 2010, 06:51:15 AM
Did you set the pkg-config path as mentioned here?

http://wiki.tinycorelinux.com/tiki-index.php?page=Creating+Extensions

specifically-
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Title: Re: Readline
Post by: 4-stroke on March 05, 2010, 06:57:48 AM
Did you set the pkg-config path as mentioned here?

http://wiki.tinycorelinux.com/tiki-index.php?page=Creating+Extensions

specifically-
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

Yes I did. And the compiler flags.
Title: Re: Readline
Post by: Juanito on March 05, 2010, 07:00:13 AM
Have a look in config.log - sometimes the error message does not exactly match the actual error that occurred.
Title: Re: Readline
Post by: 4-stroke on March 05, 2010, 07:12:03 AM
There's this:
Code: [Select]
configure:10798: checking for rl_replace_line in -lreadline
configure:10834: g++ -o conftest -g -O2   conftest.cpp -lreadline  -lcurses
       -lm  >&5
/usr/local/bin/ld: cannot find -lcurses
collect2: ld returned 1 exit status
configure:10840: $? = 1
configure: failed program was:
| /* confdefs.h.  */
And this:
 
Code: [Select]
/* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char rl_replace_line ();
| int
| main ()
| {
| return rl_replace_line ();
|   ;
|   return 0;
| }
configure:10858: result: no
configure:10870: error: *** GNU readline library headers not found !  please install them or run ./configure --disable-readline ***
Title: Re: Readline
Post by: Juanito on March 05, 2010, 08:41:18 AM
..so it's probably libcurses that's missing - you could try the ncurses-lib.tcz/ncurses-lib-dev.tcz extensions
Title: Re: Readline
Post by: curaga on March 05, 2010, 08:44:26 AM
libcurses is in the base. Do you have base-dev loaded?
Title: Re: Readline
Post by: robc on March 05, 2010, 09:33:05 AM
libcurses is in the base. Do you have base-dev loaded?
libncurses is in the base, this is looking for libcurses which I don't see in the base.
The headers are in base-dev, but I don't see an actual libcurses  :-\

Have you tried this?
Code: [Select]
sudo ln -s /lib/libncurses.so /lib/libcurses.so
sudo ldconfig
This will make a link to libncurses, should work...

Have you tried configuring with --disable-readline?
Title: Re: Readline
Post by: curaga on March 05, 2010, 09:37:31 AM
Hm, I thought there still was the ld redirection script curses -> ncurses from LFS in base-dev. I guess it was forgotten at some point. Juanito, could it be added?
Title: Re: Readline
Post by: Juanito on March 05, 2010, 09:48:16 AM
Sure - give me a day or two to get around to it  :)
Title: Re: Readline
Post by: 4-stroke on March 05, 2010, 10:40:51 AM
Have you tried this?
Code: [Select]
sudo ln -s /lib/libncurses.so /lib/libcurses.so
sudo ldconfig
This will make a link to libncurses, should work...

Have you tried configuring with --disable-readline?

This worked. There was some warnings though, got to check them out.
Thanks!

Edit: Duh! Forgot to install readline.tcz again. In fact the only thing needed was the symlink.