Re: Use of zlib - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use of zlib
Date
Msg-id 26809.1095955554@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use of zlib  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I'm not sure I understand why keeping track of what we need for each 
> executable is such a difficult task, though. I count 23 executables and 
> a handful of libraries.  Is this such a herculean task?

"Handful"?  I count 32 AC_CHECK_LIB and AC_SEARCH_LIBS calls in
configure.in.

But that's only part of the problem.  Consider that many of these
libraries are interdependent to some extent.  The raw results from
Autoconf tell you that libfoo is available and we could link with it,
but not whether libfoo requires the previously-checked libbar to link.
We'd need to redo the whole library detection process for each
executable in order to be perfectly accurate about this.  Since the
Autoconf macros only cope with one LIBS list, that means throwing away
the Autoconf macros and writing our own.

Multiply that by N supported platforms, and you start to see why this is
a mess.  It's certainly work far out of proportion to the actual value
of not linking some unneeded libraries.

Adding "--as-needed" on platforms that support it seems like a
reasonable amount of work to expend in comparison to the value received.
Trying to do it manually does not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: BUG: possible busy loop when connection is closed
Next
From: Tom Lane
Date:
Subject: Re: BUG: possible busy loop when connection is closed while trying to establish SSL connection