Re: Reduce dependancies of postmaster (without --as-needed) - Mailing list pgsql-patches

From Tom Lane
Subject Re: Reduce dependancies of postmaster (without --as-needed)
Date
Msg-id 10000.1133191088@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reduce dependancies of postmaster (without --as-needed)  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Reduce dependancies of postmaster (without --as-needed)
List pgsql-patches
Martijn van Oosterhout <kleptog@svana.org> writes:
> I've been thinking about -lnsl and -lresolv and it occurred to me that
> maybe on some platforms they are needed. However, on Linux they are
> 100% redundant. There -lnsl provides functions for NIS and YP and
> -lresolv provides functions for making your own DNS packets, neither of
> which PostgreSQL does. Unfortunatly the autoconf test doesn't look for
> a particular function it simply includes the lib if it is present. Does
> anyone remember what required functions are provided by these libs?

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 :-(

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.

            regards, tom lane

pgsql-patches by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: Case Conversion Fix for MB Chars
Next
From: Alvaro Herrera
Date:
Subject: Re: Install pg_regress by default