php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35107 compile failure with PHP 5.1 + MySQL 5
Submitted: 2005-11-04 17:40 UTC Modified: 2005-11-07 15:35 UTC
From: alex at whitewhale dot net Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5CVS-2005-11-05 (snap) OS: MacOS X 10.4.3
Private report: No CVE-ID: None
 [2005-11-04 17:40 UTC] alex at whitewhale dot net
Description:
------------
Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---------------
make

Expected result:
----------------
a successful compile

Actual result:
--------------
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-04 18:20 UTC] sniper@php.net
Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config

 [2005-11-05 02:17 UTC] alex at whitewhale dot net
Actually, I ran "make clean" several times in trying to 
diagnose this. Also, as I said, I tried compiling a fresh 
snapshot this morning to no avail.

I was finally able to compile it with your suggested, 
stripped-down config line after both "rm config.cache" and 
"make clean" but the moment I tried it with my normal config 
line, it failed again with the original error.

Just to be clear, the following sequence does *not* work for 
me (on my Mac, it works on my Linux box):

rm config.cache
make clean
./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --
enable-inline-optimization --with-libxml-dir=/sw --with-
mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-
jpeg-dir=/sw --with-png-dir=/sw --with-zlib-dir=/usr --with-
pdo-mysql --with-xmlrpc --with-mm=/usr/local --disable-debug 
--with-ldap --enable-soap
make
 [2005-11-05 12:39 UTC] sniper@php.net
So now we've found out that the problem isn't in ext/mysqli.
Try this configure line (with the usual "rm config.cache" and "make clean", which are only needed if you're not using fresh sources everytime)

# ./configure --disable-all --enable-pdo --with-pdo-mysql
 [2005-11-05 16:38 UTC] sniper@php.net
Assigned to the PDO maintainer.
 [2005-11-05 17:20 UTC] wez@php.net
Please try using this CVS snapshot:

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

I just committed a fix; please try the next snapshot.
 [2005-11-05 22:59 UTC] alex at whitewhale dot net
Okay, tried the following with latest snapshot:

rm config.cache
./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --with-
mysqli=/usr/local/mysql/bin/mysql_config --with-zlib --with-
pdo-mysql

It fails to run with:

checking for MySQL support for PDO... yes
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under 

I have verified that /usr/local/mysql/bin/mysql_config is 
there and mysql.h is in /usr/local/mysql/include. This was a 
standard MySQL 5.0.15 install with the MacOS X installer.

If I use the same configure line without --with-pdo-mysql it 
finishes configure successfully.
 [2005-11-07 15:33 UTC] sniper@php.net
What does it say in config.log? (if anything, don't paste the whole file, only 5 last lines MAX!)

 [2005-11-07 15:35 UTC] sniper@php.net
Actually, it will work if you pass the configure option correctly, just like with --with-mysqli.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC