Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YZoaZ-00021f-F5 for pgsql-admin@arkaria.postgresql.org; Sun, 22 Mar 2015 22:43:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YZoaY-0002Rz-Sz for pgsql-admin@arkaria.postgresql.org; Sun, 22 Mar 2015 22:43:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YZoaX-0002Rs-Na for pgsql-admin@postgresql.org; Sun, 22 Mar 2015 22:43:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YZoaO-00021j-D8 for pgsql-admin@postgresql.org; Sun, 22 Mar 2015 22:43:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t2MMhAhZ003534; Sun, 22 Mar 2015 18:43:10 -0400 From: Tom Lane To: Scott Ribe cc: Postgres Maillist Subject: Re: unix socket location confusion In-reply-to: <3184.1427063304@sss.pgh.pa.us> References: <0A21BC93-7B9C-476E-AAF4-0FF71708E87F@elevated-dev.com> <3184.1427063304@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 22 Mar 2015 18:28:24 -0400" Date: Sun, 22 Mar 2015 18:43:10 -0400 Message-ID: <3533.1427064190@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org I wrote: > Evidently your psql is linking to this libpq and not the one you built. > You can fix that with suitable use of rpath; although I'm not sure why > an out-of-the-box build doesn't do that for you. It works fine for > me: > $ otool -L ~/testversion/bin/psql > /Users/tgl/testversion/bin/psql: > /Users/tgl/testversion/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.8.0) > /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) > and I don't believe I'm using any nondefault switches to get that. I poked around a bit more and remembered what it is that makes it work: you need an -install_name switch when building libpq.dylib (and then the link of psql has to be sure to reference that .dylib file). For example I see this as part of the libpq link step: -install_name '/Users/tgl/testversion/lib/libpq.5.dylib' after having configured with "--prefix=/Users/tgl/testversion". So this works only if your libpq.dylib is actually installed at the location that was expected when you built it. The recipe you gave looks like it should have done that, but I'm suspicious that the answer is somewhere near here. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin