Re: Reduce dependancies of postmaster (without --as-needed)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Reduce dependancies of postmaster (without --as-needed)
Date: 2005-11-28 15:18:08
Message-ID: 10000.1133191088@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2005-11-28 16:56:05 Re: Install pg_regress by default
Previous Message Volkan YAZICI 2005-11-28 14:49:54 Re: Case Conversion Fix for MB Chars