从源代码编译 PHP7.4 时如何获取 DOMDocument?

how to get DOMDocument when compiling PHP7.4 from source?

从源代码编译 php7.4 时如何获取 DOMDocument?我在亚马逊上 Linux 2 并像这样编译 php7.4:

yum install autoconf bison re2c libxml2 gcc && \
rm -rf php-src && \
git clone -b 'PHP-7.4' --depth 1 https://github.com/php/php-src.git && \
cd 'php-src' && \
./buildconf && \
./configure --disable-all --disable-cgi --enable-cli --with-curl --with-libxml && \
make clean && \
make -j $(nproc) && \
rm -rfv ../php && \
cp -v ./sapi/cli/php ../php

令我惊讶的是,生成的 php-cli 二进制文件没有可用的 DOMDocument:

[root@ip-192-168-84-98 php]# ./php test.php 

Fatal error: Uncaught Error: Class 'DOMDocument' not found in /hans_temp/php/test.php:558
Stack trace:
#0 /hans_temp/php/test.php(573): get_gps_coordiates_from_finn_id('237587045')
#1 {main}
  thrown in /hans_temp/php/test.php on line 558

我认为 --with-libxml 应该添加 DOMDocument,但这里没有...我可以推断标志 --disable-all--with-libxml 之间存在错误 -或者 - 我缺少 DOMDocument 支持的东西,帮忙? (首先,--with-curl 效果很好,添加了 curl_* api)

config.log:https://termbin.com/18i8(太大而无法在 whosebug.com 上内联)

使用 --disable-all 编译时,您需要 --with-libxml --enable-dom 才能使 DOMDocument 可用。

./configure --disable-all --enable-cli --with-libxml --enable-dom