Extension rpath issues on MacOS

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Extension rpath issues on MacOS
Дата
Msg-id C8A430EA-8E71-4760-99FF-2851DD4B2F22@thebuild.com
обсуждение исходный текст
Ответы Re: Extension rpath issues on MacOS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm attempting to build the pgspider JDBC foreign data wrapper on MacOS, and not having an enormously successful time.
Thedriver source is at: 

    https://github.com/pgspider/jdbc_fdw

It (unsurprisingly) needs to link with libjvm.dylib, so I've included the path to it in the PostgreSQL ./configure
LDFLAGS. (It's being built outside of contrib/ using PGXS.)  It compiles and installs successfully, but can't find
libjvmat runtime: 

j=# create extension jdbc_fdw;
ERROR:  could not load library "/usr/local/pgsql/lib/jdbc_fdw.so": dlopen(/usr/local/pgsql/lib/jdbc_fdw.so, 10):
Librarynot loaded: @rpath/libjvm.dylib 
  Referenced from: /usr/local/pgsql/lib/jdbc_fdw.so
  Reason: image not found

That's not a big surprise, because the .so uses @rpath in its path to libjvm:

$ otool -L /usr/local/pgsql/lib/jdbc_fdw.so
/usr/local/pgsql/lib/jdbc_fdw.so:
    /usr/local/pgsql/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.14.0)
    @rpath/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

I could patch it with `install_name_tool`, but I'd like to keep the Makefile intact and non-MacOS-specific.  Ideally,
I'dlike it use an absolute path there. 

Has anyone encountered this situation (not libjvm in particular, just an external library using @rpath) during an
extensionbuild? 


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

Предыдущее
От: "Hilbert, Karin"
Дата:
Сообщение: Re: New message in PostgreSQL log regarding socket for statistics collector
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extension rpath issues on MacOS