php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33675 error in location of pgsql
Submitted: 2005-07-13 10:14 UTC Modified: 2005-07-13 11:59 UTC
From: bernard dot prevosto at ifremer dot fr Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.4.0 OS: solaris 8
Private report: No CVE-ID: None
 [2005-07-13 10:14 UTC] bernard dot prevosto at ifremer dot fr
Description:
------------
in configure, I put:

--with-pgsql=/home/services/logiciels/compilateurs/php/bases/pgsql

but in Makefile it's replace by:

-L/usr/local/pgsql
and 
-I/usr/local/pgsql

Reproduce code:
---------------
The  generated Makefile:
CONFIGURE_COMMAND = './configure' '--prefix=/home/services/logiciels/compilateurs/php'
...
...
'--with-pgsql=/home/services/logiciels/compilateurs/php/bases/pgsql'
...
....
EXTRA_LDFLAGS = -L/usr/ucblib
...
-L/usr/local/pgsql/lib
...
INCLUDES = -I/home/services/bibli/zlib/include
...
-I/usr/local/pgsql/include

Expected result:
----------------
with PHP-3.4.11 it's work fine
the value of location of pgsql is not changed
and the make work fine

generated Makefile whith PHP-3.4.11

CONFIGURE_COMMAND = './configure' '--prefix=/home/services/logiciels/compilateurs/php'
...
...
'--with-pgsql=/home/services/logiciels/compilateurs/php/bases/pgsql'
...
....
EXTRA_LDFLAGS = -L/usr/ucblib
...
-L/home/services/logiciels/compilateurs/php/bases/pgsql/lib
...
INCLUDES = -I/home/services/bibli/zlib/include
...
-I/home/services/logiciels/compilateurs/php/bases/pgsql/include

Actual result:
--------------
Wy /usr/local/pgsql in the Makefile?????

I have copied my pgsql directory in /usr/local
and make done:

gcc  -Iext/pgsql/ -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/ -DPHP_ATOM_INC -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/main -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0 -I/home/services/bibli/zlib/include -I/home/services/bibli/xmllib/include/libxml2 -I/home/services/bibli/jpeglib/include -I/home/services/bibli/pnglib/include -I/home/services/logiciels/gettext/include -I/home/services/bibli/openldap/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/mbregex -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/libmbfl -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/libmbfl/mbfl -I/home/services/bibli/mysql/include -I/home/services/logiciels/compilateurs/php/bases/ora920/rdbms/public -I/home/services/logiciels/compilateurs/php/bases/ora920/rdbms/demo -I/home/services/bibli/pdflib/include -I/usr/local/pgsql/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/xml/expat -I/home/services/bibli/zziplib/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/TSRM -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/Zend  -D_POSIX_PTHREAD_SEMANTICS  -g -O2  -c /home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c -o ext/pgsql/pgsql.o  && echo > ext/pgsql/pgsql.lo
In file included from /home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:38:
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/php_pgsql.h:50:23: pg_config.h: No such file or directory
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c: In function `zm_info_pgsql':
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: `PG_VERSION' undeclared (first use in this function)
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: (Each undeclared identifier is reported only once
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: for each function it appears in.)
gmake: *** [ext/pgsql/pgsql.lo] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-13 10:18 UTC] tony2001@php.net
Because there is no pg_config in /home/services/logiciels/compilateurs/php/bases/pgsql/bin directory. PHP looks further and finds it /usr/local/pgsql/bin, so it uses /usr/local/pgsql as the path to the PG installation.
 [2005-07-13 11:13 UTC] bernard dot prevosto at ifremer dot fr
yes, there is e pg_config in
/home/services/logiciels/compilateurs/php/bases/pgsql/bin directory
with tle line:
# stored configuration values
val_bindir='/home/services/logiciels/compilateurs/php-4.3.11/bases/pgsql/bin'
val_includedir='/home/services/logiciels/compilateurs/php-4.3.11/bases/pgsql/include'
val_libdir='/home/services/logiciels/compilateurs/php-4.3.11/base/pgsql/lib'

but WHY it's good with php-4.3.11 whith the same file configure????
 [2005-07-13 11:49 UTC] bernard dot prevosto at ifremer dot fr
in pg_config file 
it's an error
val_libdir='/home/services/logiciels/compilateurs/php-4.3.11/base/pgsql/
lib'
and not "bases"  whith a "s"
I-ve corrected 
The make file is good but i've alwaye the same error:

gcc  -Iext/pgsql/ -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/ -DPHP_ATOM_INC -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/main -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0 -I/home/services/bibli/zlib/include -I/home/services/bibli/xmllib/include/libxml2 -I/home/services/bibli/jpeglib/include -I/home/services/bibli/pnglib/include -I/home/services/logiciels/gettext/include -I/home/services/bibli/openldap/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/mbregex -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/libmbfl -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/mbstring/libmbfl/mbfl -I/home/services/bibli/mysql/include -I/home/services/logiciels/compilateurs/php/bases/ora920/rdbms/public -I/home/services/logiciels/compilateurs/php/bases/ora920/rdbms/demo -I/home/services/bibli/pdflib/include -I/home/services/logiciels/compilateurs/php/bases/pgsql/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/xml/expat -I/home/services/bibli/zziplib/include -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/TSRM -I/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/Zend  -D_POSIX_PTHREAD_SEMANTICS  -g -O2  -c /home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c -o ext/pgsql/pgsql.o  && echo > ext/pgsql/pgsql.lo
In file included from /home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:38:
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/php_pgsql.h:50:23: pg_config.h: No such file or directory
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c: In function `zm_info_pgsql':
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: `PG_VERSION' undeclared (first use in this function)
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: (Each undeclared identifier is reported only once
/home2/beniguet/tmsiric/bpre/anonymous/apache/php-4.4.0/ext/pgsql/pgsql.c:498: error: for each function it appears in.)
 [2005-07-13 11:59 UTC] bernard dot prevosto at ifremer dot fr
Mea culpa mea culpa mea maxima culpa
SORRY
it's my fault

pg_config.h was not in /home/services/logiciels/compilateurs/php/bases/pgsql/include

now it's good

you can close the call

Sorry
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 02 04:00:03 2025 UTC