[postgis-devel] PostgreSQL 8.2devel now requires PG_MODULE_MAGIC

Michael Fuhr mike at fuhr.org
Wed May 31 19:27:38 PDT 2006


The PostgreSQL development branch (8.2devel) now requires shared
libraries to have a magic block.  Without the magic block, functions
in shared libraries fail thusly:

postgis=> SELECT postgis_full_version();
ERROR:  incompatible library "/usr/local/pgsql82/lib/liblwgeom.so.1.1": missing magic block
HINT:  Extension libraries are now required to use the PG_MODULE_MAGIC macro.
CONTEXT:  SQL statement "SELECT  postgis_lib_version()"
PL/pgSQL function "postgis_full_version" line 11 at select into variables

Here are some relevant messages and the documentation:

http://archives.postgresql.org/pgsql-patches/2006-05/msg00106.php
http://archives.postgresql.org/pgsql-committers/2006-05/msg00382.php
http://archives.postgresql.org/pgsql-committers/2006-05/msg00394.php
http://developer.postgresql.org/docs/postgres/xfunc-c.html#AEN33753

According to the documentation, an extension module's source code
should have the following somewhere:

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif

-- 
Michael Fuhr



More information about the postgis-devel mailing list