# php53 build error



## flo1 (Jul 6, 2014)

Hello!
If Apache was built as apache22-worker-mpm, then php53 error

```
--- Zend/zend_highlight.lo ---
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_highlight.c: In function 'zend_html_puts':
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_highlight.c:66:3: warning: passing argument 1 of '((struct zend_php_scan ner_globals *)*(*tsrm_ls + ((sizetype)(long unsigned int)language_scanner_globals_id + -1u) * 8u))->output_filter' from  incompatible pointer type [enabled by default]
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_highlight.c:66:3: note: expected 'unsigned char **' but argument is of t ype 'char **'
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_highlight.c:66:3: warning: passing argument 2 of '((struct zend_php_scan ner_globals *)*(*tsrm_ls + ((sizetype)(long unsigned int)language_scanner_globals_id + -1u) * 8u))->output_filter' from  incompatible pointer type [enabled by default]
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_highlight.c:66:3: note: expected 'size_t *' but argument is of type 'int  *'
*** [Zend/zend_highlight.lo] Error code 1

make[2]: stopped in /usr/ports/lang/php53/work/php-5.3.28
--- Zend/zend_indent.lo ---
In file included from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_globals.h:28:0,
                 from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_compile.h:342,
                 from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_indent.c:27:
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_globals_macros.h:35:5: error: conflicting types for 'zendparse'
In file included from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_indent.c:26:0:
Zend/zend_language_parser.h:317:5: note: previous declaration of 'zendparse' was here
*** [Zend/zend_indent.lo] Error code 1

make[2]: stopped in /usr/ports/lang/php53/work/php-5.3.28
--- ext/standard/basic_functions.lo ---
In file included from /usr/ports/lang/php53/work/php-5.3.28/ext/standard/basic_functions.c:49:0:
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_language_parser.h:317:5: error: conflicting types for 'zendparse'
In file included from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_globals.h:28:0,
                 from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_compile.h:342,
                 from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_modules.h:26,
                 from /usr/ports/lang/php53/work/php-5.3.28/Zend/zend_API.h:26,
                 from /usr/ports/lang/php53/work/php-5.3.28/main/php.h:38,
                 from /usr/ports/lang/php53/work/php-5.3.28/ext/standard/basic_functions.c:22:
/usr/ports/lang/php53/work/php-5.3.28/Zend/zend_globals_macros.h:35:5: note: previous declaration of 'zendparse' was her e
*** [ext/standard/basic_functions.lo] Error code 1

make[2]: stopped in /usr/ports/lang/php53/work/php-5.3.28
--- Zend/zend_language_scanner.lo ---
*** [Zend/zend_language_scanner.lo] Error code 1

make[2]: stopped in /usr/ports/lang/php53/work/php-5.3.28
4 errors

make[2]: stopped in /usr/ports/lang/php53/work/php-5.3.28
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/php53
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/php53
```

bison patches fix this

```
--- ./Zend/acinclude.m4 2013-03-20 15:09:27.000000000 +0100
+++ ./Zend/acinclude.m4.new     2013-03-25 21:35:27.654016588 +0100
@@ -17,12 +17,7 @@
       if test -n "$bison_version_vars"; then
         set $bison_version_vars
         bison_version="${1}.${2}"
-        for bison_check_version in $bison_version_list; do
-          if test "$bison_version" = "$bison_check_version"; then
-            php_cv_bison_version="$bison_check_version (ok)"
-            break
-          fi
-        done
+        php_cv_bison_version="$bison_version (ok)"
       fi
     ])
   fi
```


```
--- Zend/zend_language_parser.y.orig    2013-12-14 12:25:43.528989017 +0100
+++ Zend/zend_language_parser.y 2013-12-14 12:26:30.088988957 +0100
@@ -38,10 +38,6 @@

 #define YYERROR_VERBOSE
 #define YYSTYPE znode
-#ifdef ZTS
-# define YYPARSE_PARAM tsrm_ls
-# define YYLEX_PARAM tsrm_ls
-#endif


 %}
@@ -49,6 +45,13 @@
 %pure_parser
 %expect 2

+%code requires {
+#ifdef ZTS
+# define YYPARSE_PARAM tsrm_ls
+# define YYLEX_PARAM tsrm_ls
+#endif
+}
+
 %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
 %left ','
 %left T_LOGICAL_OR
```

10.0-STABLE FreeBSD amd64


----------

