Build libcurl against a static nghttp2 library #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is just a quick draft, and depends on #31. I've did a build locally, and couldn't find any issues. This is triggered by some recent issues with PHP 8.4 with somewhat older Apache installations, where php_curl.dll may fail to load due to nghttp2.dll (which is shipped by Apache on Windows builds) being not quite up to date. Building cURL against a static nghttp2 lib would obviously solve that.
A minor drawback is the increase in size. php_curl.dll will get ~15% larger (as will curl.exe), but that isn't a real problem. A somewhat bigger problem would be security updates, although so far we rebuilt cURL usually anyway after updating nghttp2. And there is also the problem that ext/curl checks for nghttp2.lib which is the import library. However, the biggest issue would be with external PHP extensions relying on nghttp2.dll being available in the PHP installation folder, what is currently the case, because all used DLLs are copied to there when doing a snapshot build. If ext/curl would be build against a static nghttp2 lib, that would no longer be the case. I don't know though, whether any external extension would require nghttp2.dll. If need be, we could patch the build scripts to install nghttp2.dll (I guess; never had a closer look how that is implemented).
PS: if we want to support building against a static nghttp, we probably want to introduce an action parameter defaulting to "dll" for BC reasons (but can be set to "static").