php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30524 Can't compile mysqli
Submitted: 2004-10-22 00:47 UTC Modified: 2004-10-22 16:50 UTC
From: colin at viebrock dot ca Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.0.2 OS: Mac OS X 10.3.5
Private report: No CVE-ID: None
 [2004-10-22 00:47 UTC] colin at viebrock dot ca
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; }

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-22 09:32 UTC] georg@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Colin, 
 
mysqli requires MySQL 4.1.x or above! 
 [2004-10-22 16:49 UTC] colin at viebrock dot ca
I'm an idiot ... thanks, Georg.  :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC