Re: symbol not found in plpgsql.so

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fwr(at)ga(dot)prestige(dot)net
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org
Subject: Re: symbol not found in plpgsql.so
Date: 2000-10-05 20:26:31
Message-ID: 10610.970777591@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-ports

"Frederick W. Reimer" <fwr(at)ga(dot)prestige(dot)net> writes:
> I'm getting the following error when I add a row to a table that has a
> trigger set for a plpgsql function. I did a nm on the plpgsql.so file and
> it lists CurrentMemoryContext as being in there, so I don't know why it
> can't find it.
> "DBD::Pg::st execute failed: ERROR: Load of file
> /usr/local/pgsql/lib/plpgsql.so failed: ld.so.1:
> /usr/local/pgsql/bin/postmaster: fatal: relocation error: file
> /usr/local/pgsql/lib/plpgsql.so: symbol CurrentMemoryContext: referenced
> symbol not found"

No, you're interpreting this backward: the linker is complaining because
it can't find a CurrentMemoryContext symbol in the main program to bind
the .so's reference to.

You didn't say what platform you're on, but on lots of platforms it's
necessary to do something special to ensure that all symbols in a main
program are exported so that dynamically loaded shared libs can see
them. (That's not normally the default behavior because the symbol
table space would be wasted in most programs, which don't do dynamic
loading of random .so files.) On HPUX, for example, the loader has to
be given a -E switch when linking the postgres executable. Dunno what
the incantation is where you live...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-05 20:31:43 RE: New unified regression test driver
Previous Message Frederick W. Reimer 2000-10-05 19:32:35 RE: [PORTS] symbol not found in plpgsql.so

Browse pgsql-ports by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-05 21:25:44 Re: symbol not found in plpgsql.so
Previous Message Frederick W. Reimer 2000-10-05 19:32:35 RE: [PORTS] symbol not found in plpgsql.so