|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52413 MySQLi build failure on OS X
Submitted: 2010-07-23 10:50 UTC Modified: 2010-08-13 12:09 UTC
Avg. Score:4.8 ± 0.4
Reproduced:12 of 12 (100.0%)
Same Version:9 (75.0%)
Same OS:8 (66.7%)
From: Assigned: mysql (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.3.3 OS: Mac OS X 10.6.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 - 23 = ?
Subscribe to this entry?

 [2010-07-23 10:50 UTC]
Building mysqli against an external libmysql fails on OS X 10.6.4 (and probably 
other versions). Compilation succeeds when mysqlnd is used.

I'm using mysql-connector-c 6.0.2, which is the current package.

Actual result:
/bin/sh /Users/aharvey/Trees/php-5.3.3/libtool --silent --preserve-dup-deps --
mode=compile gcc  -Iext/mysqli/ -I/Users/aharvey/Trees/php-5.3.3/ext/mysqli/ -
DPHP_ATOM_INC -I/Users/aharvey/Trees/php-5.3.3/include -
I/Users/aharvey/Trees/php-5.3.3/main -I/Users/aharvey/Trees/php-5.3.3 -
I/Users/aharvey/Trees/php-5.3.3/ext/date/lib -I/Users/aharvey/Trees/php-
5.3.3/ext/ereg/regex -I/usr/include/libxml2 -I/usr/local/include -
I/Users/aharvey/Trees/php-5.3.3/ext/sqlite3/libsqlite -I/Users/aharvey/Trees/php-
5.3.3/TSRM -I/Users/aharvey/Trees/php-5.3.3/Zend  -no-cpp-precomp  -I/usr/include 
-g -O2 -fvisibility=hidden  -c /Users/aharvey/Trees/php-5.3.3/ext/mysqli/mysqli.c 
-o ext/mysqli/mysqli.lo 
In file included from /Users/aharvey/Trees/php-
                 from /Users/aharvey/Trees/php-5.3.3/ext/mysqli/mysqli.c:33:
/usr/local/include/my_global.h:1011: error: duplicate ‘unsigned’
make: *** [ext/mysqli/mysqli.lo] Error 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-23 13:13 UTC]
Also affecting FreeBSD, per bug #52416.
 [2010-07-23 13:25 UTC]
r300436 looks like the culprit.
 [2010-07-23 13:42 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mysql
 [2010-07-23 13:42 UTC]
The bottom line on this one is that we're now manually including a
bunch more libmysql headers in a different order to 5.3.2, and one of
the headers we're pulling in is my_global.h. my_global.h checks if
HAVE_ULONG is #define'd, and if it's not, attempts to typedef unsigned
long ulong.

Obviously, if we've previously #define'd ulong to mean "unsigned long"
-- say in php_config.h -- this doesn't work out so well.

The quick and dirty fix would be to #define HAVE_ULONG 1 just before
including my_global.h, but I suspect Andrey (or someone else who works
on the various MySQL extensions) will likely have a better idea on
 [2010-08-13 11:57 UTC]
Automatic comment from SVN on behalf of andrey
Log: Fix for bug #52413 MySQLi build failure on OS X
 [2010-08-13 11:57 UTC]
-Status: Assigned +Status: Feedback
 [2010-08-13 11:57 UTC]
Patch just committed, please use svn or wait at least 2h to get a snapshot from, for testing. If everything is alright, fix will be part of 5.3.4 .

 [2010-08-13 12:09 UTC]
-Status: Feedback +Status: Closed
 [2010-08-13 12:09 UTC]
Looks good to me; with that change, MySQLi builds fine on OS X against an external libmysqlclient.

Thanks Andrey!
 [2010-10-18 14:18 UTC] alwin dot roosen at webline dot be
Just want to confirm that the patch is working, was having the same issue on 
FreeBSD 7.3, mysql 5.0.90 and php 5.3.3
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 03:01:29 2024 UTC