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

Add some documentation to README.md about how to get going on Windows ARM64. #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamespack
Copy link

This is all I had to do to get building on my arm based surface laptop using the sdk which is nice!!

@cmb69
Copy link
Member

cmb69 commented Dec 18, 2024

I'm not sure if it makes sense to add further quick-starter batch files nowadays; it seems to me they actually get in the way, since you can build any supported PHP version easily with latest Visual Studio 2022 but using an older toolset. For instance, my local phpsdk-vc15-x64.bat is:

@echo off

call %~dp0phpsdk-starter.bat -c vc15 -a x64 -s 14.16 %*

exit /b %ERRORLEVEL%

Or you can run C:\php-sdk\phpsdk-starter.bat -c vs17 -a arm64 directly (or make it a shortcut).

BTW: are you doing only minimal PHP builds on ARM64, or where do you get the dependencies (e.g. libxml2) from?

@jamespack
Copy link
Author

phpsdk-vc15-x64.bat is:

@echo off

call %~dp0phpsdk-starter.bat -c vc15 -a x64 -s 14.16 %*

exit /b %ERRORLEVEL%

Makes sense.

BTW: are you doing only minimal PHP builds on ARM64, or where do you get the dependencies (e.g. libxml2) from?

Im using microsoft/vcpkg for deps

If you prefer not to merge it is there a preferred place that I could contrib to docs. Its not immediately clear (at least) to me how to get going on arm :)

@cmb69
Copy link
Member

cmb69 commented Dec 18, 2024

Im using microsoft/vcpkg for deps

Ah, thanks!

is there a preferred place that I could contrib to docs.

We have:

If you like, provide a PR for the README; I'll try to find some time to update the Wiki page.

@jamespack
Copy link
Author

I updated this pull request. Is that enough? Or do you want a new pull request?

@jamespack jamespack changed the title Add support for arm64 builds Add some documentation to README.md about how to get going on Windows ARM64. Dec 21, 2024
@jamespack
Copy link
Author

BTW: are you doing only minimal PHP builds on ARM64, or where do you get the dependencies (e.g. libxml2) from?

I dont know the delineation between a minimal build and a respectable windows build but I've worked my way up to iconv, sodium, enchant, libxml, openssl, prce, readline, phar, curl, mysql and dom.

Notably, gd is missing. I have all of the libs for arm but i cant seem to make it happy. I think the libs for gd rely on some x64 intrinsics that may not be available on arm. Not 100% sure about that. But once I figured out the libxml mess the rest was pretty straight forward.

@cmb69
Copy link
Member

cmb69 commented Dec 23, 2024

I dont know the delineation between a minimal build and a respectable windows build […]

With minimal build I was referring to a build without any external dependencies.

but I've worked my way up to iconv, sodium, enchant, libxml, openssl, prce, readline, phar, curl, mysql and dom.

Great!

I think the libs for gd rely on some x64 intrinsics that may not be available on arm. Not 100% sure about that.

That's certainly possible. It's also possible that they use some manually written assembler code.

The whole GD integration is unfortunate on Windows: you cannot use an external libgd, and to build with the bundled GD, you need all supported dependencies. Otherwise you could try library by library, and even start without any dependency. I hope to find some time to work on that, anyway.

@jamespack
Copy link
Author

jamespack commented Dec 24, 2024

@cmb69 If you're interested. Here jamespack/php-deps-windows-arm64 is how I'm currently handling deps. This could probably be tied into the build system. There are a few libs that dont play well. Notably libxml. but for the most part vcpkg is awesome.

@jamespack
Copy link
Author

Even managed to get GD built!

image

@cmb69
Copy link
Member

cmb69 commented Dec 24, 2024

but for the most part vcpkg is awesome.

We have discussed using vcpkg a few years ago, and came to the conclusion that it doesn't fulfill our needs. (naming conventions; distribution of single packages; and maybe a couple of other issues)

@jamespack
Copy link
Author

jamespack commented Dec 24, 2024

but for the most part vcpkg is awesome.

We have discussed using vcpkg a few years ago, and came to the conclusion that it doesn't fulfill our needs. (naming conventions; distribution of single packages; and maybe a couple of other issues)

I get that on your side. Its nice for the home gamer tho. Its also matured quite a bit since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants