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 1m2GjW-0007SO-UG for pgsql-bugs@arkaria.postgresql.org; Sat, 10 Jul 2021 17:25:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m2GjV-0003XH-MA for pgsql-bugs@arkaria.postgresql.org; Sat, 10 Jul 2021 17:25:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2GjV-0003X9-FU for pgsql-bugs@lists.postgresql.org; Sat, 10 Jul 2021 17:25:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m2GjP-0004zw-HS for pgsql-bugs@lists.postgresql.org; Sat, 10 Jul 2021 17:25:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16AHPXnh2407483; Sat, 10 Jul 2021 13:25:33 -0400 From: Tom Lane To: Michael Paquier cc: Daniel Gustafsson , Adrian Ho , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x In-reply-to: <2377740.1625928629@sss.pgh.pa.us> References: <1677203.1625582865@sss.pgh.pa.us> <1860066.1625677051@sss.pgh.pa.us> <68D22062-EC78-47C5-BC46-EF2F77193E19@yesql.se> <2040197.1625774127@sss.pgh.pa.us> <2229967.1625848816@sss.pgh.pa.us> <2377740.1625928629@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 10 Jul 2021 10:50:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2407481.1625937933.1@sss.pgh.pa.us> Date: Sat, 10 Jul 2021 13:25:33 -0400 Message-ID: <2407482.1625937933@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Oh, that's interesting. elver's failure seems to be because it's now > deciding it doesn't HAVE_LDAP_INITIALIZE. However, on my RHEL8 machine > the current configure coding is still finding ldap_initialize; ... or not. I must have been seeing what I expected to see yesterday, because when I check it again now, it isn't finding ldap_initialize. Close inspection of the Autoconf manual reveals the problem: AC_CHECK_LIB updates LIBS only as part of its *default* success action, which the current coding isn't using for libldap_r. So we arrive at the ldap_initialize test with neither library in LIBS. But we really ought to probe libldap not libldap_r for ldap_initialize, because we use that only on the backend side. So the right fix is to do that probe before we mess around with libldap_r, which I've now done. regards, tom lane