Re: BUG #6732: Build issue when using gettext on FreeBSD 9 - Mailing list pgsql-bugs

From Christian Ullrich
Subject Re: BUG #6732: Build issue when using gettext on FreeBSD 9
Date
Msg-id 4FFF6503.1020301@chrullrich.net
Whole thread Raw
In response to Re: BUG #6732: Build issue when using gettext on FreeBSD 9  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #6732: Build issue when using gettext on FreeBSD 9
List pgsql-bugs
* Tom Lane wrote:

> chris@chrullrich.net writes:

> Could we make the problem go away for you if we changed the order in
> which these libraries are probed for?  That's a hack, surely, but it
> seems like one much less likely to break other working cases than any
> of the alternatives you suggest.

To fix this specific issue, it would work to test gettext before
Kerberos. On the other hand, the same thing is going to happen for every
"downward" dependency (where a library higher up in configure depends on
one tested later).

I think I have a pretty good fix: Early in configure, see if the linker
understands --no-copy-dt-needed-entries, or alternatively
--no-add-needed (which is a deprecated name for the same thing). This is
the "light" version of --as-needed: It does not discard unneeded
libraries immediately, but ignores their dependencies. configure
basically works as before, except that indirect dependencies cannot
"hide" required libraries from it anymore.

And a workaround specific to FreeBSD: There is a port for the current
version of binutils (2.22), in which --no-copy-dt-needed-entries is the
default. This can be done relatively easily, by first installing the
binutils port and then installing Postgres with CFLAGS=-B/usr/local/bin .

--
Christian

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)
Next
From: Christian Ullrich
Date:
Subject: Re: BUG #6732: Build issue when using gettext on FreeBSD 9