On Mon, Nov 28, 2005 at 10:18:08AM -0500, Tom Lane wrote:
> Pulling those out is just not a good idea; we'd never have included them
> in the first place if they weren't needed on some platforms.  A lot of
> these system libraries are very hard to test for in a reasonable way.
> For instance, IIRC the reason libBSD is needed on HP-UX is that it
> provides POSIX-compatible signal behavior.  The same functions exist in
> libc ... but they work differently :-(

Yeah, but pulling them in when they're not needed is a waste also. I'm
sure that a lot of platforms have -lnsl but I doubt many need it given
it's for NIS/YP support. libBSD doesn't bother me as much because it's
not going to exist on 99% of platforms.

> I think the patch as proposed is entirely wrongheaded, and what it
> should do is filter out the stuff the backend can certainly do without
> (ie, readline and termcap), not make unsupported assumptions that we can
> do without stuff that was at one time put in for a reason.

Sure, you can go that way too. I went this way because that's what the
libpq Makefile does.

It bothers me that we don't even *know* the dependancies or even why
they're there. Those autoconf lines have been there ever since autoconf
use was started. They were added with only the comment "detect these
libraries". If -lnsl or -lresolv is needed for gethostbyname() on some
platform then it should check that that function is actually in that
library before pulling it in, rather than pulling it unconditionally.

I know reducing the library count is not a high priority, but this is
the only time in a release cycle these issues can be resolved. All that
needs to happen is for someone to rerun the final link command removing
all the -l options, noting which symbols it complains about and which
lib they are in. Then change the configure test to:

AC_CHECK_LIB(<lib>, <function>)

Or at least put a comment there saying what platform and what symbol.

The reason I'm bringing this up is that unnecessary dependancies make
upgrading systems unnecessarily complicated due to libs like libpq
pulling in specific versions of libs that conflict with libraries used
by the program using libpq.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpMvzBKyOMCF.pgp
Description: PGP signature

Reply via email to