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

From Peter Eisentraut
Subject Re: BUG #6732: Build issue when using gettext on FreeBSD 9
Date
Msg-id 1342462398.7129.5.camel@vanquo.pezone.net
Whole thread Raw
In response to BUG #6732: Build issue when using gettext on FreeBSD 9  (chris@chrullrich.net)
List pgsql-bugs
On tor, 2012-07-12 at 15:25 +0000, chris@chrullrich.net wrote:
> The PostgreSQL configure script indiscriminately enables the --as-needed
> option to the linker if the linker supports it, which GNU ld 2.17.50 in
> FreeBSD 9 does. It does not, however, use it in its own library checks. The
> configure script therefore fails to detect libintl as required; the check
> program links correctly because libintl is pulled in as an indirect
> dependency via libgssapi.

> Proposed fix: Use --as-needed during configure as well, or make its use
> predicated on a working linker version (GNU ld 2.22 or later).

Over the weekend I was investigating a separate but related issue on
Debian, which goes like this:

configure with --with-libedit-preferred, or have libedit but not
libreadline installed.  Because libedit is linked with libbsd, which
provides setproctitle, the check for function setproctitle succeeds.
Thus, ps_status.c is compiled using the setproctitle variant.  When
postgres is linked, however, we don't put libedit on the command line,
so the link fails.

The workaround/solution I came up with was also to put
LDFLAGS=-Wl,--as-needed on the configure command line to run the tests
with that flag as well.  With that, the setproctitle test fails.

To add insult to injury, the setproctitle implementation in libbsd is a
stub that doesn't do anything, so we definitely don't want to arrive at
a solution that ends up using it.

pgsql-bugs by date:

Previous
From: Mike Wilson
Date:
Subject: Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)
Next
From: Mike Wilson
Date:
Subject: Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)