Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0lxt-0004n2-92 for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jul 2021 14:22:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m0lxr-0002lT-WB for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jul 2021 14:22:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0lxr-0002lL-Am for pgsql-bugs@lists.postgresql.org; Tue, 06 Jul 2021 14:22:19 +0000 Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0lxm-0007Nq-5g for pgsql-bugs@lists.postgresql.org; Tue, 06 Jul 2021 14:22:18 +0000 X-Sender-Id: dreamhost|x-authsender|03s_mobile@tclish.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6E22F5A2F43; Tue, 6 Jul 2021 14:22:09 +0000 (UTC) Received: from pdx1-sub0-mail-a46.g.dreamhost.com (100-101-162-64.trex-nlb.outbound.svc.cluster.local [100.101.162.64]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0A98D5A2F34; Tue, 6 Jul 2021 14:22:06 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|03s_mobile@tclish.org Received: from pdx1-sub0-mail-a46.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.64 (trex/6.3.3); Tue, 06 Jul 2021 14:22:09 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|03s_mobile@tclish.org X-MailChannels-Auth-Id: dreamhost X-Whistle-Language: 3b59d3c94650e040_1625581329140_3770455978 X-MC-Loop-Signature: 1625581329140:1579344980 X-MC-Ingress-Time: 1625581329140 Received: from pdx1-sub0-mail-a46.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTP id B79E77F50F; Tue, 6 Jul 2021 07:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=03s.net; h=subject:to:cc :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=03s.net; bh=u7MLp4N5o 3bXJP7tK5wWebP2tVc=; b=qPwT7m9Tkyz22oZmvFhW3vcH31qhVsCI4IPqi3XJB ITOLDZsgdwwSl0OaKBbp7vBDhillxKlq6DHJmQOuXni5xh7shw0z/PcxX46kmYbF ZjGajXaAsyIu0tEKdGt7k3TR/8SuTlNfSibYMuM97ILsVtTsD1eTQkvb/0LAkJOm +g= Received: from [192.168.99.35] (unknown [112.199.247.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: 03s_mobile@tclish.org) by pdx1-sub0-mail-a46.g.dreamhost.com (Postfix) with ESMTPSA id 8B4A77EF53; Tue, 6 Jul 2021 07:22:03 -0700 (PDT) Subject: Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org References: <17083-a19190d9591946a7@postgresql.org> <1666182.1625579201@sss.pgh.pa.us> X-DH-BACKEND: pdx1-sub0-mail-a46 From: Adrian Ho Message-ID: Date: Tue, 6 Jul 2021 22:22:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1666182.1625579201@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/7/21 9:46 pm, Tom Lane wrote: > PG Bug reporting form writes: >> OpenLDAP 2.5 merged the `ldap_r` and `ldap` libraries, so all per-handle >> routines are now thread-safe by default. > > Hm, does 2.5 exist in the wild yet? I checked Fedora rawhide, which > is my usual go-to platform for bleeding-edge stuff, but they are still > at 2.4.58. Gentoo and some other distros have pushed 2.5.5 out: https://repology.org/project/openldap/badges. This patch actually grew out of fixing the Homebrew Linux PostgreSQL build: https://github.com/Homebrew/homebrew-core/pull/80643 > As for the patch itself, I'm wondering about > > + LDAP_LIBS_FE="${ac_lib:+-l}$ac_lib $EXTRA_LDAP_LIBS" > > That seems undesirably intimate with the implementation details > of AC_SEARCH_LIBS. Surely there's a better way? Hmmm, good point, my Autotools-fu is not very strong. I'll see if there's a blessed way of doing the above, otherwise I'll probably have to test each library separately in an AC_CHECK_LIB cascade instead. -- Best Regards, Adrian