php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34443 Compile of exts using the bundled expat library failing if new libxml2 used
Submitted: 2005-09-09 18:22 UTC Modified: 2005-09-12 10:16 UTC
Votes:10
Avg. Score:4.2 ± 0.9
Reproduced:10 of 10 (100.0%)
Same Version:9 (90.0%)
Same OS:8 (80.0%)
From: chtekk at longitekk dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.4.0 OS: Linux (Gentoo)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chtekk at longitekk dot com
New email:
PHP Version: OS:

 

 [2005-09-09 18:22 UTC] chtekk at longitekk dot com
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....

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-12 08:48 UTC] sniper@php.net
Actually this is bogus (from our pov). This has to be fixed in libxml itself.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 17:01:32 2024 UTC