php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49421 Make failure with MySQL 6 and PHP 6.0-dev
Submitted: 2009-08-31 03:49 UTC Modified: 2010-05-27 15:09 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: gabrycucciolo84pv at fastwebnet dot it Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 6SVN-2009-08-31 (snap) OS: Centos 4.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gabrycucciolo84pv at fastwebnet dot it
New email:
PHP Version: OS:

 

 [2009-08-31 03:49 UTC] gabrycucciolo84pv at fastwebnet dot it
Description:
------------
Trying to compile and make snapshot php6.0-200908310030 with MySQL 6.0.11-alpha returns this chain of errors.

With 5.3.1-dev the compilation and make are succesful. The installed files of MySQL 6.0.11-alpha have been reinstalled to ensure they were not corrupted.

Compilation line:

./configure --with-openssl --enable-ctype --with-curl --enable-exif --with-iconv --enable-json --enable-libxml --enable-mbstring --with-bz2 --enable-soap --enable-bcmath --enable-calendar --enable-ftp --with-gd=/usr/local/bin/gdlib-config --with-mcrypt --with-mhash --enable-zip --enable-xmlreader --enable-xmlwriter --with-mysql --with-mysqli --with-apxs2=/usr/local/apache2/bin/apxs --with-pear --with-zlib --enable-gd-native-ttf --with-pgsql=/usr/bin --enable-maintainer-zts  --with-imap --with-kerberos --with-imap-ssl --with-xsl --enable-zend-multibyte --enable-wddx --enable-shmop --with-ldap --with-oci8=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server --with-db4

Reproduce code:
---------------
In file included from /usr/include/mysql/mysql.h:74,
                 from /root/php6.0-200908310030/ext/mysql/php_mysql_structs.h:43,
                 from main/internal_functions.c:58:
/usr/include/mysql/my_list.h:26: error: syntax error before numeric constant
/usr/include/mysql/my_list.h:30: error: syntax error before numeric constant
/usr/include/mysql/my_list.h:34: error: syntax error before numeric constant
/usr/include/mysql/my_list.h:35: error: syntax error before numeric constant
/usr/include/mysql/my_list.h:36: error: syntax error before numeric constant
In file included from /root/php6.0-200908310030/ext/mysql/php_mysql_structs.h:43,
                 from main/internal_functions.c:58:
/usr/include/mysql/mysql.h:266: error: syntax error before numeric constant
/usr/include/mysql/mysql.h:266: warning: no semicolon at end of struct or union
/usr/include/mysql/mysql.h:277: error: syntax error before '}' token
/usr/include/mysql/mysql.h:277: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:286: error: syntax error before "MYSQL"
/usr/include/mysql/mysql.h:286: warning: no semicolon at end of struct or union
/usr/include/mysql/mysql.h:296: error: syntax error before '}' token
/usr/include/mysql/mysql.h:296: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:352: error: syntax error before '*' token
/usr/include/mysql/mysql.h:353: error: syntax error before '*' token
/usr/include/mysql/mysql.h:354: error: syntax error before '*' token
/usr/include/mysql/mysql.h:355: error: syntax error before '*' token
/usr/include/mysql/mysql.h:357: error: syntax error before '*' token
/usr/include/mysql/mysql.h:358: error: syntax error before '*' token
/usr/include/mysql/mysql.h:359: error: syntax error before '*' token
/usr/include/mysql/mysql.h:361: error: syntax error before '*' token
/usr/include/mysql/mysql.h:362: error: syntax error before '*' token
/usr/include/mysql/mysql.h:363: error: syntax error before '*' token
/usr/include/mysql/mysql.h:364: error: syntax error before '*' token
/usr/include/mysql/mysql.h:365: error: syntax error before '*' token
/usr/include/mysql/mysql.h:366: error: syntax error before '*' token
/usr/include/mysql/mysql.h:367: error: syntax error before '*' token
/usr/include/mysql/mysql.h:368: error: syntax error before '*' token
/usr/include/mysql/mysql.h:369: error: syntax error before '*' token
/usr/include/mysql/mysql.h:370: error: syntax error before '*' token
/usr/include/mysql/mysql.h:371: error: syntax error before '*' token
/usr/include/mysql/mysql.h:373: error: syntax error before '*' token
/usr/include/mysql/mysql.h:373: error: syntax error before '*' token
/usr/include/mysql/mysql.h:373: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:374: error: syntax error before '*' token
/usr/include/mysql/mysql.h:377: error: syntax error before '*' token
/usr/include/mysql/mysql.h:378: error: syntax error before '*' token
/usr/include/mysql/mysql.h:380: error: syntax error before '*' token
/usr/include/mysql/mysql.h:380: error: syntax error before '*' token
/usr/include/mysql/mysql.h:386: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:387: error: syntax error before '*' token
/usr/include/mysql/mysql.h:388: error: syntax error before '*' token
/usr/include/mysql/mysql.h:389: error: syntax error before '*' token
/usr/include/mysql/mysql.h:391: error: syntax error before '*' token
/usr/include/mysql/mysql.h:393: error: syntax error before '*' token
/usr/include/mysql/mysql.h:393: error: syntax error before '*' token
/usr/include/mysql/mysql.h:393: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:394: error: syntax error before '*' token
/usr/include/mysql/mysql.h:394: error: syntax error before '*' token
/usr/include/mysql/mysql.h:394: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:396: error: syntax error before '*' token
/usr/include/mysql/mysql.h:404: error: syntax error before '*' token
/usr/include/mysql/mysql.h:406: error: `mysql_set_local_infile_handler' declared as function returning a function
/usr/include/mysql/mysql.h:407: error: syntax error before "int"
/usr/include/mysql/mysql.h:415: error: syntax error before '*' token
/usr/include/mysql/mysql.h:417: error: syntax error before '*' token
/usr/include/mysql/mysql.h:420: error: syntax error before '*' token
/usr/include/mysql/mysql.h:421: error: syntax error before '*' token
/usr/include/mysql/mysql.h:423: error: syntax error before '*' token
/usr/include/mysql/mysql.h:424: error: syntax error before '*' token
/usr/include/mysql/mysql.h:427: error: syntax error before '*' token
/usr/include/mysql/mysql.h:428: error: syntax error before '*' token
/usr/include/mysql/mysql.h:429: error: syntax error before '*' token
/usr/include/mysql/mysql.h:432: error: syntax error before '*' token
/usr/include/mysql/mysql.h:433: error: syntax error before '*' token
/usr/include/mysql/mysql.h:434: error: syntax error before '*' token
/usr/include/mysql/mysql.h:435: error: syntax error before '*' token
/usr/include/mysql/mysql.h:435: error: syntax error before '*' token
/usr/include/mysql/mysql.h:435: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:436: error: syntax error before '*' token
/usr/include/mysql/mysql.h:436: error: syntax error before '*' token
/usr/include/mysql/mysql.h:436: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:437: error: syntax error before '*' token
/usr/include/mysql/mysql.h:437: error: syntax error before '*' token
/usr/include/mysql/mysql.h:437: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:438: error: syntax error before '*' token
/usr/include/mysql/mysql.h:440: error: syntax error before '*' token
/usr/include/mysql/mysql.h:441: error: syntax error before '*' token
/usr/include/mysql/mysql.h:443: error: syntax error before '*' token
/usr/include/mysql/mysql.h:445: error: syntax error before '*' token
/usr/include/mysql/mysql.h:447: error: syntax error before '*' token
/usr/include/mysql/mysql.h:448: error: syntax error before '*' token
/usr/include/mysql/mysql.h:449: error: syntax error before '*' token
/usr/include/mysql/mysql.h:450: error: syntax error before '*' token
/usr/include/mysql/mysql.h:450: error: syntax error before '*' token
/usr/include/mysql/mysql.h:451: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:456: error: syntax error before '*' token
/usr/include/mysql/mysql.h:460: error: syntax error before '*' token
/usr/include/mysql/mysql.h:463: error: syntax error before '*' token
/usr/include/mysql/mysql.h:574: error: syntax error before numeric constant
/usr/include/mysql/mysql.h:574: warning: no semicolon at end of struct or union
/usr/include/mysql/mysql.h:575: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:577: error: 'bind' redeclared as different kind of symbol
/usr/include/sys/socket.h:111: error: previous declaration of 'bind' was here
/usr/include/mysql/mysql.h:577: error: 'bind' redeclared as different kind of symbol
/usr/include/sys/socket.h:111: error: previous declaration of 'bind' was here
/usr/include/mysql/mysql.h:616: error: syntax error before '}' token
/usr/include/mysql/mysql.h:616: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:643: error: syntax error before '*' token
/usr/include/mysql/mysql.h:644: error: syntax error before '*' token
/usr/include/mysql/mysql.h:652: error: syntax error before '*' token
/usr/include/mysql/mysql.h:654: warning: no semicolon at end of struct or union
/usr/include/mysql/mysql.h:657: error: syntax error before '*' token
/usr/include/mysql/mysql.h:659: error: syntax error before '*' token
/usr/include/mysql/mysql.h:660: error: syntax error before '*' token
/usr/include/mysql/mysql.h:661: error: syntax error before '*' token
/usr/include/mysql/mysql.h:662: error: syntax error before '*' token
/usr/include/mysql/mysql.h:663: error: syntax error before '*' token
/usr/include/mysql/mysql.h:664: error: syntax error before '*' token
/usr/include/mysql/mysql.h:665: error: syntax error before '*' token
/usr/include/mysql/mysql.h:666: error: syntax error before '*' token
/usr/include/mysql/mysql.h:667: error: syntax error before '*' token
/usr/include/mysql/mysql.h:668: error: syntax error before '*' token
/usr/include/mysql/mysql.h:670: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:673: error: syntax error before '*' token
/usr/include/mysql/mysql.h:673: error: syntax error before '*' token
/usr/include/mysql/mysql.h:673: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:674: error: syntax error before '*' token
/usr/include/mysql/mysql.h:676: error: syntax error before '*' token
/usr/include/mysql/mysql.h:677: error: syntax error before '*' token
/usr/include/mysql/mysql.h:678: error: syntax error before '*' token
/usr/include/mysql/mysql.h:681: error: syntax error before '*' token
/usr/include/mysql/mysql.h:682: error: syntax error before '*' token
/usr/include/mysql/mysql.h:683: error: syntax error before '*' token
/usr/include/mysql/mysql.h:686: error: syntax error before '*' token
/usr/include/mysql/mysql.h:689: error: syntax error before '*' token
/usr/include/mysql/mysql.h:690: error: syntax error before '*' token
/usr/include/mysql/mysql.h:691: error: syntax error before '*' token
/usr/include/mysql/mysql.h:692: error: syntax error before '*' token
/usr/include/mysql/mysql.h:693: error: syntax error before '*' token
/usr/include/mysql/mysql.h:694: error: syntax error before '*' token
/usr/include/mysql/mysql.h:698: error: syntax error before '*' token
/usr/include/mysql/mysql.h:698: error: syntax error before '*' token
/usr/include/mysql/mysql.h:698: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:699: error: syntax error before '*' token
/usr/include/mysql/mysql.h:699: error: syntax error before '*' token
/usr/include/mysql/mysql.h:699: warning: data definition has no type or storage class
/usr/include/mysql/mysql.h:700: error: syntax error before '*' token
/usr/include/mysql/mysql.h:701: error: syntax error before '*' token
/usr/include/mysql/mysql.h:702: error: syntax error before '*' token
/usr/include/mysql/mysql.h:703: error: syntax error before '*' token
/usr/include/mysql/mysql.h:705: error: syntax error before '*' token
/usr/include/mysql/mysql.h:706: error: syntax error before '*' token
/usr/include/mysql/mysql.h:707: error: syntax error before '*' token
/usr/include/mysql/mysql.h:708: error: syntax error before '*' token
/usr/include/mysql/mysql.h:709: error: syntax error before '*' token
/usr/include/mysql/mysql.h:710: error: syntax error before '*' token
/usr/include/mysql/mysql.h:712: error: syntax error before '*' token
/usr/include/mysql/mysql.h:713: error: syntax error before '*' token
/usr/include/mysql/mysql.h:714: error: syntax error before '*' token
/usr/include/mysql/mysql.h:715: error: syntax error before '*' token
/usr/include/mysql/mysql.h:716: error: syntax error before '*' token
/usr/include/mysql/mysql.h:717: error: syntax error before '*' token
/usr/include/mysql/mysql.h:718: error: syntax error before '*' token
make: *** [main/internal_functions.lo] Error 1


Expected result:
----------------
Make Succesful

Actual result:
--------------
Compilation Failed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-31 13:26 UTC] gabrycucciolo84pv at fastwebnet dot it
I can confirm the issue now.

I tried to compile, make and install php5.3-dev and the compile is successful, the make is successful and the install is successful.

If I try to compile php6,0-dev with the same configure line, compile is successful, but make dies with the above reported errors. (tried with 31080030 snapshot and the 31081230 one.

Is php6.0-dev trying to link to mysql in a different way from 5.3-dev?
 [2009-09-01 00:40 UTC] gabrycucciolo84pv at fastwebnet dot it
We CAN assume that the problem happens only with PHP6 (php5.3 compiles and
makes succesfully) but what I don't know is the linking type.

I mean:

I don't know if php5.3-dev and php6.0-dev link against mysql in the same way. (i.e. I
don't know if php5.3-dev and php6.0-dev include the same file(s) and in the same way (same
functions or so). That said, I can't tell weather the bug is php, mysql or compiler
related.

On thing is certain: gcc HAS been upgraded in the meantime. That lead me to try to
recompile php 5.3-dev (fresh sources) to see if the bug was still present and at the end
it wasn't. php5.3-dev compiles succesfully.

In the past, php6.0-dev compiled succesfully too so I'm not able to understand what is
wrong where, I only suppose that the problem might origin from a combination of factors,
such as compiler upgraded, mysql version and php version.
I also tried to remove from php the --with-mysql line and leave the
--with-mysqli=/usr/bin/mysql_config and in this case php compiles succesfully, so the
problem resides inside mysql.h include or misunderstanding between compiler, php and mysql
headers.

UPDATE:

More informations:
Recently I upgraded my box from CentOS 4.7 to CentOS 4.8 (20 august). Issues with php
mysql and the compiler begun after this upgrade.

More News:

I tried to install on my box gcc4-* from CentOS repository. The error list shortened to
this:

/bin/sh /root/php6.0-200908312230/libtool --silent --preserve-dup-deps --mode=compile
/root/php6.0-200908312230/meta_ccld  -Imain/ -I/root/php6.0-200908312230/main/
-DPHP_ATOM_INC -I/root/php6.0-200908312230/include -I/root/php6.0-200908312230/main
-I/root/php6.0-200908312230 -I/usr/local/include -I/root/php6.0-200908312230/ext/date/lib
-I/root/php6.0-200908312230/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/imap
-I/root/php6.0-200908312230/ext/mbstring/oniguruma
-I/root/php6.0-200908312230/ext/mbstring/libmbfl
-I/root/php6.0-200908312230/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo
-I/root/php6.0-200908312230/ext/sqlite3/libsqlite -I/root/php6.0-200908312230/TSRM
-I/root/php6.0-200908312230/Zend  -D_REENTRANT -DTHREAD=1  -I/usr/include -g -O2 -pthread
-DZTS  -prefer-non-pic -c main/internal_functions.c -o main/internal_functions.lo 
In file included from /usr/include/mysql/mysql.h:74,
                 from /root/php6.0-200908312230/ext/mysql/php_mysql_structs.h:43,
                 from main/internal_functions.c:58:
/usr/include/mysql/my_list.h:26: error: expected identifier or '(' before numeric
constant
/usr/include/mysql/my_list.h:30: error: expected identifier or '(' before numeric
constant
/usr/include/mysql/my_list.h:31: error: expected identifier or '(' before numeric
constant
/usr/include/mysql/my_list.h:32: error: expected identifier or '(' before numeric
constant
/usr/include/mysql/my_list.h:33: error: expected identifier or '(' before numeric
constant
/usr/include/mysql/my_list.h:34: error: expected declaration specifiers or '...' before
numeric constant
/usr/include/mysql/my_list.h:35: error: expected declaration specifiers or '...' before
numeric constant
/usr/include/mysql/my_list.h:36: error: expected declaration specifiers or '...' before
numeric constant
In file included from /root/php6.0-200908312230/ext/mysql/php_mysql_structs.h:43,
                 from main/internal_functions.c:58:
/usr/include/mysql/mysql.h:266: error: expected specifier-qualifier-list before numeric
constant
/usr/include/mysql/mysql.h:574: error: expected specifier-qualifier-list before numeric
constant
make: *** [main/internal_functions.lo] Error 1

So i think we can now assume that the main responsible for this behaviour is the compiler update of CentOS 4.8 and some PHP6/MYSQL6 interactions with it.
The worse is now to understand what is going on...

Still trying but no luck

I am now analysing php Makefile(s) to look for some differences but surprisingly there
aren't.

Both have MYSQL_INCLUDE = -I/usr/include/mysql directive, so there should be no way in
hell why with 5.3-dev compilation is successful and with 6.0-dev it fails poorly.

The compiler likes the mysql.h the first time but not the second...so at this point I have
to suspect the compiler beeing called in a wrong way or with some missing flags by php but
it's a really strange surreal situation...
 [2009-09-01 05:39 UTC] sveta at mysql dot com
MySQL is http://bugs.mysql.com/bug.php?id=47026
 [2009-09-03 03:28 UTC] gabrycucciolo84pv at fastwebnet dot it
After long work and time spent to read many documents and bugs, i found that solution indicated here: http://bugs.php.net/bug.php?id=42890 solves the problem and makes php compile succesfully.

(I had some problems with running phpBB e phpMyAdmin but I assume those problems are because php6.0-dev is in Alpha and code is not written for that version, and I think it has nothing to do with the fix indicated in the Bug Above).
 [2010-05-27 15:09 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-05-27 15:09 UTC] johannes@php.net
Both PHP 6 and MySQL 6 aren't continued. The issue itself was a MySQL no PHP issue.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC