Re: Question on libpq.so

Lists: pgsql-php
From: "L(dot) Zhao" <lzhao86(at)yahoo(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Question on libpq.so
Date: 2009-01-09 00:34:37
Message-ID: 230332.37017.qm@web31304.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

We are in the process of upgrading our postgres database from 7.4 to 8.2 on Redhat ES4 server.  Postgresql uses libpq.so.5.0, while libpq.so.3 was initially installed and is needed by php.  I did the postgresql 8.2.10 installation without dependency:
rpm -Uvh --nodeps postgresql-*.rpm
Then I try to recompile PHP 4.3.9 rpm, hoping that it will point to the new postgres so.  The compilation failed with the error:
Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0

Can PHP 4.3 work with postgresql 8.2, and how can I point PHP rpm to use libpq.so.5?  Thanks.

Lawrence


From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Question on libpq.so
Date: 2009-01-09 01:08:40
Message-ID: 200901081708.40787@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

On Thursday 08 January 2009, "L. Zhao" <lzhao86(at)yahoo(dot)com> wrote:
> new postgres so.  The compilation failed with the error: Unable to load
> dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared
> object file: No such file or directory in Unknown on line 0

That appears to be a runtime message, not a compile error. Did the
compilation system have only the new PostgreSQL installed? What does rpm
show for dependencies for your new RPMs? Did you actually install the new
RPMs?

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE


From: Chris <dmagick(at)gmail(dot)com>
To: "L(dot) Zhao" <lzhao86(at)yahoo(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Question on libpq.so
Date: 2009-01-09 02:45:33
Message-ID: 4966BA4D.9050304@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

L. Zhao wrote:
> We are in the process of upgrading our postgres database from 7.4 to 8.2
> on Redhat ES4 server. Postgresql uses libpq.so.5.0, while libpq.so.3
> was initially installed and is needed by php. I did the postgresql
> 8.2.10 installation without dependency:
> rpm -Uvh --nodeps postgresql-*.rpm

Was there a reason why you had to use --nodeps? Exactly which rpms did
you install?

> Then I try to recompile PHP 4.3.9 rpm, hoping that it will point to the
> new postgres so. The compilation failed with the error:
> Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3:
> cannot open shared object file: No such file or directory in Unknown on
> line 0

As Alan pointed out, this is a runtime error not a compile error. How
did you rebuild the php 4.3.9 rpm? Any errors during that process?

> Can PHP 4.3 work with postgresql 8.2, and how can I point PHP rpm to use
> libpq.so.5? Thanks.

Once you have it compiled properly it should work fine.

--
Postgresql & php tutorials
http://www.designmagick.com/


From: "L(dot) Zhao" <lzhao86(at)yahoo(dot)com>
To: Chris <dmagick(at)gmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Question on libpq.so
Date: 2009-01-09 17:25:48
Message-ID: 77946.83424.qm@web31306.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

The server had postgres 7.4 installed, when I tried to upgrade to 8.2.10, I got error on failed dependencies:
rpm -Uvh --test postgresql-*.rpm
error: Failed dependencies:
        libpq.so.3 is needed by (installed) mod_auth_pgsql-2.0.1-7.1.i386
        libpq.so.3 is needed by (installed) perl-DBD-Pg-1.31-6.i386
        libpq.so.3 is needed by (installed) libdbi-dbd-pgsql-0.6.5-10.RHEL4.1.i386
        libpq.so.3 is needed by (installed) freeradius-postgresql-1.0.1-3.RHEL4.5.i386
        libpq.so.3 is needed by (installed) postgresql-tcl-7.4.19-1.el4_6.1.i386
        libpq.so.3 is needed by (installed) cyrus-sasl-sql-2.1.19-14.i386
        libpq.so.3 is needed by (installed) postgresql-python-7.4.19-1.el4_6.1.i386
        libpq.so.3 is needed by (installed) qt-PostgreSQL-3.3.3-13.RHEL4.i386
        libpq.so.3 is needed by (installed) dovecot-0.99.11-9.EL4.i386
        libpq.so.3 is needed by (installed) php-pgsql-4.3.9-3.22.12.i386

That is why I use the --nodeps, expecting that I will rebuild php rpm afterwards.
rpm -Uvh --nodeps postgresql-*.rpm
Preparing...                ########################################### [100%]
   1:postgresql-test        ########################################### [  9%]
   2:postgresql             ########################################### [ 18%]
   3:postgresql-contrib     ########################################### [ 27%]
   4:postgresql-debuginfo   ########################################### [ 36%]
   5:postgresql-devel       ########################################### [ 45%]
   6:postgresql-docs        ########################################### [ 55%]
   7:postgresql-libs        ########################################### [ 64%]
   8:postgresql-plperl      ########################################### [ 73%]
   9:postgresql-plpython    ########################################### [ 82%]
  10:postgresql-pltcl       ########################################### [ 91%]
  11:postgresql-server      ########################################### [100%]

When I tried to rebuild PHP rpms, which is php 4.3.9 on ES4.  It failed:
......
001+ PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0
002- md5(line 1)= e84debf3a1d132871d7fe45c1c04c566 (length 20000)
002+ md5(line 0)= e86410fa2d6e2634fd8ac5f4b3afe7f3 (length 10)
003- md5(line 2)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000)
003+ md5(line 1)= e84debf3a1d132871d7fe45c1c04c566 (length 20000)
004- md5(line 3)= 2ecdde3959051d913f61b14579ea136d (length 5)
004+ md5(line 2)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000)
005- md5(line 4)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000)
005+ md5(line 3)= 2ecdde3959051d913f61b14579ea136d (length 5)
006- md5(line 5)= 902fbdd2b1df0c4f70b4a5d23525e932 (length 3)
006+ md5(line 4)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000)
007+ md5(line 5)= 902fbdd2b1df0c4f70b4a5d23525e932 (length 3)
<< ../ext/standard/tests/file/bug26938.diff result ends.
error: Bad exit status from /var/tmp/rpm-tmp.12911 (%check)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.12911 (%check)

I look into php.spec, it does not specify the usage of libpq.so.3.  So I am wondering why library pgsql.so requires libpq.so.3, and if there is any compatibility issue.

Thanks.

________________________________
From: Chris <dmagick(at)gmail(dot)com>
To: L. Zhao <lzhao86(at)yahoo(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Sent: Thursday, January 8, 2009 6:45:33 PM
Subject: Re: [PHP] Question on libpq.so

L. Zhao wrote:
> We are in the process of upgrading our postgres database from 7.4 to 8.2 on Redhat ES4 server.  Postgresql uses libpq.so.5.0, while libpq.so.3 was initially installed and is needed by php.  I did the postgresql 8.2.10 installation without dependency:
> rpm -Uvh --nodeps postgresql-*.rpm

Was there a reason why you had to use --nodeps? Exactly which rpms did you install?

> Then I try to recompile PHP 4.3.9 rpm, hoping that it will point to the new postgres so.  The compilation failed with the error:
> Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0

As Alan pointed out, this is a runtime error not a compile error. How did you rebuild the php 4.3.9 rpm? Any errors during that process?

> Can PHP 4.3 work with postgresql 8.2, and how can I point PHP rpm to use libpq.so.5?  Thanks.

Once you have it compiled properly it should work fine.

-- Postgresql & php tutorials
http://www.designmagick.com/

-- Sent via pgsql-php mailing list (pgsql-php(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php


From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Question on libpq.so
Date: 2009-01-09 17:42:52
Message-ID: 200901090942.52739@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

On Friday 09 January 2009, "L. Zhao" <lzhao86(at)yahoo(dot)com> wrote:
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.12911 (%check)
>
> I look into php.spec, it does not specify the usage of libpq.so.3.  So I
> am wondering why library pgsql.so requires libpq.so.3, and if there is
> any compatibility issue.

It looks like the test suite run during the RPM creation is trying to load
the currently installed PHP pgsql.so library instead of the one just
compiled. You could try just commenting out the test options in the RPM
spec file.

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE


From: "L(dot) Zhao" <lzhao86(at)yahoo(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Question on libpq.so
Date: 2009-01-09 18:28:21
Message-ID: 797573.46602.qm@web31303.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

I am not familiar with the structure of php.spec.  What should I look for regarding the test suite run?  Thanks.

________________________________
From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Sent: Friday, January 9, 2009 9:42:52 AM
Subject: Re: [PHP] Question on libpq.so

On Friday 09 January 2009, "L. Zhao" <lzhao86(at)yahoo(dot)com> wrote:
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.12911 (%check)
>
> I look into php.spec, it does not specify the usage of libpq.so.3.  So I
> am wondering why library pgsql.so requires libpq.so.3, and if there is
> any compatibility issue.

It looks like the test suite run during the RPM creation is trying to load
the currently installed PHP pgsql.so library instead of the one just
compiled. You could try just commenting out the test options in the RPM
spec file.

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE


From: "Drange, Bernt Andreas" <bernt(dot)andreas(dot)drange(at)imr(dot)no>
To: "L(dot) Zhao" <lzhao86(at)yahoo(dot)com>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: Question on libpq.so
Date: 2009-01-12 09:36:17
Message-ID: CCD1018747D71F44A0F7B4A347EBE00CF6380C@post3.imr.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-php

I suggest you try to see if there is a compatibility rpm you need to
install.

Kind regards, Bernt

From: pgsql-php-owner(at)postgresql(dot)org
[mailto:pgsql-php-owner(at)postgresql(dot)org] On Behalf Of L. Zhao
Sent: Friday, January 09, 2009 7:28 PM
To: pgsql-php(at)postgresql(dot)org
Subject: Re: [PHP] Question on libpq.so

I am not familiar with the structure of php.spec. What should I look
for regarding the test suite run? Thanks.

________________________________

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-php(at)postgresql(dot)org
Sent: Friday, January 9, 2009 9:42:52 AM
Subject: Re: [PHP] Question on libpq.so

On Friday 09 January 2009, "L. Zhao" <lzhao86(at)yahoo(dot)com> wrote:
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.12911 (%check)
>
> I look into php.spec, it does not specify the usage of libpq.so
<http://libpq.so/> .3. So I
> am wondering why library pgsql.so <http://pgsql.so/> requires
libpq.so.3, and if there is
> any compatibility issue.

It looks like the test suite run during the RPM creation is trying to
load
the currently installed PHP pgsql.so library instead of the one just
compiled. You could try just commenting out the test options in the RPM
spec file.

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole,
NANAE