From: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | compilation with libeditpreferred is broken |
Date: | 2009-08-06 20:26:43 |
Message-ID: | 1249590403.1344.25.camel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
When I try compile postgresql with --libeditpreferred option,
compilation fails when readline is also installed on the system. You can
see error report on:
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=dot_moth&dt=2009-08-06%2012:46:04
The main problem is in src/bin/psql/input.h where is following ifdef
magic:
#define USE_READLINE 1
#if defined(HAVE_READLINE_READLINE_H)
#include <readline/readline.h>
#elif defined(HAVE_EDITLINE_READLINE_H)
#include <editline/readline.h>
#elif defined(HAVE_READLINE_H)
#include <readline.h>
#endif
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#elif defined(HAVE_EDITLINE_HISTORY_H)
#include <editline/history.h>
#elif defined(HAVE_HISTORY_H)
#include <history.h>
#endif
The problem is that libedit does not distribute editline/history.h and
configure detects that there is readline/history.h and sets
HAVE_READLINE_HISTORY_H macro. Finally input.h includes
editline/readline.h and readline/history.h which causes symbol
conflicts.
It seems to me that editline never distributed history.h file and
HAVE_EDITLINE_HISTORY_H is nonsense. But I'm not sure.
I attached suggested fix, but it needs also some work in ./configure -
depends if libedit/history.h existed. Anyone knows a history?
I need to backported this fix for branches 8.2 - 8.4, because
OpenSolaris PostgreSQL binaries build is broken now.
Zdenek
Attachment | Content-Type | Size |
---|---|---|
libedit.patch | text/x-patch | 748 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-08-06 20:34:20 | Re: Table and Index compression |
Previous Message | Alvaro Herrera | 2009-08-06 20:22:37 | Re: "PANIC: cannot make new WAL entries during recovery" in the wild |