|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-08-16 13:40 UTC] stu at coe dot uky dot edu
Description: ------------ On machines with Apache 2.4.6, when compiling PHP 5.4.18, it fails with the error: /usr/src/php-5.4.18/Zend/zend_language_parser.h:327:5: error: conflicting types for 'zendparse' Test script: --------------- My configure (which works with Apache 2.2.25) is: CFLAGS="-mtune=native" CPPFLAGS="-mtune=native" ./configure --with-mysql=/home/mysql --with-apxs2=/home/httpd/bin/apxs --with-curl Expected result: ---------------- I expected PHP 5.4.18 to compile Actual result: -------------- On machines with Apache 2.4.6, compiling fails. (Seen on two different machines, so far) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
I am running into this same error on RHEL 5 with Apache 2.2.3 and RHEL 6 with 2.2.15. Same config on both but slightly different error: %configure \ --cache-file=../config.cache \ --with-libdir=%{_lib} \ --with-config-file-path=%{_sysconfdir} \ --with-config-file-scan-dir=%{_sysconfdir}/php.d \ --disable-debug \ --with-pic \ --disable-rpath \ --without-pear \ --with-bz2 \ --with-exec-dir=%{_bindir} \ --with-freetype-dir=%{_prefix} \ --with-png-dir=%{_prefix} \ --with-xpm-dir=%{_prefix} \ --enable-gd-native-ttf \ --with-t1lib=%{_prefix} \ --without-gdbm \ --with-gettext \ --with-gmp \ --with-iconv \ --with-jpeg-dir=%{_prefix} \ --with-openssl \ --with-pcre-regex \ --with-zlib \ --with-layout=GNU \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ --enable-sockets \ --with-kerberos \ --enable-ucd-snmp-hack \ --enable-shmop \ --enable-calendar \ --with-libxml-dir=%{_prefix} \ --enable-xml \ --with-system-tzdata \ --with-mhash \ Error in RHEL 5: In file included from /builddir/build/BUILD/php- 5.4.18/ext/standard/basic_functions.c:48: /builddir/build/BUILD/php-5.4.18/Zend/zend_language_parser.h:327: error: conflicting types for 'zendparse' /builddir/build/BUILD/php-5.4.18/Zend/zend_globals_macros.h:35: error: previous declaration of 'zendparse' was here /bin/sh /builddir/build/BUILD/php-5.4.18/build-ztscli/libtool --silent -- preserve-dup-deps --mode=compile /builddir/build/BUILD/php-5.4.18/build- ztscli/meta_ccld -Iext/standard/ -I/builddir/build/BUILD/php- 5.4.18/ext/standard/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.4.18/build- ztscli/include -I/builddir/build/BUILD/php-5.4.18/build-ztscli/main - I/builddir/build/BUILD/php-5.4.18 -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/date/lib -I/builddir/build/BUILD/php-5.4.18/ext/date/lib - I/builddir/build/BUILD/php-5.4.18/ext/ereg/regex -I/usr/include/libxml2 - I/usr/kerberos/include -I/usr/include/enchant -I/usr/include/freetype2 - I/usr/include/imap -I/usr/lib/firebird/include -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/oniguruma -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/libmbfl -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell - I/builddir/build/BUILD/php-5.4.18/build-ztscli/TSRM -I/builddir/build/BUILD/php- 5.4.18/build-ztscli/Zend -I/builddir/build/BUILD/php-5.4.18/main - I/builddir/build/BUILD/php-5.4.18/Zend -I/builddir/build/BUILD/php-5.4.18/TSRM - I/builddir/build/BUILD/php-5.4.18/build-ztscli/ -D_REENTRANT -I/usr/include - O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -- param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind- tables -fno-strict-aliasing -Wno-pointer-sign -fvisibility=hidden -pthread -DZTS -c /builddir/build/BUILD/php-5.4.18/ext/standard/filestat.c -o ext/standard/filestat.lo make: *** [ext/standard/basic_functions.lo] Error 1 make: *** Waiting for unfinished jobs.... /builddir/build/BUILD/php-5.4.18/ext/standard/array.c: In function 'php_array_diff': /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3418: warning: 'fci_key_cache' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3417: warning: 'fci_key' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c: In function 'php_array_intersect': /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3000: warning: 'fci_key_cache' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:2999: warning: 'fci_key' may be used uninitialized in this function error: Bad exit status from /var/tmp/rpm-tmp.71866 (%build) Bad exit status from /var/tmp/rpm-tmp.71866 (%build) RPM build errors: Child return code was: 1 Error in RHEL 6: In file included from /builddir/build/BUILD/php- 5.4.18/ext/standard/basic_functions.c:49: /builddir/build/BUILD/php-5.4.18/Zend/zend_language_parser.h:327: error: conflicting types for 'zendparse' /builddir/build/BUILD/php-5.4.18/Zend/zend_globals_macros.h:35: note: previous declaration of 'zendparse' was here /bin/sh /builddir/build/BUILD/php-5.4.18/build-ztscli/libtool --silent -- preserve-dup-deps --mode=compile /builddir/build/BUILD/php-5.4.18/build- ztscli/meta_ccld -Iext/standard/ -I/builddir/build/BUILD/php- 5.4.18/ext/standard/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.4.18/build- ztscli/include -I/builddir/build/BUILD/php-5.4.18/build-ztscli/main - I/builddir/build/BUILD/php-5.4.18 -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/date/lib -I/builddir/build/BUILD/php-5.4.18/ext/date/lib - I/builddir/build/BUILD/php-5.4.18/ext/ereg/regex -I/usr/include/libxml2 - I/usr/include/enchant -I/usr/include/freetype2 -I/usr/include/imap - I/usr/lib64/firebird/include -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/oniguruma -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/libmbfl -I/builddir/build/BUILD/php- 5.4.18/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.4.18/build- ztscli/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell - I/builddir/build/BUILD/php-5.4.18/build-ztscli/TSRM -I/builddir/build/BUILD/php- 5.4.18/build-ztscli/Zend -I/builddir/build/BUILD/php-5.4.18/main - I/builddir/build/BUILD/php-5.4.18/Zend -I/builddir/build/BUILD/php-5.4.18/TSRM - I/builddir/build/BUILD/php-5.4.18/build-ztscli/ -D_REENTRANT -I/usr/include - O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -- param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -Wno-pointer- sign -fvisibility=hidden -pthread -DZTS -c /builddir/build/BUILD/php- 5.4.18/ext/standard/dir.c -o ext/standard/dir.lo make: *** [ext/standard/basic_functions.lo] Error 1 make: *** Waiting for unfinished jobs.... /builddir/build/BUILD/php-5.4.18/ext/standard/browscap.c: In function 'zm_startup_browscap': /builddir/build/BUILD/php-5.4.18/ext/standard/browscap.c:339: warning: passing argument 3 of 'ts_allocate_id' from incompatible pointer type /builddir/build/BUILD/php-5.4.18/Zend/../TSRM/TSRM.h:111: note: expected 'ts_allocate_ctor' but argument is of type 'void (*)(struct zend_browscap_globals *, void ***)' /builddir/build/BUILD/php-5.4.18/ext/standard/array.c: In function 'php_array_intersect': /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:2999: warning: 'fci_key' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3000: warning: 'fci_key_cache' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c: In function 'php_array_diff': /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3417: warning: 'fci_key' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/standard/array.c:3418: warning: 'fci_key_cache' may be used uninitialized in this function /builddir/build/BUILD/php-5.4.18/ext/date/lib/parse_date.c: In function 'timelib_parse_from_format': /builddir/build/BUILD/php-5.4.18/ext/date/lib/parse_date.c:25028: warning: value computed is not used error: Bad exit status from /var/tmp/rpm-tmp.tCebX6 (%build) Bad exit status from /var/tmp/rpm-tmp.tCebX6 (%build) RPM build errors: Child return code was: 1Like giamteckchoon, I did not get this error with this solution on RHEL 6, but not RHEL 5. I get the following error: + rm Zend/zend_language_parser.c Zend/zend_language_parser.h Zend/zend_ini_parser.c Zend/zend_ini_parser.h + ./genfiles Zend/zend_language_parser.y:50.1-5: invalid directive: `%code' Zend/zend_language_parser.y:50.7-14: syntax error, unexpected identifier I updated the patch to the following to get around this error: $ cat SOURCES/php-5.4.18-bison.patch diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index ccbc9b1..6a9a24a 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -41,17 +41,19 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); #define YYERROR_VERBOSE #define YYSTYPE znode -#ifdef ZTS -# define YYPARSE_PARAM tsrm_ls -# define YYLEX_PARAM tsrm_ls -#endif - %} %pure_parser %expect 3 +%{ +#ifdef ZTS +# define YYPARSE_PARAM tsrm_ls +# define YYLEX_PARAM tsrm_ls +#endif +%} + %token END 0 "end of file" %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE %token T_INCLUDE "include (T_INCLUDE)" Does this change seem sane?