Re: Figured it out (psql and Gnu readline)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Figured it out (psql and Gnu readline)
Дата
Msg-id 26067.963449458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Figured it out (psql and Gnu readline)  (Erich <hh@cyberpass.net>)
Ответы Re: Figured it out (psql and Gnu readline)  (Erich <hh@cyberpass.net>)
Re: Figured it out (psql and Gnu readline)  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-general
Erich <hh@cyberpass.net> writes:
>> configure is supposed to handle all that for you ... if it failed to
>> find the right location of libreadline and associated includes then
>> the question is why.  You sure you ran configure after installing
>> the include files?

> I just deleted my postgres tree, and then unpacked it again, and ran
> configure again.  libreadline.a and libhistory.a are in
> /usr/local/lib/.  readline.h and history.h are in
> /usr/local/include/readline/.

OK ... my setup has the same files in the same places ...

> I then ran ./configure.

> When I look at config.h, I can see that it failed to detect
> /usr/local/include/readline/history.h.  Also, I see that it did define
> HAVE_HISTORY_IN_READLINE 1 which is incorrect.  I would have to make
> the change by hand to the file.

Well, that's darn peculiar.  configure.in has a test for
readline/history.h, big as life:
    AC_CHECK_HEADERS(readline/history.h)
Does the config.log file show why it failed to find the include?

HAVE_HISTORY_IN_READLINE seems to get defined if libreadline.a contains
a "using_history" symbol:

AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
    AC_CHECK_LIB(history,  main) )


On my setup, which is readline 4.0 if I'm checking the right files,
HAVE_HISTORY_IN_READLINE does get defined, and AFAICT libhistory.a
doesn't get linked, but I most certainly do get history support.

Which readline version are you using?  Maybe the GNU guys rearranged
which functions live in which library.  If so, we probably need
to be probing for a different symbol in libreadline to be compatible
across more libreadline versions ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Triggers with arguments
Следующее
От: Philip Warner
Дата:
Сообщение: Re: RE: [HACKERS] pg_dump & blobs - editable dump?