#28810 [Com]: build fails on unresolved symbols mysql_create_db and mysql_
ID: 28810
Comment by: foo at bar dot com
Reported By: donp at personaltelco dot net
Status: Open
Bug Type: Compile Failure
Operating System: OS X 10.2
PHP Version: 5.0.0RC3
New Comment:
Also fails with PHP 4.3.8 and MySQL 4.0.20 on Mac OS X 10.1.5, tho I
don't think it's the OS. mysql_create_db() and mysql_drop_db() were
deprecated some time ago and now appear dropped completely.
% nm /usr/local/mysql/lib/mysql/libmysqlclient.a |& grep mysql_create
%
http://dev.mysql.com/doc/mysql/en/mysql_create_db.html
http://dev.mysql.com/doc/mysql/en/mysql_drop_db.html
Previous Comments:
------------------------------------------------------------------------
[2004-06-17 00:54:40] donp at personaltelco dot net
Description:
------------
Buliding PHP5.0RC3 under OS X 10.2 and MySQL 4.0.15 fails.
This is the stock MySQL and GCC that comes with OS X 10.2.
./configure --prefix=/Users/donp/php5
--with-apxs2=/Users/donp/apache2/bin/apxs --with-mysql --with-ldap
--with-libxml-dir=/sw/
(configure script completes successfully.)
make
(build progresses to the final link stage)
ld: warning multiple definitions of symbol _pcre_free
ext/pcre/pcrelib/pcre.o definition of _pcre_free in section
(__DATA,__data)
/Users/donp/apache2/bin/httpd definition of _pcre_free
ld: warning multiple definitions of symbol _pcre_malloc
ext/pcre/pcrelib/pcre.o definition of _pcre_malloc in section
(__DATA,__data)
/Users/donp/apache2/bin/httpd definition of _pcre_malloc
ld: warning multiple definitions of symbol _regcomp
/Users/donp/apache2/bin/httpd definition of _regcomp
/usr/lib/libpthread.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
/Users/donp/apache2/bin/httpd definition of _regexec
/usr/lib/libpthread.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
/Users/donp/apache2/bin/httpd definition of _regfree
/usr/lib/libpthread.dylib(regfree.So) definition of _regfree
ld: Undefined symbols:
_mysql_create_db
_mysql_drop_db
make: *** [libs/libphp5.bundle] Error 1
I did some research into it and it looks like those functions might
have been removed from mysqlclient.a at some point. I removed the
source code lines in ext/mysql/php_mysql.c|h that defined
mysql_create_db and mysql_drop_db (basically the code wrapped by
#ifndef NETWARE). It would then build and install but if I tried to use
mysql_connect the apache thread core dumps.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28810&edit=1
Thread (6 messages)