Subject: Re: [HACKERS] More on shared objects problem
To: D'Arcy" "J.M. <darcy@druid.net>
From: Tom Lane <tgl@sss.pgh.pa.us>
List: current-users
Date: 07/27/1999 10:33:32
"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