KEINOS / Dockerfile_of_PHP8-JIT

✅ Dockerfile of PHP8.0 with JIT Enabled in Alpine Image.
https://arkadiuszkondas.com/how-to-run-php-8-with-jit-support-using-docker/
9 stars 4 forks source link

JIT is not enabled in ARM image #24

Open KEINOS opened 3 years ago

KEINOS commented 3 years ago

UPDATE 2021/07/29: PHP 8.1 JIT is going to support arm64. Thus RPi 3 (ARM v7l) + RaspberryPiOS 64bit might work in the near future. But RPi Zero's ARM6l 32bit. 😭


In the latest build-20201128, JIT is Not Available on RaspberryPi3 (ARM).

$ docker run --rm keinos/php8-jit:latest php -i | grep jit
Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-enable-jit.ini,
auto_globals_jit => On => On
pcre.jit => 1 => 1

$ docker run --rm keinos/php8-jit:latest php -i | grep JIT | head -3
PCRE JIT Support => enabled
PCRE JIT Target => ARMv5 32bit (little endian + aligned) ABI:hardfp
JIT => Not Available
$ docker run --rm keinos/php8-jit:latest env | grep TAG_RELESED
TAG_RELESED=8.0.0-dev-build-20201128

$ cat /etc/os-release | grep PRETTY
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"

$ uname -a
Linux MyRasPi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

$ docker --version
Docker version 19.03.13, build 4484c46

In macOS (Intel/AMD), JIT was enabled though.

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.7
BuildVersion:   19H15

$ docker run --rm keinos/php8-jit:latest php -i | grep JIT | head -3
PCRE JIT Support => enabled
PCRE JIT Target => x86 64bit (little endian + unaligned)
JIT => On

$ docker --version
Docker version 19.03.13, build 4484c46d9d

$ docker run --rm keinos/php8-jit:latest env | grep TAG_RELESED
TAG_RELESED=8.0.0-dev-build-20201128
thowat commented 3 years ago

PHP 8.0 JIT is not supported on ARM.

KEINOS commented 3 years ago

@thowat

Indeed.

I've been trying to change the config and etc., but it wasn't supported in the first place. 😭

Currently we support x86 and x86_64 CPUs on POSIX platforms and Windows. DynAsm also supports ARM. ARM64, MIPS, MIPS64 and PPC, so in theory we should be able to support all of the platforms that are popular for PHP deployments (given enough efforts).

(Proposal | JIT | RFC @ PHP.NET)

shqking commented 3 years ago

FYI. PHP 8.1 JIT is going to supported on arm64. See https://github.com/php/php-src/pull/6982 and https://wiki.php.net/internals/aarch64-cross-compile I'm afraid it's still not supported on arm32 platform.

KEINOS commented 3 years ago

@shqking

PHP 8.1 JIT is going to supported on arm64

Thanks for the info!!

I'm afraid it's still not supported on arm32 platform.

😭