Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-ports by date

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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group