Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D71581E3525D for ; Thu, 12 Jul 2012 21:00:34 -0300 (ADT) Received: from mail-wg0-f49.google.com ([74.125.82.49]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SpTJA-0006Mk-87 for pgsql-bugs@postgresql.org; Fri, 13 Jul 2012 00:00:34 +0000 Received: by wgbez12 with SMTP id ez12so1524285wgb.30 for ; Thu, 12 Jul 2012 17:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrullrich.net; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PuwL7zEWcy+cZEpwyw9aZ4eWx58K2V7r1vlulvoj658=; b=TSXhP4spcYipMFyPSi0aKNm0W6aI3w1Vw669Ts3WZja8LpmqiS4WlShHfMU5XThg+H EeiaBHF55K00YMCODOA9hEESizPbNeNIJQ5PWoYO3Nmd+oytn4Fba2a4dpuacd4ZQo2D e4MqGxdQAKPHF7lQ1zID5hzDqw8zn96Osg+Vc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=PuwL7zEWcy+cZEpwyw9aZ4eWx58K2V7r1vlulvoj658=; b=HN8ghm/MnG1ABGRU5zAfeTq+UHgZR/r2hiieNzbhHUyy0OsEDIkx9kHRIIXIE3FoUF jjOAn/QdmpY+3cWnJ9jJOH6Bk0yEylcjN5SAgTjcuq8rn+dpVKIg3K76qoQKshUzesOp wDlAR93R2ExO406/TWGJms4hFiRs1zl097jrPmvbN0vNdJdI3/F2UVA2/ClPsJjt19Wg m19aNwVgP82Fbj7N4xXs2LuYH4DKZaoHK1c38BWLDIyQPsxWRgeVabEOOns+Sx33Ud02 tpPrgvNJZ8q0i4SWKt3ydjhHgL05vHq467IpDh28FWgmBeKaVefXkM265/4cjgZSkxzV qzrA== Received: by 10.180.100.136 with SMTP id ey8mr583984wib.15.1342137619196; Thu, 12 Jul 2012 17:00:19 -0700 (PDT) Received: from [192.168.2.23] (p5081EBFB.dip.t-dialin.net. [80.129.235.251]) by mx.google.com with ESMTPS id fb20sm573910wid.1.2012.07.12.17.00.16 (version=SSLv3 cipher=OTHER); Thu, 12 Jul 2012 17:00:18 -0700 (PDT) Message-ID: <4FFF6503.1020301@chrullrich.net> Date: Fri, 13 Jul 2012 02:00:03 +0200 From: Christian Ullrich User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6732: Build issue when using gettext on FreeBSD 9 References: <29635.1342113922@sss.pgh.pa.us> In-Reply-To: <29635.1342113922@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQk5/TRTj2MtNZdFWO5W/8i/rn0VPlUUUhrD+AIy83XJnYkkQ8EFpEY0e1hCuiRD1SJtQNxH X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201207/92 X-Sequence-Number: 33568 * 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