c program fails to run with the postgres which is installed at user location

From: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: c program fails to run with the postgres which is installed at user location
Date: 2010-06-03 03:00:33
Message-ID: AANLkTina741UVL8SR_8OM5lHihYTcqKFAgm69rmiFP7H@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to compile and run c program which reads the journal of an
ancient propriety database
and copy these transactions over to postgres. The process I follow is
by trial and error and made worse
by the fact that I haven't before made c program which talks to
postgres and because I have to use
some c pre-processor and linker required by that other database.

This machine is RHEL 5.5 and has both RH stock postgres 8.1.18 in
standard location as well as pg 8.4.4
which is in my home folder. The libraries are libpg.so.4 and
libpg.so.5 respectively for two versions.

I just lifted one of the examples from postgres documentation and if I
just use stock 8.1.18 compiling
is ok and the final program runs to completion as expected. But if I
compile the same program
with 8.4.4 the compiled program dies with

"error while loading shared libraries: libpq.so.5: cannot open shared
object file: No such file or dire
ctory"

Does the error mean that the program can't locate this libpq.so.5?
That symlink is good but in ~/local/lib and points to
libpq.so.5.2 in there. It's not in the standard folder like /usr/lib.
I tried to symlink to the working folder but no go.

I configured 8.4.4 with "--enable-shared" even though I think this is
unnecessary; is that right?

Thanks for any advice you can give

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2010-06-03 06:15:56 Re: c program fails to run with the postgres which is installed at user location
Previous Message Scott Marlowe 2010-06-03 01:51:30 Re: Autovacuum Daemon is Turned On by Default in Postgres 8.3.8?