php / php-sdk-binary-tools

Tool kit for building PHP under Windows
BSD 2-Clause "Simplified" License
85 stars 32 forks source link

Migrate sdk files to http://downloads.php.net/~windows/php-sdk #5

Closed bukka closed 5 months ago

bukka commented 1 year ago

This migrates the sdk files with added 8.4 version.

bukka commented 1 year ago

This makes the master php-src build work again. I pushed the branch to php/php-sdk-binary-tools so this is what is being used: added in https://github.com/php/php-src/pull/12085 .

It might be just a temporary things - we need to firsts decide if we are going to keep using windows.php.net or move it to downloads. This is really just to make things work in the meantime so I won't be merging this until we make some decisions on it.

Just a note that the preg_match_all change will be eventually merged in any case as it makes things more robust because currently it depends on html being on a single line which is not ideal...

Jan-E commented 1 year ago

On https://windows.php.net/download/ and on https://downloads.php.net/~windows/php-sdk/deps/ VS16 is still the newest version. Will there be a switch to VS17 (Visual Studio 2022) at some time? And/or for some PHP versions?

bukka commented 1 year ago

Yeah I hope we get it sorted for PHP 8.4. I have just started looking to those things so it might take me a bit of time to get up to speed. There might be also others that will look into it so hopefully we will get it sorted.

auroraeosrose commented 6 months ago

Binary compatibility is not quite as nasty as it used to be

https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170

Sooo

I just built master (8.4) with vs17 (linked against the vc16 libs) with this and - it all just worked - ran the tests and all

note I had to comment out the phpsdk_deps.php check against mixing crts (line 129) and apply this PR to get the deps downloaded properly

Note: I didn't do a PGO build or other such fun because of the restrictions on binary compatibility with /GL or /LTCG switches- but it'll do for now if you just want to build PHP and work on extensions using the shiny new compiler

cmb69 commented 2 months ago

Thank you for taking care of this @bukka (and pardon me for being unavailable for such a long time due to private reasons).

To be able to do the PHP 8.4 prerelease builds (without modifications to the php-sdk), https://downloads.php.net/~windows/php-sdk/deps/series/ would need copies of the packages-8.3-vs16-*-*.txt for that version (i.e. packages-8.4-vs16-*-*.txt). Could you upload these @bukka? Or should this be discussed elsewhere (if so, where?)

Wrt. vs17 (aka. Visual Studio 2022): these builds should also work (I've did some preliminary work in preparation for PHP 8.3 back then). To avoid changes to phpsdk_deps.bat, there only need to be copies of the respective series/packages-*.txt files ( vs17 instead of vs16 in the filenames).

Note: I didn't do a PGO build or other such fun because of the restrictions on binary compatibility with /GL or /LTCG switches- but it'll do for now if you just want to build PHP and work on extensions using the shiny new compiler

Isn't that solved as of https://github.com/php/php-src/commit/7d7fe25003bf36120f163ed245201c7551421aab?

bukka commented 2 months ago

@shivammathur actually took over all the Windows build stuff so he is the best position to do that as he has access to downloads.php.net/~windows .

bukka commented 2 months ago

I think it would be greate to try vs17 as this has been requested by people and if there are no specific blockers, we should at least try it for 8.4,

cmb69 commented 2 months ago

I think it would be greate to try vs17 as this has been requested by people and if there are no specific blockers, we should at least try it for 8.4,

Actually. this is a must since vs16 extended support ends 2017-04-13 while PHP 8.4 is supposed to be supported for a longer time (even PHP 8.3 is). Nonsense, see below.

shivammathur commented 2 months ago

I have copied the series files for master, PHP 8.3, and PHP 8.4 with vs17.

cmb69 commented 2 months ago

I have copied the series files for master, PHP 8.3, and PHP 8.4 with vs17.

Thank you, @shivammathur! Unfortunately, I've overlooked that there also should be a copy of https://downloads.php.net/~windows/php-sdk/deps/vs16/ (i.e. https://downloads.php.net/~windows/php-sdk/deps/vs17/). Could you please do that?

Anyhow, with a couple of tweaks and workarounds I've managed to build 8.4.0alpha von vs17. :)

shivammathur commented 2 months ago

I have copied the directory.

cmb69 commented 2 months ago

I have copied the directory.

Thank you; that works fine now.

And a correction regarding the EOL of Visual Studio: 2019 (aka. vs16) has still extended support until 2029-04-10, so there is no need to switch to Visual Studio 2022, but I still think it should be done for PHP 8.4.