Edit report at https://bugs.php.net/bug.php?id=65460&edit=1

 ID:                 65460
 Comment by:         ben dot harper at rackspace dot com
 Reported by:        stu at coe dot uky dot edu
 Summary:            PHP 5.4.18 fails to compile with Apache 2.4.6
 Status:             Assigned
 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:

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?


Previous Comments:
------------------------------------------------------------------------
[2013-08-19 17:46:04] s...@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] r...@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] m...@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.

------------------------------------------------------------------------
[2013-08-19 07:10:26] s...@php.net

Mike, so which options should I use to reproduce it? Because I used with-apxs2 
and it worked fine. Should apache be built with some special options? IIRC, it 
usually does not build ZTS version, so what is the config for you that doesn't 
work?

------------------------------------------------------------------------


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

Reply via email to