Skip to content

Error on building Opcache JIT for Windows ARM64 #16839

Closed

Description

@macintoshplus

Description

When I try to build the version 8.0.4RC4 on Windows 11 with ARM64 processors, I have this error.

The build work if I add the —disable-opcache-jit.

Resulted in this output:

zend_jit.obj : error LNK2019: unresolved external symbol __readgsqword referenced in function zend_jit_setup
C:\Users\builder\AppData\Local\Temp\994b80f3-d8b1-427d-9ba3-a7bb4df75943\config\vs17\arm64\obj\Release_TS\php_opcache.dll : fatal error LNK1120: 1 unresolved externals

PHP Version

PHP 8.4.0RC4

Operating System

Windows 11 ARM64

Activity

  1. ndossche commented on Nov 17, 2024

    @ndossche
    Member

    Right, this makes sense because the gs register is x86(-64) specific. In fact, I don't think that the JIT works for Windows+ARM64, so it should probably be disabled by the configure script.

  2. cmb69 commented on Nov 17, 2024

    @cmb69
    Member

    I agree that we should --disable-opcache-jit for Windows ARM64 builds (for now).

    And when cross-compiling, if you don't use /WX (same as -Werror), you hit:

            C:\php-sdk\phpdev\vs17\arm64\php-src\arm64\Release_TS\\gen_ir_fold_hash.exe < ext\opcache\jit\ir\ir_fold.h > ext\opcache\jit\ir\ir_fold_hash.h
    Die Version von C:\php-sdk\phpdev\vs17\arm64\php-src\arm64\Release_TS\gen_ir_fold_hash.exe ist mit der ausgeführten Windows-Version nicht kompatibel. Überprüfen Sie die Systeminformationen des Computers, und wenden Sie sich anschließend an den Herausgeber der Software.
    

    (cf. #15610 (comment))

  3. self-assigned this
    on Nov 17, 2024
  4. changed the title [-]Error on building PHP 8.4.0RC4 on Opcache JIT for Windows ARM64[/-] [+]Error on building Opcache JIT for Windows ARM64[/+] on Nov 17, 2024
  5. cmb69 commented on Nov 17, 2024

    @cmb69
    Member

    Right, this makes sense because the gs register is x86(-64) specific. In fact, I don't think that the JIT works for Windows+ARM64, […]

    There is aarch64 support for POSIX systems, but I believe this is still different to what would be needed for Windows ARM64. Plus, cross-compilation may pose more difficult issues than with an autotools build-chain. And from what I can tell, we do not yet support native compilation on Windows ARM64 (although Visual Studio 17.4 is supposed to support that).

  6. ndossche commented on Nov 17, 2024

    @ndossche
    Member

    but I believe this is still different to what would be needed for Windows ARM64

    Definitely, the ABI and how TLS (for ZTS) is handled is different.

  7. added 2 commits that reference this issue on Nov 18, 2024
    ff5b42b
    e44b762
  8. macintoshplus commented on Nov 19, 2024

    @macintoshplus
    Author

    Thanks you @cmb69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions