Ticket #101 (closed defect: fixed)

Opened 2 years ago

Last modified 5 months ago

eA r212 'make' fails on php with ZTS + php 5.2 @ 'bailout' ...

Reported by: openmacnews Assigned to: somebody
Priority: critical Milestone: 0.9.5
Component: eAccelerator Version: 0.9.5
Keywords: zts compile error Cc:

Description

building eA svn r211 w/:

	OSX 10.4.6
	php 5.2-cvs

eA's configure completes without apparent error, but 'make' fails @:


/bin/sh /usr/ports/eaccelerator-svn/libtool --mode=compile gcc  -I. -I/usr/ports/eaccelerator-svn -DPHP_ATOM_INC -I/usr/ports/eaccelerator-svn/include -I/usr/ports/eaccelerator-svn/main -I/usr/ports/eaccelerator-svn -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext  -DHAVE_CONFIG_H  -g -O2   -c /usr/ports/eaccelerator-svn/eaccelerator.c -o eaccelerator.lo 
 gcc -I. -I/usr/ports/eaccelerator-svn -DPHP_ATOM_INC -I/usr/ports/eaccelerator-svn/include -I/usr/ports/eaccelerator-svn/main -I/usr/ports/eaccelerator-svn -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -DHAVE_CONFIG_H -g -O2 -c /usr/ports/eaccelerator-svn/eaccelerator.c  -fno-common -DPIC -o .libs/eaccelerator.o
/usr/ports/eaccelerator-svn/eaccelerator.c: In function 'eaccelerator_compile_file':
/usr/ports/eaccelerator-svn/eaccelerator.c:1393: error: incompatible types in assignment
/usr/ports/eaccelerator-svn/eaccelerator.c:1437: error: incompatible types in assignment
make: *** [eaccelerator.lo] Error 1


and, checking in 'eaccelerator.c':

	1344	int bailout;
	...
		#endif
	1393	  bailout = 1;
		} zend_end_try();
	...
		CG(class_table)		= orig_class_table;
	1437	bailout				= 1;
		} zend_end_try();


richard

Change History

06/05/06 09:39:39 changed by ihanick@gmail.com

  • keywords set to zts compile error.
  • summary changed from eA r211 'make' fails on OSX 10.4.6 + php 5.2 @ 'bailout' ... to eA r212 'make' fails on php with ZTS + php 5.2 @ 'bailout' ....

It's a multithread (ZTS) php problem The fix is trivial:

Index: eaccelerator.c
===================================================================
--- eaccelerator.c      (revision 212)
+++ eaccelerator.c      (working copy)
@@ -1341,7 +1341,7 @@
     HashTable tmp_class_table;
     zend_function tmp_func;
     zend_class_entry tmp_class;
-    int bailout;
+    int l_bailout;

     DBG(ea_debug_printf, (EA_DEBUG, "\t[%d] compile_file: marking\n", getpid()));
     if (CG(class_table) != EG(class_table)) {
@@ -1381,7 +1381,7 @@
       EAG(compiler) = 1;
     }

-    bailout = 0;
+    l_bailout = 0;
     zend_try {
       t = mm_saved_zend_compile_file(file_handle, type TSRMLS_CC);
     } zend_catch {
@@ -1390,9 +1390,9 @@
 #ifdef ZEND_ENGINE_2
       EG(class_table) = orig_eg_class_table;
 #endif
-      bailout = 1;
+      l_bailout = 1;
     } zend_end_try();
-    if (bailout) {
+    if (l_bailout) {
       zend_bailout();
     }
     DBG(ea_debug_log_hashkeys, ("class_table\n", CG(class_table)));
@@ -1434,9 +1434,9 @@
         } zend_catch {
             CG(function_table) = orig_function_table;
             CG(class_table)            = orig_class_table;
-            bailout                            = 1;
+            l_bailout                          = 1;
         } zend_end_try();
-        if (bailout) {
+        if (l_bailout) {
           zend_bailout ();
         }
         CG(in_compilation) = old_in_compilation;

06/05/06 18:54:54 changed by openmacnews

altho i'm not sure *what* the issue is (is 'bailout' a protected name?), that seems to do the trick!

i'll leave this open if/until it gets integrated into src tree ...

thx!

richard

06/06/06 13:02:22 changed by hans

  • status changed from new to closed.
  • resolution set to fixed.

Fix has been committed. Thanks a lot for your input!

12/06/07 23:15:34 changed by mrbig

THanks alot! David DeAngelo