Possible explanation for readline configuration problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, andrea gelmini <bungle(at)linux(dot)it>, "Kevin Heflin" <kheflin(at)shreve(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Possible explanation for readline configuration problems
Date: 2001-04-14 03:07:07
Message-ID: 12552.987217627@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We've gotten several different reports lately of peculiar compilation
errors and warnings involving readline in 7.1. They look like configure
is actively doing the wrong thing --- for example, how could we see
reports like this:

tab-complete.c:734: `filename_completion_function' undeclared (first use in this function)
tab-complete.c:734: (Each undeclared identifier is reported only once
tab-complete.c:734: for each function it appears in.)

when the code makes a point of providing a declaration for
filename_completion_function if configure didn't see it in the headers?

After eyeballing the code I think I have a theory. psql/input.h will
preferentially include <readline/readline.h>, not <readline.h>, if both
HAVE_READLINE_READLINE_H and HAVE_READLINE_H are defined. But the tests
in configure make the opposite choice! Maybe the people who are having
trouble have two different versions of readline header files visible at
those two names, leading to configure's results being wrong for the
header file that input.h actually selects?

In normal situations this still wouldn't matter because configure only
defines one of the two symbols HAVE_READLINE_READLINE_H and HAVE_READLINE_H.
BUT: suppose someone runs configure, then installs a newer libreadline
and runs configure again? I think caching of configure results could
lead to both symbols becoming defined, if both headers are out there.

It's a bit of a reach, but I'm having a hard time seeing how configure
could produce the wrong results otherwise. Thoughts?

Andrea and Kevin, what do your src/include/config.h files have for
these symbols?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Butler 2001-04-14 03:17:57 Postmaster fatal defect - pl/pgsql return type conversion
Previous Message Lamar Owen 2001-04-14 02:56:18 7.1-1 RPMset uploading...