Closed brianGriifin114 closed 1 month ago
Generally, I assume that PHP support for ARM on Windows is still experimental and very limited; I don't know if there are any plans regarding shipping dependency builds for that platform. @shivammathur might know more about this.
Regarding your suggested fix, maybe @dstogov can comment on that. In any way, the change likely should be done in https://github.com/dstogov/ir, and backported later.
noted,thanks for the reply.
In addition, I also got the same error message when building under arm64ec.
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64\mc.exe" -h win32\ -r C:\gitP\php\php-src\arm64\Release_TS\ -x C:\gitP\php\php-src\arm64\Release_TS\ win32\build\wsyslog.mc
MC: Compiling win32\build\wsyslog.mc
"cl.exe" /D ZEND_COMPILE_DL_EXT=1 /D COMPILE_DL_OPCACHE /D OPCACHE_EXPORTS=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /I "ext\opcache\jit" /DHAVE_IR_IR_H=1 /I "ext\opcache\jit\ir" /D IR_TARGET_X64 /D IR_PHP /DHAVE_CAPSTONE_CAPSTONE_H=0 /I ext\opcache /nologo /I . /I main /I Zend /I TSRM /I ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Zc:__cplusplus /d2FuncCache1 /Zc:wchar_t /MP8 /LD /MD /Ox /D NDebug /D NDEBUG /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\gitP\php\php-src\no\include" /D FD_SETSIZE=256 /FoC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\ /FpC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\ /FRC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\ /FdC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\ /c ext\opcache\ZendAccelerator.c ext\opcache\shared_alloc_win32.c ext\opcache\zend_accelerator_blacklist.c ext\opcache\zend_accelerator_debug.c ext\opcache\zend_accelerator_hash.c ext\opcache\zend_accelerator_module.c ext...
ZendAccelerator.c
shared_alloc_win32.c
zend_accelerator_blacklist.c
zend_accelerator_debug.c
zend_accelerator_hash.c
zend_accelerator_module.c
zend_accelerator_util_funcs.c
zend_file_cache.c
zend_persist.c
zend_persist_calc.c
zend_shared_alloc.c
"cl.exe" /D ZEND_COMPILE_DL_EXT=1 /D COMPILE_DL_OPCACHE /D OPCACHE_EXPORTS=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /I "ext\opcache\jit" /DHAVE_IR_IR_H=1 /I "ext\opcache\jit\ir" /D IR_TARGET_X64 /D IR_PHP /DHAVE_CAPSTONE_CAPSTONE_H=0 /I ext\opcache /nologo /I . /I main /I Zend /I TSRM /I ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Zc:__cplusplus /d2FuncCache1 /Zc:wchar_t /MP8 /LD /MD /Ox /D NDebug /D NDEBUG /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\gitP\php\php-src\no\include" /D FD_SETSIZE=256 /FoC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FpC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FRC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FdC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /c ext\opcache\jit\zend_jit.c ext\opcache\jit\zend_jit_vm_helpers.c
zend_jit.c
zend_jit_vm_helpers.c
ext\opcache\jit/ir/ir.h(75): fatal error C1189: #error: "Unknown addr size" (compiling source file ext\opcache\jit\zend_jit.c)
warning C1511: creating 'C:\a\_work\_temp\rwc_project_logs\PHP7\preprocessed_repro_build\zend_jit.rsp' for capture_repro
ext\opcache\jit/ir/ir.h(75): fatal error C1189: #error: "Unknown addr size" (compiling source file ext\opcache\jit\zend_jit.c)
NMAKE : fatal error U1077: '"cl.exe" /D ZEND_COMPILE_DL_EXT=1 /D COMPILE_DL_OPCACHE /D OPCACHE_EXPORTS=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 /I "ext\opcache\jit" /DHAVE_IR_IR_H=1 /I "ext\opcache\jit\ir" /D IR_TARGET_X64 /D IR_PHP /DHAVE_CAPSTONE_CAPSTONE_H=0 /I ext\opcache /nologo /I . /I main /I Zend /I TSRM /I ext /D _WINDOWS /D WINDOWS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /D _USE_MATH_DEFINES /FD /wd4996 /Qspectre /guard:cf /Zc:inline /Zc:__cplusplus /d2FuncCache1 /Zc:wchar_t /MP8 /LD /MD /Ox /D NDebug /D NDEBUG /GF /D ZEND_DEBUG=0 /D ZTS=1 /I "C:\gitP\php\php-src\no\include" /D FD_SETSIZE=256 /FoC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FpC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FRC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /FdC:\gitP\php\php-src\arm64\Release_TS\ext\opcache\jit\ /c ext\opcache\jit\zend_jit.c ext\opcache\jit\zend_jit_vm_helpers.c' : return code '0x2'
Stop.
Does this mean that support under arm64ec is also limited?
Does this mean that support under arm64ec is also limited?
Most likely, yes. Maybe @dixyes or @vladimir-aubrecht have more information on the state of PHP for ARM on Windows.
I have not tried with arm64ec (only tried on native arm64, when I was working on this port, arm64ec is not released).
for arm64, my lwmbs build for PHP 8.3 is still working now, I guess there are some breaking changes in the master branch?
At this time PHP-JIT doesn't support ARM on Windows. Try to configure and build PHP without JIT.
Use --disable-opcache-jit
.
I fixed ir.h
to check for _M_ARM64
, but this is not enough to make JIT work and I'm not able to check Windows/ARM build anyway.
Thank you very much, I will try to build it according to the options you mentioned.
it works,cheers!
Description
The Microsoft MSVC team uses PHP and other open source projects as part of the compiler testing. We found that PHP will report an error when building on the arm64 architecture.
We found the error in ext\opcache\jit/ir/ir.h(75), which seems to be because the pointer size of the arm64 platform is not defined at the beginning.
maybe we should change it to this?
For more information, I attach build.log and setup.log for reference.If you need more information please leave a message. Build (1).log Setup (2).log
PHP Version
8.4.0-dev
Operating System
Windows