php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32256 configure won't build mysqli as shared extension
Submitted: 2005-03-09 17:55 UTC Modified: 2005-03-09 22:03 UTC
From: liamr at umich dot edu Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.3 OS: Linux 2.4.28
Private report: No CVE-ID: None
 [2005-03-09 17:55 UTC] liamr at umich dot edu
Description:
------------
I'm trying to build mysqli as a shared extension in PHP 5.0.3 against MySQL 4.1.10, and configure complains:

./configure --with-mysqli=/usr/bin/mysql_config
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-non-zts-20041030
checking for re2c... exit 0;
checking for gawk... gawk
checking for MySQLi support... yes, shared
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... no
configure: error: MySQLI doesn't support versions < 4.1.3 (for MySQL 4.1.x) and < 5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries.

Here's the output from mysql_config:

papiamentu-liamr:; mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/include/mysql]
        --include        [-I/usr/include/mysql]
        --libs           [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto]
        --libs_r         [-L/usr/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -L/usr/lib -lssl -lcrypto]
        --socket         [/var/mysql/run/mysql.sock]
        --port           [3306]
        --version        [4.1.10]
        --libmysqld-libs [-L/usr/lib/mysql -lmysqld -lpthread -lcrypt -lnsl -lm -lpthread -lrt]


I get the same result if I try to configure php w/ mysqli:

papiamentu-liamr:; pwd
/usr/src/php-5.0.3
papiamentu-liamr:; ./configure --with-mysqli=shared,/usr/bin/mysql_config
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
Updated main/php_version.h
****SNIP****
checking for MySQLi support... yes, shared
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... no
configure: error: MySQLI doesn't support versions < 4.1.3 (for MySQL 4.1.x) and < 5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries.

It seems to work if I build it w/ mysqli build into the php binary:
papiamentu-liamr:; ./configure --with-mysqli=/usr/bin/mysql_config
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
Updated main/php_version.h
****SNIP****
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... yes
checking for mysql_stmt_field_count in -lmysqlclient... yes



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-09 18:16 UTC] liamr at umich dot edu
From config.log

configure:3261: checking for mysql_stmt_field_count in -lmysqlclient
configure:3292: gcc -o conftest -g -O2   conftest.c -lmysqlclient   >&5
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status

It doesn't seem to be adding the directory mentioned by mysql_config to the the link line.
 [2005-03-09 21:28 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip


 [2005-03-09 22:01 UTC] liamr at umich dot edu
The stable snapshot appears to work fine.  Thanks!
 [2005-03-09 22:03 UTC] sniper@php.net
And from the NEWS for 5.0.4-dev:
- Fixed bug #29329 (configure for mysqli with shared doesn't work). (Georg)

Search before reporting bug, anyone? :)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC