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

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

From
Larry Rosenman
Date:
On Nov 28 2005, Martijn van Oosterhout wrote:

> 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.

-lnsl is needed on SVR4 derivatives, like Solaris and UnixWare.  it is the
network services library.

You'll needed it for ANY socket based code on these platforms.

LER

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 3535 Gaspar Drive, Dallas, TX 75220-3611


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

From
Tom Lane
Date:
Larry Rosenman <ler@lerctr.org> writes:
> -lnsl is needed on SVR4 derivatives, like Solaris and UnixWare.  it is the
> network services library.

> You'll needed it for ANY socket based code on these platforms.

Is there any specific function symbol we can test for in that library?
If it exports something like socket() or connect() on SVR4, we can make
configure probe for that instead of blindly including the library.

            regards, tom lane