Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building 8.2 cli and fpm #526

Closed
DimitriyB opened this issue Aug 29, 2024 · 2 comments
Closed

Error building 8.2 cli and fpm #526

DimitriyB opened this issue Aug 29, 2024 · 2 comments
Labels
bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI

Comments

@DimitriyB
Copy link
Contributor

DimitriyB commented Aug 29, 2024

Hello everyone. I am getting strange error on the start of the build process. my steps are:
0. Ubuntu server 22.04 LTS (updated)

  1. curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
  2. chmod +x ./spc
  3. mkdir ./bin
  4. mv ./spc ./bin
  5. ./bin/spc doctor --auto-fix
  6. ./bin/spc download --with-php=8.2 --for-extensions "amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,event,exif,fileinfo,filter,ftp,gd,gettext,gmp,iconv,igbinary,imagick,imap,inotify,intl,ldap,libxml,mbregex,mbstring,memcache,mongodb,mysqli,mysqlnd,opcache,openssl,parallel,password-argon2,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_sqlsrv,pgsql,phar,posix,protobuf,rar,readline,redis,session,shmop,simdjson,simplexml,snappy,soap,sockets,sodium,sqlite3,sqlsrv,ssh2,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,uuid,uv,xhprof,xlswriter,xml,xmlreader,xmlwriter,xsl,yac,yaml,zip,zlib,zstd" --prefer-pre-built
  7. ./bin/spc build --build-cli --build-fpm "amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,event,exif,fileinfo,filter,ftp,gd,gettext,gmp,iconv,igbinary,imagick,imap,inotify,intl,ldap,libxml,mbregex,mbstring,memcache,mongodb,mysqli,mysqlnd,opcache,openssl,parallel,password-argon2,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pdo_sqlsrv,pgsql,phar,posix,protobuf,rar,readline,redis,session,shmop,simdjson,simplexml,snappy,soap,sockets,sodium,spx,sqlite3,sqlsrv,ssh2,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,uuid,uv,xhprof,xlswriter,xml,xmlreader,xmlwriter,xsl,yac,yaml,zip,zlib,zstd" --debug

And i am getting this error:

[21:20:26] [DEBU] Extracting source [micro] to /home/dmitriy/om-php/source/php-src/sapi/micro ...
[21:20:26] [INFO] extracting micro source to /home/dmitriy/om-php/source/php-src/sapi/micro ...
[21:20:26] [DEBU] [PASSTHRU] cp -r "/home/dmitriy/om-php/downloads/micro" "/home/dmitriy/om-php/source/php-src/sapi/micro"
[21:20:26] [INFO] Patching micro with sapi/micro/patches/static_opcache_81.patch
[21:20:26] [DEBU] [PASSTHRU] cd /home/dmitriy/om-php/source/php-src && cat sapi/micro/patches/static_opcache_81.patch | patch -p1
patching file build/order_by_dep.awk
patching file ext/opcache/ZendAccelerator.c
Hunk #1 succeeded at 93 (offset 2 lines).
Hunk #2 succeeded at 4795 (offset -16 lines).
patching file ext/opcache/config.m4
Hunk #2 FAILED at 328.
1 out of 2 hunks FAILED -- saving rejects to file ext/opcache/config.m4.rej
patching file ext/opcache/config.w32
patching file main/main.c
Hunk #1 succeeded at 2048 with fuzz 2 (offset 37 lines).
Hunk #2 succeeded at 2305 (offset 40 lines).
patching file win32/build/confutils.js
Hunk #1 succeeded at 1534 (offset -1 lines).
[21:20:26] [NOTI] Running dangerous command: rm -rf /home/dmitriy/om-php/source/php-src/sapi/micro
[21:20:26] [ERRO] Uncaught SPC\exception\FileSystemException: Cannot extract source micro: Command run failed with code[1]: cd /home/dmitriy/om-php/source/php-src && cat sapi/micro/patches/static_opcache_81.patch | patch -p1 at phar:///home/dmitriy/om-php/bin/spc/src/SPC/store/FileSystem.php(205)
[21:20:26] [ERRO] #0 phar:///home/dmitriy/om-php/bin/spc/src/SPC/store/SourceManager.php(65): SPC\store\FileSystem::extractSource('micro', '/home/dmitriy/o...', '/home/dmitriy/o...')
#1 phar:///home/dmitriy/om-php/bin/spc/src/SPC/builder/BuilderBase.php(174): SPC\store\SourceManager::initSource(Array)
#2 phar:///home/dmitriy/om-php/bin/spc/src/SPC/command/BuildCliCommand.php(147): SPC\builder\BuilderBase->proveExts(Array)
#3 phar:///home/dmitriy/om-php/bin/spc/src/SPC/command/BaseCommand.php(101): SPC\command\BuildCliCommand->handle()
#4 phar:///home/dmitriy/om-php/bin/spc/vendor/symfony/console/Command/Command.php(326): SPC\command\BaseCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 phar:///home/dmitriy/om-php/bin/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))
#6 phar:///home/dmitriy/om-php/bin/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))
#7 phar:///home/dmitriy/om-php/bin/spc/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 phar:///home/dmitriy/om-php/bin/spc/bin/spc(20): Symfony\Component\Console\Application->run()
#9 /home/dmitriy/om-php/bin/spc(8): require('phar:///home/dm...')
#10 {main}

What i am doing wrong? because 3 month before this worked perfectly.

@crazywhalecc crazywhalecc added bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI labels Sep 2, 2024
@mpociot
Copy link
Contributor

mpociot commented Sep 2, 2024

This is a duplicate of #527 and is also related to the outdated phpmicro patch file for ext-opcache

@crazywhalecc
Copy link
Owner

This issue has been fixed via #536 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind/php-and-sapi Issues related to php source and SAPI
Projects
None yet
Development

No branches or pull requests

3 participants