Bug #64780 [PATCH]: PHP 5.5 builds are broken with GCC 3
Edit report at https://bugs.php.net/bug.php?id=64780&edit=1 ID: 64780 Patch added by: ardbiesheu...@php.net Reported by:s...@php.net Summary:PHP 5.5 builds are broken with GCC 3 Status: Open Type: Bug Package:Compile Failure Operating System: Linux PHP Version:5.5Git-2013-05-06 (snap) Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: gcc3-offsetof Revision: 1367917610 URL: https://bugs.php.net/patch-display.php?bug=64780&patch=gcc3-offsetof&revision=1367917610 Previous Comments: [2013-05-07 04:02:06] s...@php.net The following patch has been added/updated: Patch Name: zend_operators.h.patch Revision: 1367899326 URL: https://bugs.php.net/patch-display.php?bug=64780&patch=zend_operators.h.patch&revision=1367899326 [2013-05-06 23:05:30] s...@php.net Description: PHP 5.5 builds are broken with GCC 3.4.6 due to the inline assembler changes in zend_operators.h (in aa12cdc361) Since the old assembler code path works for GCC 3, I suggest we simply retain it with appropriate #ifdef's. This may make someone's life easier, e.g. during platform migration. Note RHEL 4.9 with GCC 3.4.6 was released 2 years ago. GCC 3.4.6 itself was released 6 years ago. Currently compiling PHP 5.5 with GCC 3.4.6 fails with: In file included from /tmp/php5.5-201305061630/Zend/zend.h:840, from /tmp/php5.5-201305061630/main/php.h:34, from /tmp/php5.5-201305061630/ext/date/php_date.c:21: /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_increment_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:516: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:516: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_decrement_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:559: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:559: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_add_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:613: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:613: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_sub_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:698: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:698: error: syntax error before "zval" make: *** [ext/date/php_date.lo] Error 1 The patch is attached. It was tested with GCC 3.4.6 and 4.1.2 on 32 and 64 bit Oracle Linux. -- Edit this bug report at https://bugs.php.net/bug.php?id=64780&edit=1
Bug #64780 [Com]: PHP 5.5 builds are broken with GCC 3
Edit report at https://bugs.php.net/bug.php?id=64780&edit=1 ID: 64780 Comment by: ardbiesheu...@php.net Reported by:s...@php.net Summary:PHP 5.5 builds are broken with GCC 3 Status: Open Type: Bug Package:Compile Failure Operating System: Linux PHP Version:5.5Git-2013-05-06 (snap) Block user comment: N Private report: N New Comment: This seems to be related to GCC 3 not having support for __builtin_offsetof(). Let's fix it like this instead (see patch). Could you please try it? Previous Comments: [2013-05-07 09:06:50] ardbiesheu...@php.net The following patch has been added/updated: Patch Name: gcc3-offsetof Revision: 1367917610 URL: https://bugs.php.net/patch-display.php?bug=64780&patch=gcc3-offsetof&revision=1367917610 [2013-05-07 04:02:06] s...@php.net The following patch has been added/updated: Patch Name: zend_operators.h.patch Revision: 1367899326 URL: https://bugs.php.net/patch-display.php?bug=64780&patch=zend_operators.h.patch&revision=1367899326 [2013-05-06 23:05:30] s...@php.net Description: PHP 5.5 builds are broken with GCC 3.4.6 due to the inline assembler changes in zend_operators.h (in aa12cdc361) Since the old assembler code path works for GCC 3, I suggest we simply retain it with appropriate #ifdef's. This may make someone's life easier, e.g. during platform migration. Note RHEL 4.9 with GCC 3.4.6 was released 2 years ago. GCC 3.4.6 itself was released 6 years ago. Currently compiling PHP 5.5 with GCC 3.4.6 fails with: In file included from /tmp/php5.5-201305061630/Zend/zend.h:840, from /tmp/php5.5-201305061630/main/php.h:34, from /tmp/php5.5-201305061630/ext/date/php_date.c:21: /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_increment_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:516: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:516: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_decrement_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:559: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:559: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_add_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:613: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:613: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h: In function `fast_sub_function': /tmp/php5.5-201305061630/Zend/zend_operators.h:698: error: syntax error before "zval" /tmp/php5.5-201305061630/Zend/zend_operators.h:698: error: syntax error before "zval" make: *** [ext/date/php_date.lo] Error 1 The patch is attached. It was tested with GCC 3.4.6 and 4.1.2 on 32 and 64 bit Oracle Linux. -- Edit this bug report at https://bugs.php.net/bug.php?id=64780&edit=1
Bug #64197 [Com]: The PHP5 module don't build
Edit report at https://bugs.php.net/bug.php?id=64197&edit=1 ID: 64197 Comment by: ardbiesheu...@php.net Reported by:mats at exmandato dot se Summary:The PHP5 module don't build Status: Open Type: Bug Package:Compile Failure Operating System: FreeBSD10 / ARM PHP Version:5.4.11 Block user comment: N Private report: N New Comment: This has nothing to do with ARM. Looking at the log, it appears that LLVM/Clang does not understand _Offsetof, and treats it as an implicit function declaration and not a macro. Passing type names to functions is not supported in C so it complains that it expects an expression instead. Previous Comments: [2013-02-12 17:53:55] s...@php.net It could be interesting to try a snapshot of trunk from http://snaps.php.net/, since some ARM fixes have recently been merged there, [2013-02-12 15:42:53] mats at exmandato dot se Description: ===> Building for php5-5.4.11 /bin/sh /usr/ports/lang/php5/work/php-5.4.11/libtool --silent --preserve-dup-deps --mode=compile clang -Iext/date/lib -Iext/date/ -I/usr/ports/lang/php5/work/php-5.4.11/ext/date/ -DPHP_ATOM_INC -I/usr/ports/lang/php5/work/php-5.4.11/include -I/usr/ports/lang/php5/work/php-5.4.11/main -I/usr/ports/lang/php5/work/php-5.4.11 -I/usr/ports/lang/php5/work/php-5.4.11/ext/date/lib -I/usr/ports/lang/php5/work/php-5.4.11/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/ports/lang/php5/work/php-5.4.11/TSRM -I/usr/ports/lang/php5/work/php-5.4.11/Zend-O2 -mno-global-merge -mno-load-store-multiple -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s -mfloat-abi=soft -c /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c -o ext/date/php_date.lo /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c:500:2: warning: implicit declaration of function '_Offsetof' is invalid in C99 [-Wimplicit-function-declaration] STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) ^ /usr/ports/lang/php5/work/php-5.4.11/main/php_ini.h:67:28: note: expanded from macro 'STD_PHP_INI_ENTRY' #define STD_PHP_INI_ENTRY STD_ZEND_INI_ENTRY ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:150:71: note: expanded from macro 'STD_ZEND_INI_ENTRY' ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:55:36: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) XtOffset(s_type*, field) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:127:65: note: expanded from macro 'ZEND_INI_ENTRY2' ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:124:65: note: expanded from macro 'ZEND_INI_ENTRY2_EX' ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL, displayer) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:118:50: note: expanded from macro 'ZEND_INI_ENTRY3_EX' { 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, 0, displayer }, ^ /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c:500:88: error: unexpected type name 'zend_date_globals': expected expression STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:150:82: note: expanded from macro 'STD_ZEND_INI_ENTRY' ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:55:45: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) XtOffset(s_type*, field)
Bug #64197 [Com]: The PHP5 module don't build
Edit report at https://bugs.php.net/bug.php?id=64197&edit=1 ID: 64197 Comment by: ardbiesheu...@php.net Reported by:mats at exmandato dot se Summary:The PHP5 module don't build Status: Open Type: Bug Package:Compile Failure Operating System: FreeBSD10 / ARM PHP Version:5.4.11 Block user comment: N Private report: N New Comment: It appears that this code is performing some tests to decide whether the CRAY or ARM proprietary compilers are being used, and this is giving bad results on FreeBSD/ARM. Could you set the the following #define *before* the #ifndef XtOffsetOf in Zend/zend_ini,h:30 #define XtOffsetOf __builtin_offsetof and try again? Previous Comments: [2013-02-12 19:35:24] ardbiesheu...@php.net This has nothing to do with ARM. Looking at the log, it appears that LLVM/Clang does not understand _Offsetof, and treats it as an implicit function declaration and not a macro. Passing type names to functions is not supported in C so it complains that it expects an expression instead. [2013-02-12 17:53:55] s...@php.net It could be interesting to try a snapshot of trunk from http://snaps.php.net/, since some ARM fixes have recently been merged there, [2013-02-12 15:42:53] mats at exmandato dot se Description: ===> Building for php5-5.4.11 /bin/sh /usr/ports/lang/php5/work/php-5.4.11/libtool --silent --preserve-dup-deps --mode=compile clang -Iext/date/lib -Iext/date/ -I/usr/ports/lang/php5/work/php-5.4.11/ext/date/ -DPHP_ATOM_INC -I/usr/ports/lang/php5/work/php-5.4.11/include -I/usr/ports/lang/php5/work/php-5.4.11/main -I/usr/ports/lang/php5/work/php-5.4.11 -I/usr/ports/lang/php5/work/php-5.4.11/ext/date/lib -I/usr/ports/lang/php5/work/php-5.4.11/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/ports/lang/php5/work/php-5.4.11/TSRM -I/usr/ports/lang/php5/work/php-5.4.11/Zend-O2 -mno-global-merge -mno-load-store-multiple -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s -mfloat-abi=soft -c /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c -o ext/date/php_date.lo /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c:500:2: warning: implicit declaration of function '_Offsetof' is invalid in C99 [-Wimplicit-function-declaration] STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) ^ /usr/ports/lang/php5/work/php-5.4.11/main/php_ini.h:67:28: note: expanded from macro 'STD_PHP_INI_ENTRY' #define STD_PHP_INI_ENTRY STD_ZEND_INI_ENTRY ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:150:71: note: expanded from macro 'STD_ZEND_INI_ENTRY' ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:55:36: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) XtOffset(s_type*, field) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:127:65: note: expanded from macro 'ZEND_INI_ENTRY2' ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:124:65: note: expanded from macro 'ZEND_INI_ENTRY2_EX' ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL, displayer) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:118:50: note: expanded from macro 'ZEND_INI_ENTRY3_EX' { 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, 0, displayer }, ^ /usr/ports/lang/php5/work/php-5.4.11/ext/date/php_date.c:500:88: error: unexpected type name 'zend_date_globals': expected expression STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) ^ /usr/ports/lang/php5/work/php-5.4.11/Zend/zend_ini.h:150:82: note: expanded from macro 'ST