Re: 9.2 won't load C-language function

Поиск
Список
Период
Сортировка
Искать
От
Craig Ringer
Тема
Re: 9.2 won't load C-language function
Дата
Msg-id
5076544E.60307@ringerc.id.au
Ответ на
Список
Дерево обсуждения
9.2 won't load C-language function Craig James <cjames@emolecules.com>
Re: 9.2 won't load C-language function Tom Lane <tgl@sss.pgh.pa.us>
Re: 9.2 won't load C-language function Craig Ringer <ringerc@ringerc.id.au>
Re: 9.2 won't load C-language function Craig James <cjames@emolecules.com>
On 10/11/2012 02:22 AM, Craig James wrote:
> I have a C-language function I've been using on 8.4 for a long time.  On
> 9.2 it won't load:
>
> test=# set search_path = public;
> SET
> test=# CREATE OR REPLACE FUNCTION chmoogle_session_id() RETURNS integer
> AS '/usr/local/pgsql/lib/libchmoogle.so', 'chmoogle_session_id'
> LANGUAGE c VOLATILE;
> ERROR:  could not load library "/usr/local/pgsql/lib/libchmoogle.so":
> libopenbabel.so.4: cannot open shared object file: No such file or directory

What does `ldd /usr/local/pgsql/lib/libchmoogle.so` say? What about when 
run under the PostgreSQL user account?

You may need to set LD_LIBRARY_PATH in the Pg startup script, or modify 
ld.so.conf, or re-build your extension with rpath linking enabled.

As for why it worked with 8.4 - I expect you either altered 
LD_LIBRARY_PATH in the 8.4 startup scripts, or maybe the 8.4 version of 
the extension was built with -Wl,-rpath so the paths to required 
libraries were embedded into the extension library.

--
Craig Ringer

В списке pgsql-admin по дате отправления
От: Craig Ringer
Дата:
Сообщение: Re: Pg 8.3.x on RHEL 6.3?
От: Bruce Momjian
Дата:
Сообщение: Re: Pg 8.3.x on RHEL 6.3?
FAQ