#32150 [Opn->Csd]: PHP fails to compile with gcc 4.0.0-alpha20050213 snapshot
| From: | jorton@php.net | Date: | Fri, 22 Apr 2005 23:37:11 +0000 |
| Subject: | #32150 [Opn->Csd]: PHP fails to compile with gcc 4.0.0-alpha20050213 snapshot | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78070@lists.php.net to get a copy of this message | ||
ID: 32150
Updated by: jorton@php.net
Reported By: amd at store20 dot com
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: Gentoo GNU/Linux
PHP Version: php5-200503041530
New Comment:
This bug has been fixed in CVS.
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/.
Thank you for the report, and for helping us make PHP better.
Oh, missed this one. The my_free() problem was fixed this morning,
using exactly the fix you proposed!
Previous Comments:
------------------------------------------------------------------------
[2005-03-05 06:54:27] amd at store20 dot com
Used yesterday's CVS snapshot. One problem still existed (xmlrpc).
my_free is just a ugly wrapper to free.
http://amd.store20.com/files/2005-Q1/php5_xmlrpc_gcc4_compile_fix_bug_32150.patch
------------------------------------------------------------------------
[2005-03-04 16:42:12] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
..and if (when) it fails, provide the patche(s) against to these source
(CVS HEAD branch) and put them online somewhere where we can download
them. The patches get messed up in this bug system..
------------------------------------------------------------------------
[2005-03-01 16:49:04] amd at store20 dot com
After applying these two patches, it built fine.
------------------------------------------------------------------------
[2005-03-01 16:38:42] amd at store20 dot com
Another catch:
/bin/sh /var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/libtool --silent
--preserve-dup-deps --mode=compile gcc
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc
-DVERSION=0.50 -Iext/xmlrpc/
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/
-DPHP_ATOM_INC -I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/include
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/main
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend
-I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/imap
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/oniguruma
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/libmbfl
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/mbstring/libmbfl/mbfl
-I/usr/include/mysql -I/usr/include/pspell
-I/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/TSRM -O2
-mtune=pentium3 -prefer-pic -c
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c
-o ext/xmlrpc/libxmlrpc/xml_element.lo
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c:
In function 'xml_elem_free_non_recurse':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c:192:
error: invalid lvalue in assignment
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c:
In function 'xml_elem_entity_escape':
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c:317:
warning: pointer targets in assignment differ in signedness
/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/ext/xmlrpc/libxmlrpc/xml_element.c:332:
warning: pointer targets in assignment differ in signedness
make: *** [ext/xmlrpc/libxmlrpc/xml_element.lo] Error 1
Proposed fix:
decoder php-5.0.3 # for i in
ls -1 ext/xmlrpc/libxmlrpc/*.orig; do
diff -u $i ${i/\.orig/} ; done
--- ext/xmlrpc/libxmlrpc/simplestring.c.orig 2005-03-01
17:33:43.000000000 +0200
+++ ext/xmlrpc/libxmlrpc/simplestring.c 2005-03-01 17:33:47.000000000
+0200
@@ -85,7 +85,7 @@
#include <string.h>
#include "simplestring.h"
-#define my_free(thing) if(thing) {free(thing); thing = 0;}
+#define my_free(thing) if(thing) {free(thing); thing = NULL;}
/*----------------------**
* Begin String Functions *
--- ext/xmlrpc/libxmlrpc/xml_element.c.orig 2005-03-01
17:21:12.000000000 +0200
+++ ext/xmlrpc/libxmlrpc/xml_element.c 2005-03-01 17:35:20.000000000
+0200
@@ -189,7 +189,11 @@
Q_Destroy(&root->children);
Q_Destroy(&root->attrs);
- my_free((char*)root->name);
+// my_free((char*)root->name);
+ if (root->name) {
+ free((char *)root->name);
+ root->name = NULL;
+ }
simplestring_free(&root->text);
my_free(root);
}
------------------------------------------------------------------------
[2005-03-01 15:46:08] amd at store20 dot com
Proposed fix:
--- Zend/zend_modules.h.orig 2005-03-01 16:33:58.000000000 +0200
+++ Zend/zend_modules.h 2005-03-01 16:44:48.000000000 +0200
@@ -23,6 +23,7 @@
#define MODULES_H
#include "zend.h"
+#include "zend_compile.h"
#define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
------------------------------------------------------------------------
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
http://bugs.php.net/32150
--
Edit this bug report at http://bugs.php.net/?id=32150&edit=1