Re: unix socket location confusion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unix socket location confusion
Дата
Msg-id 3533.1427064190@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: unix socket location confusion  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unix socket location confusion  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
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


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unix socket location confusion
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: unix socket location confusion