From: | Mario Munda <mario(dot)munda(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Missing magic block |
Date: | 2007-05-11 07:27:00 |
Message-ID: | 1178868420.304740.143250@q75g2000hsh.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)munda(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | anhtin | 2007-05-11 07:37:06 | Re: backup and restore |
Previous Message | Magnus Hagander | 2007-05-11 07:23:07 | Re: tokenize string for tsearch? |