Skip to content
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

Error on building PHP 8.4RC4 on Windows 11 ARM64 #16827

Closed
macintoshplus opened this issue Nov 15, 2024 · 5 comments
Closed

Error on building PHP 8.4RC4 on Windows 11 ARM64 #16827

macintoshplus opened this issue Nov 15, 2024 · 5 comments

Comments

@macintoshplus
Copy link

macintoshplus commented Nov 15, 2024

Description

This error occurs when I try to build PHP for Windows 11 on an ARM64 processor.

I use the GitHub Action php-windows-builder updated to build for ARM64.

sapi\cgi\cgi_main.c(91): fatal error C1083: Cannot open include file: 'openssl/applink.c': No such file or directory

PHP Version

PHP 8.4.0RC4

Operating System

Windows 11 ARM64

@cmb69
Copy link
Member

cmb69 commented Nov 16, 2024

I don't think this is a bug in php-src, but let's see.

#if defined(PHP_WIN32) && defined(HAVE_OPENSSL_EXT)
# include "openssl/applink.c"
#endif

HAVE_OPENSSL_EXT is defined when OpenSSL had been found. Where did you get that package from (did you build it yourself)? That package is supposed to contain include\openssl\applink.c. Is that file missing from your OpenSSL package?

@macintoshplus
Copy link
Author

I use the package available here : https://phpext.phptools.online/experimental

It's build with winlib/builder private fork (it's necessary for work with my self-hosted ARM64 runner).

The GitHub Action configuration is same as winlib/builder:.github/workflows/openssl.yml.

The file openssl/applink.c is added manually into the archive available here?

@cmb69
Copy link
Member

cmb69 commented Nov 17, 2024

applink.c is installed for x64 and x86 builds, but not for arm64 builds, because the uplink feature is disabled there:

https://github.com/winlibs/openssl/blob/36abd7ed2553eab5020bc65cfa001216adebd86d/Configurations/windows-makefile.tmpl#L549-L552

I don't know whether that's correct.

Anyhow, copying the file manually makes the build pass. The alternative would be to not include applink.c for Windows ARM64. I guess the former is the correct solution, but since I can't test, I'm not sure.

@macintoshplus
Copy link
Author

I added the copy of file applink.c into generated artifact on openssl building. The problem is soved with this solution.

cmb69 added a commit to cmb69/winlib-builder that referenced this issue Nov 17, 2024
For some reason applink.c is not installed for ARM64 builds[1].  That
might be an upstream issue, but would need to be checked on a Windows
ARM64 machine; for now, it might be best to just install the file
manually, and see where that goes.

[1] <php/php-src#16827>
@cmb69
Copy link
Member

cmb69 commented Nov 17, 2024

I've filed winlibs/winlib-builder#26.

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants