8000 Include binaries on releases to support using PIE on Windows · Issue #2575 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

Include binaries on releases to support using PIE on Windows #2575

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

Open
2 tasks done
kohenkatz opened this issue Nov 22, 2024 · 2 comments
Open
2 tasks done

Include binaries on releases to support using PIE on Windows #2575

kohenkatz opened this issue Nov 22, 2024 · 2 comments

Comments

@kohenkatz
Copy link

Expected behaviour

#2546 added support for installation using PHP Installer for Extensions (PIE).

It is expected that this installation command also works on 64-bit Windows platforms by downloading the appropriate DLL.

Actual behaviour

PIE produces an error:

 Could not find release asset for phpredis/phpredis:6.1.0 named one of "php_redis-6.1.0-8.3-nts-vs16-x86_64.zip, php_redis-6.1.0-8.3-vs16-nts-x86_64.zip"

I'm seeing this behaviour on

  • OS: Windows 11
  • Redis: n/a
  • PHP: 8.3.14-nts-vs16-x86_64
  • phpredis: 6.1.0

Steps to reproduce, backtrace or example script

  1. Download PHP Installer for extensions PHAR
  2. Run php pie.phar install phpredis/phpredis

Full output:

This command may need elevated privileges, and may prompt you for your password.
You are running PHP 8.3.14
Target PHP installation: 8.3.14 nts, vs16, on Windows x86_64 (from C:\Programs\php-8.3.14-nts-Win32-vs16-x64\php.exe)
Found package: phpredis/phpredis:6.1.0 which provides ext-redis

In CouldNotFindReleaseAsset.php line 19:

  Could not find release asset for phpredis/phpredis:6.1.0 named one of "php_redis-6.1.0-8.3-nts-vs16-x86_64.zip, php_redis-6.1.0-8.3-vs16-nts-x86_64.zip"

install [-j|--make-parallel-jobs MAKE-PARALLEL-JOBS] [--with-phpize-path WITH-PHPIZE-PATH] [--with-php-config WITH-PHP-CONFIG] [--with-php-path WITH-PHP-PATH] [--disable-redis-json] [--disable-redis-session] [--enable-redis] [--enable-redis-igbinary] [--enable-redis-lz4] [--enable-redis-lzf] [--enable-redis-msgpack] [--enable-redis-zstd] [--with-liblz4 WITH-LIBLZ4] [--with-liblzf WITH-LIBLZF] [--with-libzstd WITH-LIBZSTD] [--] <requested-package-and-version>

According to the PIE design documents, PIE expects Windows builds to be attached to the GitHub release.

Possible solution

Note that attaching the existing PECL builds to the GitHub release won't quite fix the issue, because the naming convention is different.

It appears the PHP Foundation has recently standardized on referring to 64-bit x86 platforms as x86_64 instead of x64 (see php/pie#87 (comment); though PECL (and https://windows.php.net itself! still uses x64).

There is a fairly new "official" PHP Windows Builder GitHub Action, which can be provided with an environment variable ARTIFACT_NAMING_SCHEME - if set to pecl, it produces the existing x64-style name, but if unset it produces a x86_64-style name.

Perhaps it would be possible to use this (or something similar to it) to produce the DLLs built for PIE?

I am not familiar enough with GH Actions to tell whether this is a simple drop-in change, or whether more work is needed.

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
@michael-grunder
Copy link
Member

I can look into this. I suppose it would have to be possible to specify a custom location to download the binaries and set that to GitHub. We do actually build Windows binaries now, but it's likely that we aren't naming them precicely what we'd need to.

Honestly, I know basically nothing about Windows but can probably muddle through 😄

@griesi007
Copy link
griesi007 commented May 16, 2025

would love to see this as well. Probably the PIE team can help to get this automated. There is also some documentation available
https://github.com/php/pie/blob/main/docs/extension-maintainers.md#windows-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0