From: colin at viebrock dot ca
Operating system: Mac OS X 10.3.5
PHP version: 5.0.2
PHP Bug Type: Compile Failure
Bug description: Can't compile mysqli
Description:
------------
I'm trying to compile 5.0.2 from source on OS X, and it
fails when trying to find the mysqli libraries. MySQL
3.23.58 and 4.0.21 were installed using the binaries
from mysql.com. 4.0.21 is "active", although neither
servers are running.
Reproduce code:
---------------
My test configure line is:
./configure \
--prefix=/usr/local/php5
--with-config-file-path=/usr/local/php5/lib
--with-apxs
--enable-cli
--with-mysql=/usr/local/mysql-3.23.58-apple-darwin6.4-powerpc
--with-mysqli=/usr/local/mysql/bin/mysql_config
(FYI: /usr/local/mysql is a symlink to
/usr/local/mysql-standard-4.0.21-apple-darwin7.5.0-powerpc, the default
installation path of the MySQL binaries.)
Expected result:
----------------
I expect it to compile. :)
Actual result:
--------------
The configure process ends with:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX
socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support...
no
checking for mysql_set_server_option in
-lmysqlclient... no
configure: error: wrong mysql library version or lib
not found. Check config.log for more information.
config.log ends with:
configure:53964: checking for MySQL UNIX socket location
configure:54120: checking for mysql_close in
-lmysqlclient
configure:54139: gcc -o conftest -g -O2 -no-cpp-precomp
-L/usr/local/mysql-3.23.58-apple-darwin6.4-powerpc/lib
-L/usr/local/mysql-3.23.58-apple-darwin6.4-powerpc/lib
conftest.c -lmysqlclient -lm -lxml2 -lz -liconv -lm
-lxml2 -lz -liconv -lm 1>&5
configure:54936: checking for MySQLi support
configure:54982: checking whether to enable embedded
MySQLi support
configure:55115: checking for mysql_set_server_option in
-lmysqlclient
configure:55134: gcc -o conftest -g -O2 -no-cpp-precomp
-L/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/
local/mysql-3.23.58-apple-darwin6.4-powerpc/lib -L/usr/
local/mysql-3.23.58-apple-darwin6.4-powerpc/lib
-lmysqlclient -lz -lm conftest.c -lmysqlclient
-lmysqlclient -lm -lxml2 -lz -liconv -lm -lxml2 -lz
-liconv -lm 1>&5
ld: Undefined symbols:
_mysql_set_server_option
configure: failed program was:
#line 55123 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an
error. */
/* We use char because int might match the return type
of a gcc2
builtin and then its argument prototype would still
apply. */
char mysql_set_server_option();
int main() {
mysql_set_server_option()
; return 0; }
--
Edit bug report at http://bugs.php.net/?id=30524&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30524&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30524&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30524&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30524&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30524&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30524&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30524&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30524&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30524&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30524&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30524&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30524&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30524&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30524&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30524&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30524&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30524&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30524&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30524&r=mysqlcfg