Closed phper-hui closed 8 months ago
最初想要加的扩展截图补充(扩展就是常用扩展+event扩展)
系统截图补充
报错的是 libxml2 ,查看 libxml2 编译日志,日志所在目录: /home/root/custom_complie_php/source/libxml2/build
你试一下 cmake --version
,看看是不是 CMake 版本过旧了,因为我看你上面的报错信息中包含了:
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.18 or higher is required. You are running version 3.16.3
似乎就是因为 CMake 版本过旧导致的,我看了下我自己的 Ubuntu 和 Debian 服务器,发现 Ubuntu 18/20 的源安装的都是旧版本。只能手动升级了。另外我也后面加一个检测 CMake 版本的 doctor 项吧。
我用bin/spc-alpine-docker build --build-cli "apcu,bcmath,calendar,ctype,curl,dba,dom,event,exif,fileinfo,filter,gd,iconv,intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib" --debug -I "memory_limit=512M"编译依旧报错如下:
[01:32:56] [DEBU] Running command with direct output: cd '/app/source/libxml2/build' && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/app/buildroot -DCMAKE_INSTALL_LIBDIR=/app/buildroot/lib -DCMAKE_TOOLCHAIN_FILE=/app/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF -DIconv_IS_BUILT_IN=OFF -DLIBXML2_WITH_ICONV=ON -DLIBXML2_WITH_ZLIB=ON -DZLIB_LIBRARY=/app/buildroot/lib/libz.a -DZLIB_INCLUDE_DIR=/app/buildroot/include -DLIBXML2_WITH_ICU=ON -DLIBXML2_WITH_LZMA=OFF -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_PROGRAMS=OFF -DLIBXML2_WITH_TESTS=OFF .. Error relocating /usr/bin/cmake: SSL_get0_group_name: symbol not found
[01:32:56] [ERRO] #0 /app/src/SPC/util/UnixShell.php(47): f_passthru()
版本如下: @.***:/home/root/git/static-php-cli# cmake --version cmake version 3.10.2
&肀爱★ @.***
------------------ 原始邮件 ------------------ 发件人: "crazywhalecc/static-php-cli" @.>; 发送时间: 2024年3月25日(星期一) 下午4:05 @.>; @.**@.>; 主题: Re: [crazywhalecc/static-php-cli] CLI 编译命令生成器,在Ubuntu-20.04.1-x64系统,编译php8.2静态文件添加pgsql编译报错bug (Issue #396)
你试一下 cmake --version,看看是不是 CMake 版本过旧了,因为我看你上面的报错信息中包含了:
CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.18 or higher is required. You are running version 3.16.3
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
我试试用高版本
&肀爱★ @.***
------------------ 原始邮件 ------------------ 发件人: "crazywhalecc/static-php-cli" @.>; 发送时间: 2024年3月25日(星期一) 下午4:22 @.>; @.**@.>; 主题: Re: [crazywhalecc/static-php-cli] CLI 编译命令生成器,在Ubuntu-20.04.1-x64系统,编译php8.2静态文件添加pgsql编译报错bug (Issue #396)
似乎就是因为 CMake 版本过旧导致的,我看了下我自己的 Ubuntu 和 Debian 服务器,发现 Ubuntu 18/20 的源安装的都是旧版本。只能手动升级了。另外我也后面加一个检测 CMake 版本的 doctor 项吧。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
最好不要把密码放在 Issue 里。另外,我本地也有环境,我后面放假回来就看看。
背景:通过简单几步构建https://www.workerman.net/a/1605编译php8.2静态文件
起初是想构建的扩展如下: 重新编译这么多扩展时间较长,顾省略这里的报错
然后编译失败,尝试只编译一个扩展pgsql的报错如下 如下: 【编译到最后一步时候:】 使用CLI 编译命令生成器(https://static-php.dev/zh/guide/cli-generator.html) 在Ubuntu-20.04.1-x64系统 编译php8.2静态文件添加pgsql编译报错bug 报错如下: CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.18 or higher is required. You are running version 3.16.3
-- Configuring incomplete, errors occurred!
[22:47:56] [ERRO] #0 phar:///home/root/custom_complie_php/spc/src/SPC/util/UnixShell.php(47): f_passthru('cd '/home/root/...')
1 phar:///home/root/custom_complie_php/spc/src/SPC/builder/linux/library/libxml2.php(27): SPC\util\UnixShell->exec('cd '/home/root/...')
2 phar:///home/root/custom_complie_php/spc/src/SPC/builder/LibraryBase.php(144): SPC\builder\linux\library\libxml2->build()
3 phar:///home/root/custom_complie_php/spc/src/SPC/builder/LibraryBase.php(152): SPC\builder\LibraryBase->tryBuild(true)
4 phar:///home/root/custom_complie_php/spc/src/SPC/builder/unix/UnixBuilderBase.php(143): SPC\builder\LibraryBase->tryBuild(false)
5 phar:///home/root/custom_complie_php/spc/src/SPC/command/BuildCliCommand.php(143): SPC\builder\unix\UnixBuilderBase->buildLibs(Array)
6 phar:///home/root/custom_complie_php/spc/src/SPC/command/BaseCommand.php(99): SPC\command\BuildCliCommand->handle()
7 phar:///home/root/custom_complie_php/spc/vendor/symfony/console/Command/Command.php(326): SPC\command\BaseCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
8 phar:///home/root/custom_complie_php/spc/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
9 phar:///home/root/custom_complie_php/spc/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(SPC\command\BuildCliCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
10 phar:///home/root/custom_complie_php/spc/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
11 phar:///home/root/custom_complie_php/spc/bin/spc(20): Symfony\Component\Console\Application->run()
12 /home/root/custom_complie_php/spc(8): require('phar:///home/ro...')
13 {main}