Closed julibo closed 2 months ago
@julibo 问题所在: ->withOptions(' --with-mailparse ')
改成 ->withOptions(' --enable-mailparse ')
即可。
配置文件详情看这里: https://github.com/php/pecl-mail-mailparse/blob/master/config.m4#L2C4-L2C22
使用实验分支(experiment),可以快速验证(只编译 mailparse swoole 两个扩展)
php prepare.php +mailparse +swoole --with-http-proxy=socks5h://172.23.24.221:8010
<?php
use SwooleCli\Preprocessor;
use SwooleCli\Extension;
return function (Preprocessor $p) {
$p->addExtension(
(new Extension('mailparse'))
->withHomePage('https://pecl.php.net/package/mailparse')
->withLicense('https://github.com/php/pecl-mail-mailparse/blob/v3.1.6/LICENSE', Extension::LICENSE_BSD)
->withManual('https://github.com/php/pecl-mail-mailparse.git')
->withPeclVersion('3.1.6')
->withOptions(' --enable-mailparse ')
->withDependentExtensions('mbstring')
);
};
php prepare.php +mailparse
========================================================== Extension count: 41
opcache curl iconv bz2 bcmath pcntl filter session tokenizer mbstring ctype zlib zip posix sockets pdo sqlite3 phar mysqlnd mysqli intl fileinfo pdo_mysql soap xsl gmp exif sodium openssl readline xml redis swoole yaml imagick mongodb gd mailparse xlswriter ssh2 uuid
bash ./make.sh docker-build bash ./make.sh docker-bash
bash sapi/quickstart/linux/alpine-init.sh
进入容器后需要再一次执行此命令
php prepare.php +mailparse bash ./make.sh all-library bash ./make.sh config bash ./make.sh build bash ./make.sh archive