php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76886 Can't build xmlrpc with expat
Submitted: 2018-09-15 11:05 UTC Modified: 2018-09-15 11:05 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: Compile Failure
PHP Version: master-Git-2018-09-15 (Git) OS: *
Private report: No CVE-ID: None
 [2018-09-15 11:05 UTC] cmb@php.net
Description:
------------
Originally reported by Thomas Petazzoni via <https://github.com/php/php-src/pull/3212>:

When expat support is disabled and libxml support is enabled, the
following part of the code in expat_compat.h gets used:

and therefore "php".h" is included. However, when libexpat support is
enabled, HAVE_LIBEXPAT is defined, and therefore the following part of
the code is used:

In this case, "php.h" is not included. Due to this, zend_alloc.h is
never included when building the ext/xmlrpc/libxmlrpc/xml_element.c
file, and therefore the estrdup -> _estrdup macros are never defined,
causing the following link time failure:

ext/xmlrpc/libxmlrpc/xml_element.o: In function xml_element_serialize': /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:462: undefined reference toefree'
ext/xmlrpc/libxmlrpc/xml_element.o: In function xml_elem_entity_escape': /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:347: undefined reference toemalloc'
ext/xmlrpc/libxmlrpc/xml_element.o: In function _xmlrpc_charHandler': /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:646: undefined reference toefree'
ext/xmlrpc/libxmlrpc/xml_element.o: In function xml_elem_free_non_recurse': /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:198: undefined reference toefree'
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:199: undefined reference to efree' /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:200: undefined reference toefree'
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:207: undefined reference to efree' ext/xmlrpc/libxmlrpc/xml_element.o: In functionxml_elem_new':
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:263: undefined reference to ecalloc' ext/xmlrpc/libxmlrpc/xml_element.o: In function_xmlrpc_startElement':
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:602: undefined reference to estrdup' /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:607: undefined reference toemalloc'
/home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:609: undefined reference to estrdup' /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:610: undefined reference toestrdup'
ext/xmlrpc/libxmlrpc/xml_element.o: In function xml_elem_free_non_recurse': /home/thomas/projets/php/ext/xmlrpc/libxmlrpc/xml_element.c:211: undefined reference toefree'
collect2: error: ld returned 1 exit status
make: *** [Makefile:248: sapi/cgi/php-cgi] Error 1

This link time failure can be produced with:

./configure --prefix=/usr --with-libdir=/usr/lib64 --disable-all 
--without-pear --with-config-file-path=/etc --disable-phpdbg 
--disable-cli --enable-cgi --disable-fpm --enable-xmlreader 
--enable-xmlwriter --enable-libxml --enable-wddx --with-xmlrpc 
--with-libexpat-dir=/



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-15 11:05 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2018-09-15 11:05 UTC] cmb@php.net
Indeed, PHP-7.2+ appears to affected.
 [2018-09-15 11:27 UTC] cmb@php.net
Automatic comment on behalf of thomas.petazzoni@bootlin.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3691b6d245db6f69b5844ed86fa623d587d8d626
Log: Fix #76886: Can't build xmlrpc with expat
 [2018-09-15 11:27 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC