Thread: PgAccess 0.98 and libpq.so.2

PgAccess 0.98 and libpq.so.2

From
"Nigel Berkeley"
Date:
Hi there,

I've just downloaded postgres 6.5.3 and successfully compiled it
with pgaccess. I did have 6.5.1 installed so I cleared out the bin
and lib dir before hand. Everything works the way it should with the
psql program and its also works fine with php4 on my apache web
server.

When I first fired up pgaccess, I got a tcl error message saying it
was missing libpq.so.1. So I looked for this lib in my postgres libs
dir and it wasnt there, just libpq.so.2 which was a symbolic link
that pointed to libpq.so.2.0. I made another symbolic to this file,
calling it libpq.so.1 (as thats the file it couldnt find) then fired
up pgaccess.

I typed in all my connect details and it just keeps saying it failed
to connect to the database followed by some random ascii characters.
I think those random characters should have actually displayed the
reason it failed. I think the reason for this is it needs the real
libpq.so.1 and it doesnt like version 2? Why doesnt this lib exist
anyway? I looked at my 6.5.1 installation and that didnt have the
correct lib either.

What installation does that lib exist in? Is anyone else
experiencing this problem too? I've also tried connecting to my
remote postgres server and had no luck.

Nige





Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Constantin Teodorescu
Date:
Nigel Berkeley wrote:
> 
> When I first fired up pgaccess, I got a tcl error message saying it
> was missing libpq.so.1. So I looked for this lib in my postgres libs
> dir and it wasnt there, just libpq.so.2 which was a symbolic link
> that pointed to libpq.so.2.0. I made another symbolic to this file,
> calling it libpq.so.1 (as thats the file it couldnt find) then fired
> up pgaccess.

What Tcl/Tk version are you using?
Also, the OS type and version?

I got some strange errors trying to run PgAccess with Tcl/Tk 8.2.x

Constantin Teodorescu
FLEX Consulting Braila, ROMANIA


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
"Nigel Berkeley"
Date:
Its an AMD Athlon running Redhat 5.1
Tcl/Tk 8.0.2

Nige
----- Original Message -----
From: Constantin Teodorescu <teo@flex.ro>
To: Nigel Berkeley <nige@incagold.com>
Cc: <pgsql-interfaces@hub.org>
Sent: Wednesday, November 24, 1999 7:09 AM
Subject: Re: [INTERFACES] PgAccess 0.98 and libpq.so.2


> Nigel Berkeley wrote:
> >
> > When I first fired up pgaccess, I got a tcl error message saying
it
> > was missing libpq.so.1. So I looked for this lib in my postgres
libs
> > dir and it wasnt there, just libpq.so.2 which was a symbolic
link
> > that pointed to libpq.so.2.0. I made another symbolic to this
file,
> > calling it libpq.so.1 (as thats the file it couldnt find) then
fired
> > up pgaccess.
>
> What Tcl/Tk version are you using?
> Also, the OS type and version?
>
> I got some strange errors trying to run PgAccess with Tcl/Tk 8.2.x
>
> Constantin Teodorescu
> FLEX Consulting Braila, ROMANIA
>



Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Lamar Owen
Date:
Nigel Berkeley wrote:
> 
> Its an AMD Athlon running Redhat 5.1
> Tcl/Tk 8.0.2

Are the PostgreSQL 6.3.2 RPM's still installed (rpm -qa|grep
postgresql), by chance?

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Nigel Berkeley
Date:
No I've only ever had one other version installed (6.5.1) and I also
compiled that from the source code. I compiled this version (6.5.3) too.

Nige

Lamar Owen wrote:
> 
> Nigel Berkeley wrote:
> >
> > Its an AMD Athlon running Redhat 5.1
> > Tcl/Tk 8.0.2
> 
> Are the PostgreSQL 6.3.2 RPM's still installed (rpm -qa|grep
> postgresql), by chance?
> 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Nigel Berkeley
Date:
This is the error message I get..

http://www.biogate.com/nige/error.gif

I get that message no matter what I try to connet to. I can connect fine
with psql to a remote machine or a localhost.

Nige


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Lamar Owen
Date:
Nigel Berkeley wrote:
> Lamar Owen wrote:

> > Nigel Berkeley wrote:

> > > Its an AMD Athlon running Redhat 5.1
> > > Tcl/Tk 8.0.2

> > Are the PostgreSQL 6.3.2 RPM's still installed (rpm -qa|grep
> > postgresql), by chance?
> No I've only ever had one other version installed (6.5.1) and I also
> compiled that from the source code. I compiled this version (6.5.3) too.

Hmmmm..  Try this: issue a 'which pgaccess' command and see if it
returns what you would expect.  Assuming you've put PostgreSQL in the
default place, you'd expect the which to return somewhere in
/usr/local/pgsql.  Also, check to make sure you don't have a
/usr/lib/libpgtcl.so -- if you do, you can check to see what RPM popped
it there with 'rpm -qf /usr/lib/libpgctl.so'

In building the RPM's for 6.5.3 on RedHats 5.2 and 6.1, I did not run
across this problem.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Nigel Berkeley
Date:
Lamar Owen wrote:
> Hmmmm..  Try this: issue a 'which pgaccess' command and see if it
> returns what you would expect.  Assuming you've put PostgreSQL in the
> default place, you'd expect the which to return somewhere in
> /usr/local/pgsql. 

comes up with: /usr/local/pgsql/bin/pgaccess

which is correct as far as I know
Also, check to make sure you don't have a
> /usr/lib/libpgtcl.so -- if you do, you can check to see what RPM popped
> it there with 'rpm -qf /usr/lib/libpgctl.so'

Nope, nothing there and dont you mean libpgtcl.so? :)

> In building the RPM's for 6.5.3 on RedHats 5.2 and 6.1, I did not run
> across this problem.

I didnt build it from an RPM, I built it with the make file from the
source.

> 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11

thanx anyway,

Nige


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Lamar Owen
Date:
Nigel Berkeley wrote:
> [which pgaccess] comes up with: /usr/local/pgsql/bin/pgaccess
> 
> which is correct as far as I know

If that's where you installed 6.5.3, then that's correct.
> Nope, nothing there and dont you mean libpgtcl.so? :)

Yes, I do mean libpgtcl.so -- intstead of getting tongue-tied, I get
finger-tied.

> > In building the RPM's for 6.5.3 on RedHats 5.2 and 6.1, I did not run
> > across this problem.
> 
> I didnt build it from an RPM, I built it with the make file from the
> source.

When building the RPM's for distribution, I make from sources -- and
have not run into this problem on RedHat 5.2 or 6.1.  The RPM building
process (which I have done a number of times in maintaining the RPM
distribution) does a complete configure/make/make install cycle (amongst
other things) during a build.

libpq.so.1 went out before version 6.4. -- so I'd look for a libpgtcl.so
(or pgtksh or pgtclsh) from pre-6.4 (6.3.2 shipped with RedHat 5.1).

Did pgaccess work at 6.5.1?

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
"Nigel Berkeley"
Date:
Lucky for me, I have Redhat 5.1 on CD so I can grab it off there.
But all the people without Redhat 5.1 are not going to be able to
run pgaccess, or worse still theres going to be A LOT of people that
arnt able to use pgaccess at all because they dont know what the
problem is!

Constantin, if it is the case of not having the old lib, are you
planning to update pgaccess to use libpq.so.2?

Nige

> libpq.so.1 went out before version 6.4. -- so I'd look for a
libpgtcl.so
> (or pgtksh or pgtclsh) from pre-6.4 (6.3.2 shipped with RedHat
5.1).
>
> Did pgaccess work at 6.5.1?
>
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
>




Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Lamar Owen
Date:
On Wed, 24 Nov 1999, Nigel Berkeley wrote:
> run pgaccess, or worse still theres going to be A LOT of people that
> arnt able to use pgaccess at all because they dont know what the
> problem is!
> 
> Constantin, if it is the case of not having the old lib, are you
> planning to update pgaccess to use libpq.so.2?

The pgaccess tcl/tk script does not require any library other than libpgtcl.so
-- it's libpgtcl.so that requires a specific libpq.so.

Checking my installation of PostgreSQL (that I installed from sources via
building the RPM set), libpgtcl.so from 6.5.3 does NOT require libpq.so.1 -- it
requires libpq.so.2) (the output from 'ldd /usr/lib/libpgtcl.so' will tell you
what libraries it depends upon -- here's the output of 'ls -l
/usr/lib/libpgtcl.*' , followed by the output of 'ldd /usr/lib/libpgtcl.so' --
note that your installation of PostgreSQL has different directories for these
-- and make double sure that there is no other libpgtcl.so on your system in a
library search path):
-------------ls -l /usr/lib/libpgtcl.* ------------
-rw-r--r--   1 root     root        27260 Nov  4 22:30 /usr/lib/libpgtcl.a
lrwxrwxrwx   1 root     root           15 Oct  9 23:11 /usr/lib/libpgtcl.so -> libpgtcl.so.2.0
lrwxrwxrwx   1 root     root           15 Oct  9 23:11 /usr/lib/libpgtcl.so.2 -> libpgtcl.so.2.0
-rwxr-xr-x   1 root     root        28276 Nov  4 22:30 /usr/lib/libpgtcl.so.2.0
----------------------------------------
------------ldd /usr/lib/libpgtcl.so-------------libpq.so.2.0 => /usr/lib/libpq.so.2.0 (0x4000d000)libcrypt.so.1 =>
/lib/libcrypt.so.1(0x4001a000)libc.so.6 => /lib/libc.so.6 (0x40047000)/lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0x80000000)
----------------------------------------

I have built RPM's for 6.5.x many different times on RedHat 5.2 and RedHat 6.1,
and I have never had this problem you are having.  Building the RPM's, as I
have said, involves configure'ing, make'ing, and 'make install'ing just like
you have done, just with a slightly different set of configure options (in
particular,  prefix is set to a different value than the norm).  Make double
and triple sure that the old PostgreSQL 6.3.2 RPM's are not installed -- or
that artifacts from the 6.3.2 RPM install aren't left on the disk.

Summary: if you have a version of libpgtcl.so on your system (look for
/usr/lib/libpgtcl.* -- the 6.3.2 RPM shipped a /usr/lib/pgtcl.so.1, that was
symlinked from /usr/lib/libpgtcl.so, IIRC) that requires libpq.so.1 (which the
version of libpgtcl.so that ships with 6.5.3 does NOT), then this error will
show. 

A copy of the 'rpm -qa' output from your machine would be helpful -- send it to
me directly, and not to the list, as the output is large.

HTH

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Nigel Berkeley
Date:
You were right all a long...

I did a find (instead of locate) and it found some older libpgtcl.so
libs in the /usr/local/lib dir. I ran RPM on them to see what packaged
installed them but they didnt belong to anything. So I deleted them, ran
ldconfig and pgaccess worked!

Sorry for being so anoying and thanks alot for all ur elp,

Nige

Lamar Owen wrote:
> 
> On Wed, 24 Nov 1999, Nigel Berkeley wrote:
> > run pgaccess, or worse still theres going to be A LOT of people that
> > arnt able to use pgaccess at all because they dont know what the
> > problem is!
> >
> > Constantin, if it is the case of not having the old lib, are you
> > planning to update pgaccess to use libpq.so.2?
> 
> The pgaccess tcl/tk script does not require any library other than libpgtcl.so
> -- it's libpgtcl.so that requires a specific libpq.so.
> 
> Checking my installation of PostgreSQL (that I installed from sources via
> building the RPM set), libpgtcl.so from 6.5.3 does NOT require libpq.so.1 -- it
> requires libpq.so.2) (the output from 'ldd /usr/lib/libpgtcl.so' will tell you
> what libraries it depends upon -- here's the output of 'ls -l
> /usr/lib/libpgtcl.*' , followed by the output of 'ldd /usr/lib/libpgtcl.so' --
> note that your installation of PostgreSQL has different directories for these
> -- and make double sure that there is no other libpgtcl.so on your system in a
> library search path):
> -------------ls -l /usr/lib/libpgtcl.* ------------
> -rw-r--r--   1 root     root        27260 Nov  4 22:30 /usr/lib/libpgtcl.a
> lrwxrwxrwx   1 root     root           15 Oct  9 23:11 /usr/lib/libpgtcl.so -> libpgtcl.so.2.0
> lrwxrwxrwx   1 root     root           15 Oct  9 23:11 /usr/lib/libpgtcl.so.2 -> libpgtcl.so.2.0
> -rwxr-xr-x   1 root     root        28276 Nov  4 22:30 /usr/lib/libpgtcl.so.2.0
> ----------------------------------------
> ------------ldd /usr/lib/libpgtcl.so-------------
>         libpq.so.2.0 => /usr/lib/libpq.so.2.0 (0x4000d000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001a000)
>         libc.so.6 => /lib/libc.so.6 (0x40047000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> ----------------------------------------
> 
> I have built RPM's for 6.5.x many different times on RedHat 5.2 and RedHat 6.1,
> and I have never had this problem you are having.  Building the RPM's, as I
> have said, involves configure'ing, make'ing, and 'make install'ing just like
> you have done, just with a slightly different set of configure options (in
> particular,  prefix is set to a different value than the norm).  Make double
> and triple sure that the old PostgreSQL 6.3.2 RPM's are not installed -- or
> that artifacts from the 6.3.2 RPM install aren't left on the disk.
> 
> Summary: if you have a version of libpgtcl.so on your system (look for
> /usr/lib/libpgtcl.* -- the 6.3.2 RPM shipped a /usr/lib/pgtcl.so.1, that was
> symlinked from /usr/lib/libpgtcl.so, IIRC) that requires libpq.so.1 (which the
> version of libpgtcl.so that ships with 6.5.3 does NOT), then this error will
> show.
> 
> A copy of the 'rpm -qa' output from your machine would be helpful -- send it to
> me directly, and not to the list, as the output is large.
> 
> HTH
> 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
> 
> ************


Re: [INTERFACES] PgAccess 0.98 and libpq.so.2

From
Lamar Owen
Date:
On Fri, 26 Nov 1999, Nigel Berkeley wrote:
> I did a find (instead of locate) and it found some older libpgtcl.so
> libs in the /usr/local/lib dir. I ran RPM on them to see what packaged
> installed them but they didnt belong to anything. So I deleted them, ran
> ldconfig and pgaccess worked!

You're welcome, and glad you now have it working!

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11