From: | David Fuhry <dfuhry(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pgxs "missing magic block ... PG_MODULE_MAGIC" with "MODULE_big" |
Date: | 2013-01-08 17:30:53 |
Message-ID: | CAAHaSZ7smep=6LFuOYwASGs0U-q_1AGEdV930O0RGy9S5Uu8sA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, I'm trying to add a C-Language function but getting the following error:
$ psql -f test_cfunc.sql
psql:test_cfunc.sql:3: ERROR: incompatible library
"/usr/local/pgsql/lib/test_cfunc.so": missing magic block
HINT: Extension libraries are required to use the PG_MODULE_MAGIC macro.
I am calling PG_MODULE_MAGIC in my c file. Minimal Makefile, .c, and .sql
files are attached. In the Makefile, if I change "MODULE_big" to "MODULES",
it works. However, I want to use "MODULE_big" because I need to later link
to a shared library using SHLIB_LINK, and "MODULES" doesn't support
SHLIB_LINK as per
http://archives.postgresql.org/pgsql-hackers/2012-03/msg00537.php
Any suggestions on how I can get PG_MODULE_MAGIC to work with "MODULE_big"
(or link a shared library when using "MODULES")?
Thanks,
Dave
Attachment | Content-Type | Size |
---|---|---|
Makefile | application/octet-stream | 127 bytes |
test_cfunc.c | text/x-csrc | 233 bytes |
test_cfunc.sql | application/octet-stream | 113 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David Fuhry | 2013-01-08 17:33:42 | Re: pgxs "missing magic block ... PG_MODULE_MAGIC" with "MODULE_big" |
Previous Message | Stefan Keller | 2013-01-08 17:24:46 | Re: [postgis-users] Query with LIMIT but as random result set? |