From: | David Fuhry <dfuhry(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pgxs "missing magic block ... PG_MODULE_MAGIC" with "MODULE_big" |
Date: | 2013-01-08 18:11:25 |
Message-ID: | CAAHaSZ6iYvms18m7B_LV4wJ5CG6z5mFqmBtT6Q=WLLciz-pQYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you Tom, you are correct. Adding the line:
OBJS = test_cfunc.o
to the Makefile resolved the problem.
-Dave
On Tue, Jan 8, 2013 at 12:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Fuhry <dfuhry(at)gmail(dot)com> writes:
> > 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
>
> I think you're missing the OBJS line, with the result that the .so ends
> up empty.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | ledocf | 2013-01-08 18:38:08 | Getting PLPython to work with PostgreSQL 9.2 |
Previous Message | Tom Lane | 2013-01-08 18:02:08 | Re: [Solved] Corrupt indexes on slave when using pg_bulkload on master |