probably needless linking against readline and ncurses

Started by Reinhard Maxalmost 21 years ago3 messages
#1Reinhard Max
Reinhard@m4x.de

Hi,

it appears all of PostgreSQL's binaries are linked against libreadline and
libncurses, but the only one that really needs them seems to be psql.

Is there a reason behind this other than that it might be easier to have
only one set of linker switches that can be used for everything?

cu
Reinhard

#2Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Reinhard Max (#1)
Re: probably needless linking against readline and ncurses

On Mon, Apr 11, 2005 at 02:46:09PM +0200, Reinhard Max wrote:

it appears all of PostgreSQL's binaries are linked against libreadline and
libncurses, but the only one that really needs them seems to be psql.

Is there a reason behind this other than that it might be easier to have
only one set of linker switches that can be used for everything?

No. In fact somebody came up with a patch to solve that and it was
rejected because of maintenability (or portability) issues.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
FOO MANE PADME HUM

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Reinhard Max (#1)
Re: probably needless linking against readline and ncurses

Reinhard Max <Reinhard@m4x.de> writes:

it appears all of PostgreSQL's binaries are linked against libreadline and
libncurses, but the only one that really needs them seems to be psql.
Is there a reason behind this other than that it might be easier to have
only one set of linker switches that can be used for everything?

Exactly. Autoconf isn't really very helpful about generating multiple
sets of library lists within one package, and it's never been worth the
trouble to deal with that.

On some platforms there's a linker switch that can be used to prevent
useless libraries from being bound to the executable. We probably ought
to use that where available.

regards, tom lane