crazywhalecc / static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.
https://static-php.dev
MIT License
1.24k stars 214 forks source link

macOS does not support mongodb extension #281

Closed tanhongbin-php closed 3 months ago

tanhongbin-php commented 9 months ago

checking PHP version... [08:57:07] [ERRO] Uncaught SPC\exception\RuntimeException: Command run failed with code[1]: cd '/app/source/php-src' && ./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg --enable-cli --disable-fpm --disable-embed --disable-micro --enable-apcu --enable-bcmath --enable-calendar --enable-ctype --with-curl --enable-dba --enable-dom --with-libxml="/app/buildroot" --enable-exif --enable-filter --enable-fileinfo --with-zlib --with-zlib-dir="/app/buildroot" --enable-gd --with-iconv="/app/buildroot" --enable-intl --enable-mbstring --enable-mysqlnd --with-mysqli --with-openssl=/app/buildroot --with-openssl-dir=/app/buildroot --enable-opcache --enable-pcntl --enable-pdo --with-pdo-mysql --with-sqlite3="/app/buildroot" --with-pdo-sqlite --with-pgsql="/app/buildroot" --with-pdo-pgsql="/app/buildroot" --enable-phar --enable-posix --with-readline="/app/buildroot" --enable-session --enable-redis --enable-redis-session --enable-simplexml --with-libxml="/app/buildroot" --enable-sockets --with-sodium --enable-tokenizer --enable-xml --with-libxml="/app/buildroot" --enable-xmlreader --with-libxml="/app/buildroot" --enable-xmlwriter --with-libxml="/app/buildroot" --with-xsl="/app/buildroot" --with-zip="/app/buildroot" --with-xlswriter --enable-reader --enable-shmop --enable-mongodb --with-mongodb-system-libs=no --with-mongodb-client-side-encryption=no --with-mongodb-sasl=no --with-mongodb-ssl=openssl --with-mongodb-icu=yes --with-mongodb-zstd=no --with-mongodb-zlib=yes --with-event-core --with-event-extra --with-event-libevent-dir=/app/buildroot --with-event-openssl=/app/buildroot --enable-event-sockets CFLAGS='' LIBS='-ldl -lpthread' at /app/src/globals/functions.php(89) [08:57:07] [ERRO] #0 /app/src/SPC/util/UnixShell.php(44): f_passthru()

1 /app/src/SPC/builder/linux/LinuxBuilder.php(174): SPC\util\UnixShell->exec()

2 /app/src/SPC/command/BuildCliCommand.php(96): SPC\builder\linux\LinuxBuilder->buildPHP()

3 /app/src/SPC/command/BaseCommand.php(83): SPC\command\BuildCliCommand->handle()

4 /app/vendor/symfony/console/Command/Command.php(326): SPC\command\BaseCommand->execute()

5 /app/vendor/symfony/console/Application.php(1063): Symfony\Component\Console\Command\Command->run()

6 /app/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand()

7 /app/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun()

8 /app/bin/spc(15): Symfony\Component\Console\Application->run()

9 {main}

Error: Process completed with exit code 1. 只要带有这个扩展就会报错 php8.1

crazywhalecc commented 9 months ago

最近我会更新一次,在 Linux 可以支持 mongodb,但 macOS 因为一些比较复杂的问题暂无法解决。

crazywhalecc commented 3 months ago

mongodb 1.19.1 now supports static build on macOS.

bisht2050 commented 3 months ago

@crazywhalecc It would also be good to update/remove https://static-php.dev/en/guide/extension-notes.html#mongodb

crazywhalecc commented 3 months ago

@bisht2050 Good catch. I will remove it later.