PG Extensions: Must be statically linked?

Поиск
Список
Период
Сортировка
От Craig A. James
Тема PG Extensions: Must be statically linked?
Дата
Msg-id 44076707.8030804@modgraph-usa.com
обсуждение исходный текст
Ответы Re: PG Extensions: Must be statically linked?  (Peter Eisentraut <peter_e@gmx.net>)
Re: PG Extensions: Must be statically linked?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I'm creating user-defined server extensions, written in C per the manual "31.9. C-Language Functions".  Everything
workswell, but only if I fully link the .so such that there are *no* unresolved external references at all.  Not even
thestuff in libstdc++.a can be left out.  I've tried setting LD_LIBRARY_PATH everywhere possible, with no luck.  Here's
themake(1) line I have to use to link:
 

libmyfuncs.so.0.0:gcc -Wall -Wmissing-prototypes -Wpointer-arith \  -Wdeclaration-after-statement
-Wold-style-definition-Wendif-labels \  -fno-strict-aliasing -fpic -shared -Wl,-soname,libmyfuncs.so.0  \  $(OBJS) \
$(MYLIB)/lib/libmylibs.a\  /usr/lib/gcc/i386-redhat-linux/3.4.2/libstdc++.a \  -o libmyfuncs.so.0.0
 

Is this correct?  Do Postgres extension need to be fully statically linked?  Or is there some configuration that will
specifyLD_LIBRARY_PATH (or perhaps a Postgres-specific equivalent).
 

The manual's instructions are good regarding writing code, but don't say much about linking.

Thanks,
Craig


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Uninstall script errors
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: PG Extensions: Must be statically linked?