#43214 [Com]: PHP won't build with PostgreSQL < 7.4
| From: | swapneel at networkredux dot com | Date: | Sun, 11 Nov 2007 14:20:39 +0000 |
| Subject: | #43214 [Com]: PHP won't build with PostgreSQL < 7.4 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119440@lists.php.net to get a copy of this message | ||
ID: 43214
Comment by: swapneel at networkredux dot com
Reported By: koalay at gmail dot com
Status: Open
Bug Type: Compile Failure
Operating System: Linux
PHP Version: 5.2.4
New Comment:
Hello,
I'm getting this exactly same error while make with PHP 5.2.3 as CGI
and Postgres 7.3.18-RH.
Build using : --with-pgsql=[DIR]
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libc-client.a(osdep.o)(.text+0xab77):
In function `ssl_onceonlyinit':
: the use of
tmpnam' is dangerous, better use mkstemp'
ext/pgsql/pgsql.o(.text+0x57df): In function `zif_pg_escape_bytea':
/root/source/php-5.2.3/ext/pgsql/pgsql.c:3619: undefined reference to
`PQfreemem'
ext/pgsql/pgsql.o(.text+0x5884): In function `zif_pg_unescape_bytea':
/root/source/php-5.2.3/ext/pgsql/pgsql.c:3744: undefined reference to
`PQfreemem'
ext/pgsql/pgsql.o(.text+0x5fd2): In function `zif_pg_get_notify':
/root/source/php-5.2.3/ext/pgsql/pgsql.c:4357: undefined reference to
`PQfreemem'
ext/pgsql/pgsql.o(.text+0x7f29): In function `php_pgsql_convert':
/root/source/php-5.2.3/ext/pgsql/pgsql.c:5163: undefined reference to
`PQfreemem'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
Is anyone else facing this error ?
Previous Comments:
------------------------------------------------------------------------
[2007-11-07 18:30:13] koalay at gmail dot com
Description:
------------
I believe this is almost the same bug as Bug #33813.
PHP-5.2.4 won't build with PostgreSQL < 7.4.
The reason for this is that the ext/pgsql/pgsql.c use the PQfreemem
function which is only available in PostgreSQL 7.4 or later.
Reproduce code:
---------------
Build with --with-pgsql=[DIR]
Expected result:
----------------
It builds normally.
Actual result:
--------------
...
ext/pgsql/.libs/pgsql.o(.text+0x591a): In function
`zif_pg_escape_bytea':
/var/software/LAMP/php-5.2.4/ext/pgsql/pgsql.c:3641: undefined
reference to `PQfreemem'
ext/pgsql/.libs/pgsql.o(.text+0x599c): In function
`zif_pg_unescape_bytea':
/var/software/LAMP/php-5.2.4/ext/pgsql/pgsql.c:3766: undefined
reference to `PQfreemem'
ext/pgsql/.libs/pgsql.o(.text+0x6122): In function
`zif_pg_get_notify':
/var/software/LAMP/php-5.2.4/ext/pgsql/pgsql.c:4379: undefined
reference to `PQfreemem'
ext/pgsql/.libs/pgsql.o(.text+0x7daf): In function
`php_pgsql_convert':
/var/software/LAMP/php-5.2.4/ext/pgsql/pgsql.c:5185: undefined
reference to `PQfreemem'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
(error exit)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43214&edit=1