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

Build libcurl against a static nghttp2 library #32

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmb69
Copy link
Contributor

@cmb69 cmb69 commented Nov 27, 2024

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").

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.

1 participant