lusth wrote:
> version: libreadline.so.5, libhistory.so.5
> machines: intel i386, AMD 64
> OS: ubuntu 9.04
> compilation flags: none
> description:
> if readline/history program is compiled like so:
>
> gcc prog.c -lhistory -lreadline
>
> the program seg faults when attempting to recover
> a string stored in the history. Program:
> #include <readline/readline.h>
> #include <readline/history.h>
> int main()
> {
> add_history("whoa");
> (void) readline("enter: "); #user enters up-arrow here
> return 0;
> }
>
> fix: reverse order of libraries:
>
> gcc prog.c -lreadline -lhistory
>
> comment: order of libraries should not matter since readline and
> history are closely coupled.
I can reproduce this using the debian versions of the libraries, but
I can't get a stack traceback with enough useful information to see
where the problem might be.
I can't reproduce it using static or dynamic libraries built from
readline-5.2.013 source.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline