`pie upgrade` fails for a dev branch and loses build options after retrying
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Reproduce the three pie upgrade cases from the issue, then inspect src/ComposerIntegration/PiePackageInstaller.php and AddInstalledJsonMetadata::addPieMetadata() around Composer's package update flow. Verify how the default-branch alias is selected and how metadata is written after reinstalling. Done means a noninteractive upgrade succeeds, configure options and PIE metadata survive, an unchanged upgrade does nothing, and uninstall removes the extension file.
索引モデルが issue の本文から書いたものです。
説明
What are you trying to do?
Install an extension from its default Git branch with pie install vendor/package:dev-main, then use pie upgrade to pick up new commits on that branch.
What platform, and PIE version are you using?
PIE 1.5.0 (release phar) with PHP 8.4.26 NTS on Debian 13, using the php:8.4-cli Docker image at digest sha256:c4723acd1cacb5df50df3b4866730f4bcccde1b5c0948ab49ae615fb7c6c9a01. I see the same thing on Ubuntu 24.04 with Ondřej's PHP 8.4 packages.
pie show -v (after the first install)
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Tip: to include extensions in this list that PIE does not manage, use the --all flag.
Loaded PIE extensions:
Reading composer.json of asgrim/example-pie-extension (1.0.1)
Reading composer.json of asgrim/example-pie-extension (1.0.1-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.1)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.2)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.4)
Reading composer.json of asgrim/example-pie-extension (1.1.0-beta.1)
Reading composer.json of asgrim/example-pie-extension (2.0.0)
Reading composer.json of asgrim/example-pie-extension (2.0.1)
Reading composer.json of asgrim/example-pie-extension (2.0.10)
Reading composer.json of asgrim/example-pie-extension (2.0.2)
Reading composer.json of asgrim/example-pie-extension (2.0.3)
Reading composer.json of asgrim/example-pie-extension (2.0.4)
Reading composer.json of asgrim/example-pie-extension (2.0.5)
Reading composer.json of asgrim/example-pie-extension (2.0.7)
Reading composer.json of asgrim/example-pie-extension (2.0.8)
Reading composer.json of asgrim/example-pie-extension (2.0.9)
Reading composer.json of asgrim/example-pie-extension (main)
example_pie_extension:2.0.5 (from 🥧 asgrim/example-pie-extension:9999999-dev ✅), upgradable to dev-main (within dev-main), latest version is 2.0.10
example_pie_extension:2.0.5 (from 🥧 asgrim/example-pie-extension:dev-main ✅), latest version is 2.0.10
Steps to reproduce the issue
This uses a local clone of asgrim/example-pie-extension with two fixed commits as inputs. main starts at 963c8d7, then moves to f4aa08c to stand in for a new commit on the branch.
docker run --rm -it --memory=2g --memory-swap=2g --cpus=2 --pids-limit=512 \
php:8.4-cli@sha256:c4723acd1cacb5df50df3b4866730f4bcccde1b5c0948ab49ae615fb7c6c9a01 bash
apt-get update && apt-get install -y git unzip libtool $PHPIZE_DEPS
curl -fsSLo /usr/local/bin/pie https://github.com/php/pie/releases/download/1.5.0/pie.phar
chmod +x /usr/local/bin/pie
git clone https://github.com/asgrim/example-pie-extension /tmp/example-pie-extension
git -C /tmp/example-pie-extension checkout -B main 963c8d70c57c23fa2098e499a0ebffabb64748b3
pie repository:add vcs /tmp/example-pie-extension
pie install asgrim/example-pie-extension:dev-main --with-hello-name=Issue -v
php -r 'example_pie_extension_test();' # Hello, Issue!
# Move main to the second commit
git -C /tmp/example-pie-extension checkout -B main f4aa08c72cffd395e8ddbcb55622f33165da8660
pie upgrade -v < /dev/null # 1. no terminal, like a script or CI
pie upgrade -v # 2. with a terminal, answer "yes"
php -r 'example_pie_extension_test();' # Hello, Issue!
pie upgrade -v # 3. nothing new on main
php -r 'example_pie_extension_test();' # Hello, world!
pie uninstall asgrim/example-pie-extension -v
What do you expect to happen?
pie upgrade rebuilds the extension from the new commit on main with the configure options it was installed with, without asking anything. Running it again when nothing has changed does nothing, and pie uninstall removes the extension file.
What is actually happening
- Without a terminal,
pie upgradeexits with code 1 andThe .git directory is missing from /root/.pie/php8.4_.../vendor/asgrim/example-pie-extension. PIE removes the package sources after installing, so Composer has no Git checkout to update. - With a terminal, Composer shows the same error and asks
Would you like to try reinstalling the package instead [yes]?. Answering yes rebuildsf4aa08cwith--with-hello-name=Issue. But afterwards the package's entry invendor/composer/installed.jsonhas lost all of PIE's metadata. Itsextrais just{"download-url-method":"composer-default"}. - The next
pie upgradethen saysinstalled extension metadata missing, rebuilds even though nothing changed, and drops the configure option. The extension now printsHello, world!. pie uninstallprintsDid not remove extension file: ⚠️ - installed extension metadata missingand leavesexample_pie_extension.soin the extension directory.
I think the metadata goes missing because AddInstalledJsonMetadata::addPieMetadata() writes to findPackages($name)[0]. For a default branch install, that's the 9999999-dev alias. After an update, that alias still points at the package that was replaced, so the metadata lands on the old package instead of the new one.
Complete logs/output
installed.json entry before and after step 2
php -r '$f = glob("/root/.pie/php8.4_*/vendor/composer/installed.json")[0]; foreach (json_decode(file_get_contents($f), true)["packages"] as $p) { echo $p["name"], " ", $p["source"]["reference"], " ", json_encode($p["extra"] ?? null, JSON_UNESCAPED_SLASHES), "\n"; }'
Before (after the first install):
asgrim/example-pie-extension 963c8d70c57c23fa2098e499a0ebffabb64748b3 {"download-url-method":"composer-default","pie-target-platform-php-path":"/usr/local/bin/php","pie-target-platform-php-config-path":"/usr/local/bin/php-config","pie-target-platform-php-version":"8.4.26","pie-target-platform-php-thread-safety":"NonThreadSafe","pie-target-platform-php-windows-compiler":null,"pie-target-platform-architecture":"x86_64","pie-configure-options":"--with-hello-name=Issue","pie-phpize-binary":null,"pie-built-binary":"/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so","pie-installed-binary-checksum":"35a78a11aa56c0f0f3fcaee181d8005b6673518ca2f07e807663652abd030208","pie-installed-binary":"/usr/local/lib/php/extensions/no-debug-non-zts-20240924/example_pie_extension.so"}
After (after answering yes in step 2):
asgrim/example-pie-extension f4aa08c72cffd395e8ddbcb55622f33165da8660 {"download-url-method":"composer-default"}
1. pie upgrade -v < /dev/null
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Checking if all build tools are installed.
All build tools found.
✅ PIE package asgrim/example-pie-extension (example_pie_extension) is already installed and verified.
✅ PIE package asgrim/example-pie-extension (example_pie_extension) is already installed and verified.
Loading composer repositories with package information
Reading composer.json of asgrim/example-pie-extension (1.0.1)
Reading composer.json of asgrim/example-pie-extension (1.0.1-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.1)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.2)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.4)
Reading composer.json of asgrim/example-pie-extension (1.1.0-beta.1)
Reading composer.json of asgrim/example-pie-extension (2.0.0)
Reading composer.json of asgrim/example-pie-extension (2.0.1)
Reading composer.json of asgrim/example-pie-extension (2.0.10)
Reading composer.json of asgrim/example-pie-extension (2.0.2)
Reading composer.json of asgrim/example-pie-extension (2.0.3)
Reading composer.json of asgrim/example-pie-extension (2.0.4)
Reading composer.json of asgrim/example-pie-extension (2.0.5)
Reading composer.json of asgrim/example-pie-extension (2.0.7)
Reading composer.json of asgrim/example-pie-extension (2.0.8)
Reading composer.json of asgrim/example-pie-extension (2.0.9)
Reading composer.json of asgrim/example-pie-extension (main)
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading asgrim/example-pie-extension (dev-main 963c8d7 => dev-main f4aa08c)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
- Upgrading asgrim/example-pie-extension (dev-main 963c8d7 => dev-main f4aa08c): Update of asgrim/example-pie-extension failed
In GitDownloader.php line 155:
[RuntimeException]
The .git directory is missing from /root/.pie/php8.4_927587226341e4683af1e7
e8c8d85a7b/vendor/asgrim/example-pie-extension, see https://getcomposer.org
/commit-deps for more information
Exception trace:
at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Downloader/GitDownloader.php:155
Composer\Downloader\GitDownloader->doUpdate() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Downloader/VcsDownloader.php:174
Composer\Downloader\VcsDownloader->update() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Downloader/DownloadManager.php:343
Composer\Downloader\DownloadManager->update() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php:313
Composer\Installer\LibraryInstaller->updateCode() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php:177
Composer\Installer\LibraryInstaller->update() at phar:///usr/local/bin/pie/src/ComposerIntegration/PiePackageInstaller.php:61
Php\Pie\ComposerIntegration\PiePackageInstaller->update() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:491
Composer\Installer\InstallationManager->update() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:382
Composer\Installer\InstallationManager->{closure:Composer\Installer\InstallationManager::executeBatch():381}() at phar:///usr/local/bin/pie/vendor/react/promise/src/Internal/FulfilledPromise.php:47
React\Promise\Internal\FulfilledPromise->then() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:381
Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:323
Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:221
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:876
Composer\Installer->doInstall() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:686
Composer\Installer->doUpdate() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:325
Composer\Installer->run() at phar:///usr/local/bin/pie/src/ComposerIntegration/ComposerIntegrationHandler.php:225
Php\Pie\ComposerIntegration\ComposerIntegrationHandler->runInstall() at phar:///usr/local/bin/pie/src/Command/UpgradeCommand.php:111
Php\Pie\Command\UpgradeCommand->execute() at phar:///usr/local/bin/pie/vendor/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:1121
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/pie/bin/pie:68
require() at /usr/local/bin/pie:16
upgrade [-j|--make-parallel-jobs MAKE-PARALLEL-JOBS] [--skip-enable-extension] [--force] [--suppress-download-url-method SUPPRESS-DOWNLOAD-URL-METHOD] [-d|--working-dir WORKING-DIR] [--with-php-config WITH-PHP-CONFIG] [--with-php-path WITH-PHP-PATH] [--with-phpize-path WITH-PHPIZE-PATH] [--no-cache] [--allow-non-interactive-project-install] [--no-dev] [--select SELECT] [--auto-install-build-tools] [--no-build-tools-check] [--auto-install-system-dependencies] [--no-system-dependencies-check]
2. pie upgrade -v, answering yes
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Checking if all build tools are installed.
All build tools found.
✅ PIE package asgrim/example-pie-extension (example_pie_extension) is already installed and verified.
✅ PIE package asgrim/example-pie-extension (example_pie_extension) is already installed and verified.
Loading composer repositories with package information
Reading composer.json of asgrim/example-pie-extension (1.0.1)
Reading composer.json of asgrim/example-pie-extension (1.0.1-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.1)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.2)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.4)
Reading composer.json of asgrim/example-pie-extension (1.1.0-beta.1)
Reading composer.json of asgrim/example-pie-extension (2.0.0)
Reading composer.json of asgrim/example-pie-extension (2.0.1)
Reading composer.json of asgrim/example-pie-extension (2.0.10)
Reading composer.json of asgrim/example-pie-extension (2.0.2)
Reading composer.json of asgrim/example-pie-extension (2.0.3)
Reading composer.json of asgrim/example-pie-extension (2.0.4)
Reading composer.json of asgrim/example-pie-extension (2.0.5)
Reading composer.json of asgrim/example-pie-extension (2.0.7)
Reading composer.json of asgrim/example-pie-extension (2.0.8)
Reading composer.json of asgrim/example-pie-extension (2.0.9)
Reading composer.json of asgrim/example-pie-extension (main)
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
- Upgrading asgrim/example-pie-extension (dev-main 963c8d7 => dev-main f4aa08c): Update failed (The .git directory is missing from /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension, see https://getcomposer.org/commit-deps for more information)
Would you like to try reinstalling the package instead [yes]? - Removing asgrim/example-pie-extension (dev-main 963c8d7)
- Installing asgrim/example-pie-extension (dev-main f4aa08c): Cloning f4aa08c72cffd395e8ddbcb55622f33165da8660
Extracted asgrim/example-pie-extension:dev-main source to: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension
Skipping phpize --clean, configure does not exist
Running phpize step using: /usr/local/bin/phpize
Configuring for:
PHP Version: 8.4
PHP Api Version: 20240924
Zend Module Api No: 20240924
Zend Extension Api No: 420240924
phpize complete.
Running configure step with: ./configure --with-hello-name=Issue --with-php-config=/usr/local/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for egrep -e... (cached) /usr/bin/grep -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20240924
checking for PHP installed headers prefix... /usr/local/include/php
checking if debugging is enabled... no
checking if PHP is built with thread safety (ZTS)... no
Configuring extension
checking whether to enable example-pie-extension support... yes, shared
checking hello name... Issue
Configuring libtool
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
Generating files
configure: creating build directories
configure: creating Makefile
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
Configure complete with options: --with-hello-name=Issue --with-php-config=/usr/local/bin/php-config
Running make step with: /usr/bin/make -j6
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=compile cc -I. -I/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -g -O0 -Wall -std=gnu99 -DZEND_COMPILE_DL_EXT=1 -c /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/zend_example_pie_extension.c -o zend_example_pie_extension.lo -MMD -MF zend_example_pie_extension.dep -MT zend_example_pie_extension.lo
mkdir .libs
cc -I. -I/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -g -O0 -Wall -std=gnu99 -DZEND_COMPILE_DL_EXT=1 -c /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/zend_example_pie_extension.c -MMD -MF zend_example_pie_extension.dep -MT zend_example_pie_extension.lo -fPIC -DPIC -o .libs/zend_example_pie_extension.o
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=link cc -shared -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o example_pie_extension.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules zend_example_pie_extension.lo
cc -shared .libs/zend_example_pie_extension.o -Wl,-soname -Wl,example_pie_extension.so -o .libs/example_pie_extension.so
creating example_pie_extension.la
(cd .libs && rm -f example_pie_extension.la && ln -s ../example_pie_extension.la example_pie_extension.la)
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=install cp ./example_pie_extension.la /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
cp ./.libs/example_pie_extension.so /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
cp ./.libs/example_pie_extension.lai /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.la
PATH="$PATH:/sbin" ldconfig -n /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
----------------------------------------------------------------------
Libraries have been installed in:
/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Build complete: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
Install complete: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/example_pie_extension.so
Trying to enable extension using PreCheckExtensionAlreadyLoaded
Successfully asserted that extension example_pie_extension is loaded in runtime.
✅ Extension asgrim/example-pie-extension:dev-main is enabled and loaded in /usr/local/bin/php
Generating autoload files
No security vulnerability advisories found.
3. pie upgrade -v with nothing new on main
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Checking if all build tools are installed.
All build tools found.
⚠️ Package status of asgrim/example-pie-extension (example_pie_extension) is not yet verified, adding to install candidates: ⚠️ - installed extension metadata missing
⚠️ Package status of asgrim/example-pie-extension (example_pie_extension) is not yet verified, adding to install candidates: ⚠️ - installed extension metadata missing
Loading composer repositories with package information
Reading composer.json of asgrim/example-pie-extension (1.0.1)
Reading composer.json of asgrim/example-pie-extension (1.0.1-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.1)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.2)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.3)
Reading composer.json of asgrim/example-pie-extension (1.1.0-alpha.4)
Reading composer.json of asgrim/example-pie-extension (1.1.0-beta.1)
Reading composer.json of asgrim/example-pie-extension (2.0.0)
Reading composer.json of asgrim/example-pie-extension (2.0.1)
Reading composer.json of asgrim/example-pie-extension (2.0.10)
Reading composer.json of asgrim/example-pie-extension (2.0.2)
Reading composer.json of asgrim/example-pie-extension (2.0.3)
Reading composer.json of asgrim/example-pie-extension (2.0.4)
Reading composer.json of asgrim/example-pie-extension (2.0.5)
Reading composer.json of asgrim/example-pie-extension (2.0.7)
Reading composer.json of asgrim/example-pie-extension (2.0.8)
Reading composer.json of asgrim/example-pie-extension (2.0.9)
Reading composer.json of asgrim/example-pie-extension (main)
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing asgrim/example-pie-extension (dev-main f4aa08c): Cloning f4aa08c72cffd395e8ddbcb55622f33165da8660
Extracted asgrim/example-pie-extension:dev-main source to: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension
Skipping phpize --clean, configure does not exist
Running phpize step using: /usr/local/bin/phpize
Configuring for:
PHP Version: 8.4
PHP Api Version: 20240924
Zend Module Api No: 20240924
Zend Extension Api No: 420240924
phpize complete.
Running configure step with: ./configure --with-php-config=/usr/local/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for egrep -e... (cached) /usr/bin/grep -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20240924
checking for PHP installed headers prefix... /usr/local/include/php
checking if debugging is enabled... no
checking if PHP is built with thread safety (ZTS)... no
Configuring extension
checking whether to enable example-pie-extension support... yes, shared
checking hello name... no
Configuring libtool
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
Generating files
configure: creating build directories
configure: creating Makefile
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
Configure complete with options: --with-php-config=/usr/local/bin/php-config
Running make step with: /usr/bin/make -j6
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=compile cc -I. -I/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -g -O0 -Wall -std=gnu99 -DZEND_COMPILE_DL_EXT=1 -c /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/zend_example_pie_extension.c -o zend_example_pie_extension.lo -MMD -MF zend_example_pie_extension.dep -MT zend_example_pie_extension.lo
mkdir .libs
cc -I. -I/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -g -O0 -Wall -std=gnu99 -DZEND_COMPILE_DL_EXT=1 -c /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/zend_example_pie_extension.c -MMD -MF zend_example_pie_extension.dep -MT zend_example_pie_extension.lo -fPIC -DPIC -o .libs/zend_example_pie_extension.o
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=link cc -shared -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o example_pie_extension.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules zend_example_pie_extension.lo
cc -shared .libs/zend_example_pie_extension.o -Wl,-soname -Wl,example_pie_extension.so -o .libs/example_pie_extension.so
creating example_pie_extension.la
(cd .libs && rm -f example_pie_extension.la && ln -s ../example_pie_extension.la example_pie_extension.la)
/bin/bash /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/libtool --tag=CC --mode=install cp ./example_pie_extension.la /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
cp ./.libs/example_pie_extension.so /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
cp ./.libs/example_pie_extension.lai /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.la
PATH="$PATH:/sbin" ldconfig -n /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
----------------------------------------------------------------------
Libraries have been installed in:
/root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Build complete: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/vendor/asgrim/example-pie-extension/modules/example_pie_extension.so
Install complete: /usr/local/lib/php/extensions/no-debug-non-zts-20240924/example_pie_extension.so
Trying to enable extension using PreCheckExtensionAlreadyLoaded
Successfully asserted that extension example_pie_extension is loaded in runtime.
✅ Extension asgrim/example-pie-extension:dev-main is enabled and loaded in /usr/local/bin/php
Generating autoload files
No security vulnerability advisories found.
4. pie uninstall asgrim/example-pie-extension -v
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
- Removing asgrim/example-pie-extension (dev-main f4aa08c)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 1 removal
- Removing asgrim/example-pie-extension (dev-main f4aa08c)
Did not remove extension file: ⚠️ - installed extension metadata missing
INI file "/usr/local/etc/php/conf.d/docker-php-ext-example_pie_extension.ini" was updated to remove the extension.
Generating autoload files
No security vulnerability advisories found.
Anything else?
After the uninstall, pie show -v still lists asgrim/example-pie-extension:9999999-dev twice as "was downloaded but has not been built yet", and pie upgrade -v then fails with $extensionsBeingInstalled was not set, maybe createWithPhpBinary was not used?.
pie show -v and pie upgrade -v after the uninstall
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Tip: to include extensions in this list that PIE does not manage, use the --all flag.
Loaded PIE extensions:
(none)
⚠️ PIE packages not loaded:
These extensions were set up with PIE but are not currently enabled.
- asgrim/example-pie-extension:9999999-dev - was downloaded but has not been built yet.
- asgrim/example-pie-extension:9999999-dev - was downloaded but has not been built yet.
🥧 PHP Installer for Extensions (PIE) 1.5.0, from The PHP Foundation
You are running PHP 8.4.26
Target PHP installation: 8.4.26 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
Using pie.json: /root/.pie/php8.4_927587226341e4683af1e7e8c8d85a7b/pie.json
Checking if all build tools are installed.
All build tools found.
⚠️ Package status of asgrim/example-pie-extension (example_pie_extension) is not yet verified, adding to install candidates: ⚠️ - installed extension metadata missing
⚠️ Package status of asgrim/example-pie-extension (example_pie_extension) is not yet verified, adding to install candidates: ⚠️ - installed extension metadata missing
In Assert.php line 2338:
[Webmozart\Assert\InvalidArgumentException]
$extensionsBeingInstalled was not set, maybe createWithPhpBinary was not us
ed?
Exception trace:
at phar:///usr/local/bin/pie/vendor/webmozart/assert/src/Assert.php:2338
Webmozart\Assert\Assert::reportInvalidArgument() at phar:///usr/local/bin/pie/vendor/webmozart/assert/src/Assert.php:666
Webmozart\Assert\Assert::notEmpty() at phar:///usr/local/bin/pie/vendor/webmozart/assert/src/Assert.php:2100
Webmozart\Assert\Assert::isNonEmptyList() at phar:///usr/local/bin/pie/src/ComposerIntegration/PieComposerInstaller.php:27
Php\Pie\ComposerIntegration\PieComposerInstaller->createPlatformRepo() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:489
Composer\Installer->doUpdate() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:325
Composer\Installer->run() at phar:///usr/local/bin/pie/src/ComposerIntegration/ComposerIntegrationHandler.php:225
Php\Pie\ComposerIntegration\ComposerIntegrationHandler->runInstall() at phar:///usr/local/bin/pie/src/Command/UpgradeCommand.php:111
Php\Pie\Command\UpgradeCommand->execute() at phar:///usr/local/bin/pie/vendor/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:1121
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/pie/bin/pie:68
require() at /usr/local/bin/pie:16
upgrade [-j|--make-parallel-jobs MAKE-PARALLEL-JOBS] [--skip-enable-extension] [--force] [--suppress-download-url-method SUPPRESS-DOWNLOAD-URL-METHOD] [-d|--working-dir WORKING-DIR] [--with-php-config WITH-PHP-CONFIG] [--with-php-path WITH-PHP-PATH] [--with-phpize-path WITH-PHPIZE-PATH] [--no-cache] [--allow-non-interactive-project-install] [--no-dev] [--select SELECT] [--auto-install-build-tools] [--no-build-tools-check] [--auto-install-system-dependencies] [--no-system-dependencies-check]
- 主要言語
- PHP
- スター
- 2k
- フォーク
- 73
- 平均マージ
- 3時間 37分
- マージ済み PR(30日)
- 11
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/pie のほかの issue
-
Look into php master failing with PIE対応中かも @asgrim が 3 日前に担当しました。 オープンbug maintainer investigating
メンテナーはふだん 3 日以内に返信
-
Improve --with-libdir handling対応中かも @asgrim が 5 日前に担当しました。 オープンenhancement maintainer investigating
メンテナーはふだん 3 日以内に返信
-
Add self-update feature for executable PIEs対応中かも @asgrim が 9 日前に担当しました。 オープンenhancement maintainer investigating
メンテナーはふだん 3 日以内に返信
-
Allow building from existing sources on disk対応中かも @asgrim が 9 日前に担当しました。 オープンenhancement maintainer investigating
php/pie#738 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Optionally remove build-only dependencies and bloat after install再び着手できるかも @asgrim が 131 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement maintainer investigating
php/pie#618 · コメント 2 件 · リアクション 3 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
[Area] REST API [Type] Documentation Good First Issue
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
WordPress/presence-api#584 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100