Bug #65460 [Asn->Csd]: PHP 5.4.18 fails to compile with Apache 2.4.6
| From: | stas@php.net | Date: | Mon, 19 Aug 2013 20:15:38 +0000 |
| Subject: | Bug #65460 [Asn->Csd]: PHP 5.4.18 fails to compile with Apache 2.4.6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181012@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65460&edit=1
ID: 65460
Updated by: stas@php.net
Reported by: stu at coe dot uky dot edu
Summary: PHP 5.4.18 fails to compile with Apache 2.4.6
-Status: Assigned
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Slackware64 14.0
PHP Version: 5.4.18
Assigned To: stas
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2013-08-19 18:34:44] ben dot harper at rackspace dot com
Like 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?
------------------------------------------------------------------------
[2013-08-19 17:46:04] stas@php.net
OK, looks like the patch for bug #64503 should be applied to 5.4 too for it to
work with bison 2.7.
------------------------------------------------------------------------
[2013-08-19 13:48:16] stu at coe dot uky dot edu
Applying the patch (at https://bugs.php.net/patch-display.php?bug_id=64503&patch=bison_build_2.patch&revision=latest)
and doing the other steps:
rm Zend/zend_{language,ini}_parser.[ch]
./genfiles
fixed the problem.
FYI Slackware 14.0 ships with bison (GNU Bison) 2.5.1
Thanks to all!
------------------------------------------------------------------------
[2013-08-19 12:05:32] remi@php.net
I think this is the same issue than #64503, caused by the switch from Bison 2.3 to 2.7, used to
generate the parser.
Notice : the fix for this issue have only been applied in 5.5 tree.
------------------------------------------------------------------------
[2013-08-19 07:37:04] mike@php.net
Sorry for not being explicit enough!
I can reproduce with
$ ./configure --enable-maintainer-zts --disable-all --prefix=$(pwd)/usr
so, enabling ZTS should cause the issue.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=65460
--
Edit this bug report at https://bugs.php.net/bug.php?id=65460&edit=1