Re: BUG #6732: Build issue when using gettext on FreeBSD 9

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: chris(at)chrullrich(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6732: Build issue when using gettext on FreeBSD 9
Date: 2012-07-16 18:13:18
Message-ID: 1342462398.7129.5.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On tor, 2012-07-12 at 15:25 +0000, chris(at)chrullrich(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Mike Wilson 2012-07-16 19:56:25 Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)
Previous Message Mike Wilson 2012-07-16 17:58:11 Re: BUG #6733: All Tables Empty After pg_upgrade (PG 9.2.0 beta 2)