ID: 37388 Comment by: sfm_home at yahoo dot com Reported By: s dot s at terra dot com dot br Status: Open Bug Type: MySQLi related Operating System: Slackware Linux 10.2 PHP Version: 5.1.4 New Comment:
Thanks for the -lmygcc workaround. It did the trick for me on RedHat 8 (gcc-3.2-7) with MySQL 5.0.21 and PHP 5.1.4, but I had to edit the Makefile to append -lmygcc to both EXTRA_LIBS and MYSQL_LIBS. If I did not append it to MYSQL_LIBS, the make completed; but I got a runtime error starting Apache (1.3.32) and needed to start over with make clean first and then make. The runtime error I saw is Syntax error on line 205 of /www/conf/httpd.conf: Cannot load /www/libexec/libphp5.so into server: /www/libexec/libphp5.so: undefined symbol: __builtin_delete Previous Comments: ------------------------------------------------------------------------ [2006-05-17 01:37:23] s dot s at terra dot com dot br I have try to change the configure script, but it dont work. May its becose my poor skills on sh scripting :\ Digging the mysql bug database I have found the same bug reported, if it can help... http://bugs.mysql.com/bug.php?id=19817 ------------------------------------------------------------------------ [2006-05-17 01:02:19] s dot s at terra dot com dot br Partial fix: Reading better the suggested bug http://bugs.mysql.com/bug.php?id=4921 I start trying to compile the mysql_error() check by hand. conftest.c ------------- #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_error(); int main() { mysql_error() ; return 0; } ------------- Compilation commandline (configure generated): gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl Working compilation line: gcc -o conftest conftest.c -I/usr/include -g -O2 -pthread -D_REENTRANT -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/lib -L/usr/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr -L/usr -lmysqlclient -lz -lgd -lfreetype -lpng -lz -ljpeg -ldb-3.3 -ldb-3.3 -lgdbm -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lssl -lcrypto -ldl -lmygcc Note the -lmygcc to link with this library on the working compilation line. I gess we need to change the configure to check its presence for MySQL versions over 5.0.20 Compilation status: UNTESTED I will try to change the configure (Im not familiar with configure/Makefile scripts) to use the mygcc library on linking process. ------------------------------------------------------------------------ [2006-05-17 00:56:10] s dot s at terra dot com dot br Step 1: Remove the libmysqlclient.a Step 2: Try to run configure again on PHP 5.1.4 source tree ------------------------------------------------------- checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... yes checking for MySQL UNIX socket location... /tmp/mysql.sock configure: error: Cannot find libmysqlclient under /usr/local/mysql. Note that the MySQL client library is not bundled anymore! ------------------------------------------------------- ------------------------------------------------------------------------ [2006-05-16 06:28:16] [EMAIL PROTECTED] Please remove libmysqlclient.a and try again. See http://bugs.mysql.com/bug.php?id=4921 for details. ------------------------------------------------------------------------ [2006-05-16 01:17:22] s dot s at terra dot com dot br Hi, you can see the full config.log file on: http://lhotian.no-ip.org:8000/php/config.log Machine setup to reproduce the error: Apache 2.2.2 (untested on other versions, but thats not the point) PHP 5.1.4 (tested with 5.1.3 and got the same error) MySQL 5.0.21 (binary standard) (tested with 5.0.20 and 5.0.20a and got the same error) It compiles clearly with MySQL 5.0.19 (binary standard), using the same setup. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/37388 -- Edit this bug report at http://bugs.php.net/?id=37388&edit=1