Thread: symbol not found in plpgsql.so
I sent an email on this the other day, but didn't see it pop up in the list and there have been no responses, so I don't know if it got through. Sorry if this is a dup. 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. Anyone see anything similar? What do you suggest, a recompile and install? "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" Thanks, Fred Reimer Eclipsys Corporation
Oh, forgot to say that this is v7.0 on Solaris 7... Fred > -----Original Message----- > From: pgsql-ports-owner@hub.org [mailto:pgsql-ports-owner@hub.org]On > Behalf Of Frederick W. Reimer > Sent: Thursday, October 05, 2000 3:21 PM > To: pgsql-hackers@postgresql.org; pgsql-ports@postgresql.org > Subject: [PORTS] symbol not found in plpgsql.so > > > > I sent an email on this the other day, but didn't see it pop > up in the list > and there have been no responses, so I don't know if it got > through. Sorry > if this is a dup. > > 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. Anyone see anything similar? What do you suggest, a > recompile and install? > > "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" > > Thanks, > > Fred Reimer > Eclipsys Corporation > > >
"Frederick W. Reimer" <fwr@ga.prestige.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