Re: [HACKERS] More on shared objects problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] More on shared objects problem
Date
Msg-id 7034.933086012@sss.pgh.pa.us
Whole thread Raw
In response to More on shared objects problem  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Responses Re: [HACKERS] More on shared objects problem
List pgsql-hackers
"D'Arcy" "J.M." Cain <darcy@druid.net> writes:
> ldd now shows this.

> glaccount.so:
>          -lpq => /usr/pgsql/lib/libpq.so
>          -lc.12 => /usr/lib/libc.so.12

Actually, do you even need libpq?  That's a client-side library; I don't
think it should get linked into shlibs that are intended to be dynlinked
into the server...

> ERROR:  Load of file /usr/pgsql/modules/glaccount.so failed: dlopen (/usr/pgsql/modules/glaccount.so) failed
(/usr/pgsql/modules/glaccount.so:Undefined symbol "CurrentMemoryContext" (reloc type = 6, symnum = 6))
 

> CurrentMemoryContext is defined in the postmaster (I checked with nm) which
> is the program doing the dlopen.  Here is the relevant line from nm.
>
> 08138544 D CurrentMemoryContext

Hmm.  On HPUX there is a special linker switch you have to use when the
main program is linked to make the linker "export" the main-program
symbols so that they will be visible to dynlinked libraries.  Perhaps
your platform needs something similar.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Ansley, Michael"
Date:
Subject: Late mail
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: fmgr interface [was: plperl inital pass]