From: chtekk at longitekk dot com Operating system: Linux (Gentoo) PHP version: 4.4.0 PHP Bug Type: Compile Failure Bug description: Compile of exts using the bundled expat library failing if new libxml2 used
Description: ------------ Hi. We've just got some bug reports over at Gentoo that I was also able to reproduce (http://bugs.gentoo.org/show_bug.cgi?id=105268). The problem is obvious by the error messages, 'XML_FEATURE_UNICODE' gets declared two times, one time by libxml2 version 2.6.21, and one time by the bundled expat library. Now this happens only if you enable any extension that uses the bundled expat library (wddx, xml, xmlrpc) AND the DOM XML extension. In that case the external libxml2 gets included also and, since it defines 'XML_FEATURE_UNICODE' too it clashes with the 'XML_FEATURE_UNICODE' definition the bundled expat library has. libxml2 2.6.19 works since it does not define 'XML_FEATURE_UNICODE' at all, but 2.6.21 does define it ( /usr/include/libxml2/libxml/parser.h:1196: XML_FEATURE_UNICODE = 21, ), and thus the compile crashes. Now I'm not sure how the bundled expat library can be fixed so that this error goes away, I hope someone knows. :) Reproduce code: --------------- a) install libxml2 2.6.21 b) install PHP with --with-dom --enable-wddx c) see the bug :) Expected result: ---------------- PHP should compile with the new libxml2 version, and support for both DOM XML and the bundled expat-based library extensions. Actual result: -------------- In file included from /var/tmp/portage/mod_php-4.4.0-r1/work/php-4.4.0/ext/wddx/php_wddx.h:26, from main/internal_functions.c:65: /var/tmp/portage/mod_php-4.4.0-r1/work/php-4.4.0/ext/xml/expat/expat.h:894: error: conflicting types for 'XML_FEATURE_UNICODE' /usr/include/libxml2/libxml/parser.h:1196: error: previous definition of 'XML_FEATURE_UNICODE' was here make: *** [main/internal_functions.lo] Error 1 make: *** Waiting for unfinished jobs.... -- Edit bug report at http://bugs.php.net/?id=34443&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34443&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34443&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34443&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34443&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34443&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34443&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34443&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34443&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34443&r=support Expected behavior: http://bugs.php.net/fix.php?id=34443&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34443&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34443&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34443&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34443&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34443&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34443&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34443&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34443&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34443&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34443&r=mysqlcfg