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 1nmGxG-0006Em-9K for pgsql-hackers@arkaria.postgresql.org; Wed, 04 May 2022 15:30:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nmGxF-0002ZQ-5M for pgsql-hackers@arkaria.postgresql.org; Wed, 04 May 2022 15:30:17 +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 1nmGxE-0002ZE-SN for pgsql-hackers@lists.postgresql.org; Wed, 04 May 2022 15:30:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmGxC-0001DL-NF for pgsql-hackers@postgresql.org; Wed, 04 May 2022 15:30:16 +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 244FUC6A2360303; Wed, 4 May 2022 11:30:12 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: configure openldap crash warning In-reply-to: <2358598.1651677372@sss.pgh.pa.us> References: <1832824.1651500238@sss.pgh.pa.us> <2358598.1651677372@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 04 May 2022 11:16:12 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2360301.1651678212.1@sss.pgh.pa.us> Date: Wed, 04 May 2022 11:30:12 -0400 Message-ID: <2360302.1651678212@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Peter Eisentraut writes: >> I tried building with Homebrew-supplied openldap. What ends up >> happening is that the postgres binary is indeed linked with openldap, >> but libpq still is linked against the OS-supplied LDAP framework. >> (Checked with "otool -L" in each case.) Can someone else reproduce >> this, too? > [ it works with MacPorts ] Oh, I have a theory about this: I bet your Homebrew installation has a recent OpenLDAP version that only supplies libldap not libldap_r. In that case, configure will still find libldap_r available and will bind libpq to it, and you get the observed result. The configure check is not sophisticated enough to realize that it's finding chunks of two different OpenLDAP installations. Not sure about a good fix. If we had a way to detect which library file AC_CHECK_LIB finds, we could verify that libldap and libldap_r come from the same directory ... but I don't think we have that. regards, tom lane