Re: Missing magic block
От | Mario Munda |
---|---|
Тема | Re: Missing magic block |
Дата | |
Msg-id | 1178868420.304740.143250@q75g2000hsh.googlegroups.com обсуждение исходный текст |
Ответ на | Re: Missing magic block (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Missing magic block
|
Список | pgsql-general |
I've changed: #ifdef PG_MODULE_MAGIC PG_MODULE_MAGIC; #endif to: #define PG_MODULE_MAGIC ; and the .so does compile, but the database is still reporting the same error when i try to CREATE FUNCTION: ERROR: incompatible library "/home/mario/tests/psql_c_func/ test_func.so": missing magic block HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro. I searched for all fmgr.h files in the /usr and i got the output: /usr/local/include/postgresql/server/storage/bufmgr.h /usr/local/include/postgresql/server/fmgr.h /usr/local/include/postgresql/server/fmgr.h.gch /usr/local/pgsql/include/server/storage/bufmgr.h /usr/local/pgsql/include/server/fmgr.h So there obviously are more headers on the system, but i've tried to compile the .so with the second and the last one. Both time the same result. Tom Lane je napisal: > Mario Munda <mario.munda@gmail.com> writes: > > I had to comment some includes out, or else i get some errors. > > Perhaps you are compiling against an old or incomplete set of > Postgres header files? > > > #ifdef PG_MODULE_MAGIC > > PG_MODULE_MAGIC; > > #endif > > The problem with that coding is that it will silently not produce > a magic block if you are compiling against pre-8.2 Postgres headers. > If you remove the #ifdef protection does it still compile? > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings
В списке pgsql-general по дате отправления: