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

RE: PostgreSQL ld.so.1 problem (solaris)

From: Urban Widmark <urban(at)svenskatest(dot)se>
To: Carlos Villegas <cav(at)uniscope(dot)co(dot)jp>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: RE: PostgreSQL ld.so.1 problem (solaris)
Date: 2000-07-18 19:36:05
Message-ID: Pine.LNX.4.21.0007182006560.5412-100000@cola.svenskatest.se (view raw or flat)
Thread:
Lists: pgsql-ports
On Wed, 19 Jul 2000, Carlos Villegas wrote:

> Hi,

Hello

> working. The problem is that some symbols used by plpgsql.so are
> defined in the postgres executable. However, when loading the
> library dynamically using the dlopen function, the
> caller symbols are not available to the shared object. 

Yes, that's sort of what I (with the help of nm) was thinking too.

> Fortunately, there is a flag to export the caller symbols
> (in this case postgres) to the shared library. I got
> it from the man page of dlopen!

The Solaris 2.5.1 manpage only lists 3 RTLD_ flags but the dlfcn.h lists a
lot more ...


> The patch at the end should do the job.

It doesn't for me. I still get this in the create_function_2 regression
test.

LOAD '/export/tmp/postgresql-7.0.2/src/test/regress/input/../regress.so';
ERROR:  Load of file
/export/tmp/postgresql-7.0.2/src/test/regress/input/../regress.so failed:
ld.so.1: /home/postgres/bin/postmaster: fatal: relocation error:  file
/export/tmp/postgresql-7.0.2/src/test/regress/input/../regress.so: symbol
CurrentMemoryContext: referenced symbol not found

Maybe this is a solaris 2.5.1/2.6 difference? Maybe there is a reason that
flag isn't mentioned in the manpage ...

I have tried to make very sure that there are no traces of the old
postgres binaries and libraries on the system, so I don't think that is it
(unless you need to do something silly like reboot to replace a .so on
solaris).


Oh, well. It was never that important to me. Thanks for sending the patch,
it does look right but for some reason it doesn't seem to work. If someone
has other patches or want to guess things I may have done wrong I'll
gladly test that.

/Urban


pgsql-ports by date

Next:From: Mark DalphinDate: 2000-07-18 21:55:35
Subject: Re: Shared library search paths
Previous:From: Peter EisentrautDate: 2000-07-18 18:18:14
Subject: Shared library search paths

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