[php-src] Issue #20548: PHP-8.5.0: unable to build DOM extension

From: Date: Fri, 21 Nov 2025 07:51:07 +0000
Subject: [php-src] Issue #20548: PHP-8.5.0: unable to build DOM extension
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251267@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20548 Author: drupol ### Description Hello, I'm trying to package PHP 8.5.0 in the Nix project and I'm facing an issue while building the DOM extension: ``` > gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H -g > -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/html5_serializer.c -MMD -MF > html5_serializer.dep -MT html5_serializer.lo -fPIC -DPIC -o .libs/html5_serializer.o > /nix/store/qsydfxm1vq6q9jac2kq3r8kn0xdmsldf-bash-5.3p3/bin/bash > /build/php-8.5.0/ext/dom/libtool --tag=CC --mode=compile gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H > -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/inner_outer_html_mixin.c > -o inner_outer_html_mixin.lo -MMD -MF inner_outer_html_mixin.dep -MT inner_outer_html_mixin.lo > /nix/store/qsydfxm1vq6q9jac2kq3r8kn0xdmsldf-bash-5.3p3/bin/bash > /build/php-8.5.0/ext/dom/libtool --tag=CC --mode=compile gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H > -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/namednodemap.c -o > namednodemap.lo -MMD -MF namednodemap.dep -MT namednodemap.lo > gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H -g > -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/infra.c -MMD -MF infra.dep -MT > infra.lo -fPIC -DPIC -o .libs/infra.o > gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H -g > -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/inner_outer_html_mixin.c -MMD > -MF inner_outer_html_mixin.dep -MT inner_outer_html_mixin.lo -fPIC -DPIC -o > .libs/inner_outer_html_mixin.o > /build/php-8.5.0/ext/dom/html5_parser.c: In function > 'lexbor_libxml2_bridge_convert': > /build/php-8.5.0/ext/dom/html5_parser.c:150:55: error: 'lxb_dom_node_t' {aka > 'struct lxb_dom_node'} has no member named 'line' > 150 | lxml_element->line = sanitize_line_nr(node->line); > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:293:21: error: 'lxb_dom_node_t' {aka > 'struct lxb_dom_node'} has no member named 'line' > 293 | if (node->line >= USHRT_MAX) { > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:295:60: error: 'lxb_dom_node_t' {aka > 'struct lxb_dom_node'} has no member named 'line' > 295 | lxml_text->psvi = (void *) (ptrdiff_t) node->line; > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:297:56: error: 'lxb_dom_node_t' {aka > 'struct lxb_dom_node'} has no member named 'line' > 297 | lxml_text->line = (unsigned short) node->line; > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:324:55: error: 'lxb_dom_node_t' {aka > 'struct lxb_dom_node'} has no member named 'line' > 324 | lxml_comment->line = sanitize_line_nr(node->line); > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c: In function > 'lexbor_libxml2_bridge_report_errors': > /build/php-8.5.0/ext/dom/html5_parser.c:442:27: error: 'lxb_html_tree_error_t' > has no member named 'line' > 442 | tree_error->line + 1, > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:443:27: error: 'lxb_html_tree_error_t' > has no member named 'column' > 443 | tree_error->column + 1, > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:444:27: error: 'lxb_html_tree_error_t' > has no member named 'length' > 444 | tree_error->length > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c: In function > 'lexbor_libxml2_bridge_copy_observations': > /build/php-8.5.0/ext/dom/html5_parser.c:464:47: error: 'lxb_html_tree_t' {aka > 'struct lxb_html_tree'} has no member named 'has_explicit_html_tag' > 464 | observations->has_explicit_html_tag = tree->has_explicit_html_tag; > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:465:47: error: 'lxb_html_tree_t' {aka > 'struct lxb_html_tree'} has no member named 'has_explicit_head_tag' > 465 | observations->has_explicit_head_tag = tree->has_explicit_head_tag; > | ^~ > /build/php-8.5.0/ext/dom/html5_parser.c:466:47: error: 'lxb_html_tree_t' {aka > 'struct lxb_html_tree'} has no member named 'has_explicit_body_tag' > 466 | observations->has_explicit_body_tag = tree->has_explicit_body_tag; > | ^~ > make: *** [Makefile:253: html5_parser.lo] Error 1 > make: *** Waiting for unfinished jobs.... > gcc -I. -I/build/php-8.5.0/ext/dom > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/main > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/TSRM > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/Zend > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext > -I/nix/store/7l7sa06bs30zkf840x2hbmkwqv928kxc-php-8.5.0-dev/include/php/ext/date/lib > -I/nix/store/xhgf4ypbd96dj6ppn6v2jzkb3096k8vl-libxml2-2.15.1-dev/include/libxml2 -DHAVE_CONFIG_H -g > -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /build/php-8.5.0/ext/dom/namednodemap.c -MMD -MF > namednodemap.dep -MT namednodemap.lo -fPIC -DPIC -o .libs/namednodemap.o For full logs, run: nix log /nix/store/0qkqwpjj6chbak0ybcb9sfq21vrgxx23-php-dom-8.5.0.drv ``` Do you have an idea what it could be ? The lexbor PHP extension and [library](https://github.com/lexbor/lexbor) is set as dependency of the DOM extension. ### PHP Version ```plain PHP 8.5.0 ``` ### Operating System NixOS

« previous php.bugs (#251267) next »