Skip to content

Install extension in specific folder using INSTALL_ROOT= #481

@Ninos

Description

@Ninos

Bug

Currently it's not possible to install an extension in specific folder by defining INSTALL_ROOT=, e.g.:

INSTALL_ROOT="/your/buildDir" pie install -vj "$(nproc)" apcu/apcu

After that you get following:

In UnixInstall.php line 70:
                                                                                                      
  [RuntimeException]                                                                                  
  Install failed, /usr/local/lib/php/extensions/no-debug-non-zts-20250925/apcu.so was not installed.

Exception trace:
  at phar:///usr/bin/pie/src/Installing/UnixInstall.php:70

See following line of code:
https://github.com/php/pie/blob/1.4.x/src/Installing/UnixInstall.php#L69

Reason

The variable INSTALL_ROOT is already working fine with the extensions (while build-process), just pie throws the exception above because it does not handle any installation folders.
In my opinion there should be a pie command option --install-dir|--prefix (prefix should then also be used for the php binary paths) defining an installation directory and bypassing this value to the sys env INSTALL_ROOT before running the builds.

Workaround

My current workaround is building twice:

pie install -vj "$(nproc)" apcu/apcu
INSTALL_ROOT="/your/buildDir" pie install -vj "$(nproc)" apcu/apcu

Works like a charm, but yeah, I'm building twice...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions