/usr/local/include/mysql/my_global.h:1008: error: duplicate ‘unsigned’ php-5.3.3

PHP-5.3.3 is out, however before you consider upgrading any of the production machines, know that there is a bug that prevents compiling the mysqli extension:
/bin/sh /root/devel/php-5.3.3/libtool –silent –preserve-dup-deps –mode=compile gcc  -Iext/mysqli/ -I/root/devel/php-5.3.3/ext/mysqli/ -DPHP_ATOM_INC -I/root/devel/php-5.3.3/include -I/root/devel/php-5.3.3/main -I/root/devel/php-5.3.3 -I/root/devel/php-5.3.3/ext/date/lib -I/root/devel/php-5.3.3/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/c-client -I/root/devel/php-5.3.3/ext/mbstring/oniguruma -I/root/devel/php-5.3.3/ext/mbstring/libmbfl -I/root/devel/php-5.3.3/ext/mbstring/libmbfl/mbfl -I/usr/local/include/mysql -I/root/devel/php-5.3.3/TSRM -I/root/devel/php-5.3.3/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden  -c /root/devel/php-5.3.3/ext/mysqli/mysqli.c -o ext/mysqli/mysqli.lo
In file included from /root/devel/php-5.3.3/ext/mysqli/php_mysqli_structs.h:57,
from /root/devel/php-5.3.3/ext/mysqli/mysqli.c:33:
/usr/local/include/mysql/my_global.h:1008: error: duplicate ‘unsigned’
/usr/local/include/mysql/my_global.h:1008: warning: useless type name in empty declaration
*** Error code 1
Stop in /root/devel/php-5.3.3.

It can be fixed however with a patch that should be applied before compilation: patch can be found here.

Hopefully in the next few days, the PHP team will release some update to fix this issue.

6 Responses to “/usr/local/include/mysql/my_global.h:1008: error: duplicate ‘unsigned’ php-5.3.3”

  1. This saved me some grief just now. Thanks.

  2. enoola says:

    Cherio 🙂
    thx

  3. Mila says:

    Many thanks man, found your post just in time. Solution worked.

  4. wubangjun says:

    Index: ext/mysqli/php_mysqli_structs.h
    ===================================================================
    — ext/mysqli/php_mysqli_structs.h (revision 301474)
    +++ ext/mysqli/php_mysqli_structs.h (working copy)
    @@ -54,6 +54,7 @@
    #define WE_HAD_MBSTATE_T
    #endif

    +#define HAVE_ULONG 1
    #include

    #if !defined(HAVE_MBRLEN) && defined(WE_HAD_MBRLEN)

Trackbacks/Pingbacks

  1. PHP 5.3.3 MySQLi compile woes: my_global.h and error: duplicate ‘unsigned’ : Code Sprout - [...] re-compile PHP I get some whacky error. Anyway, I was fortunate enough that a quick Googling found a solution…

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge