-
Notifications
You must be signed in to change notification settings - Fork 298
Improve linking #2444
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
base: main
Are you sure you want to change the base?
Improve linking #2444
Conversation
Add libz dependency for curl rather than getting it through libarchive and fix overlinking on macOS where --as-needed isn't available.
I don t have a macos to test but I beleive this should break the build when built with an external libcurl? this is support was added for building on macos |
@kevemueller maybe you can help? |
It should be fine. I had added the additional libraries in #2442, but they're only needed when using the static internal build of libcurl, so I just adjusted them in this PR. I tried now with
Without this patch, we get overlinking when using external libcurl:
|
Hi @bapt, External libcurl was added by you upon my request, as the bundled libcurl never compiled under macOS, it used a pre-generated configuration header, instead of running configure and obtaining proper configuration values for use with macOS. macOS comes with libcurl and so far we always linked against the system provided libcurl on macOS. I cannot recall anybody having issues with that. It is also unclear to me if @mohd-akram uses macOS system clang or a recent (brew) clang. We used a recent clang for good reason (e.g. all the sanitizers are only working with brew clang). All-in-all, I am happy to see macOS improvements, but I would start with restoring the CI build. System clang (and automake fixes for it) as well as bundled libcurl can be all made alternatives in the CI build and automatically tested. Unfortunately I continue not to have time to delve into this, so even more happy to see somebody else interested in this as well. Cheers, Keve |
The bundled libcurl works as of #2442, but it requires pkg/external/libcurl/curl_config.h Lines 457 to 458 in 367b63e
Alternatively, it can be
Actually this patch fixes #2442 which added macOS frameworks in all cases. With this PR, they are only added when the static build of curl is used. It doesn't seem possible to use the system libcurl from what I can tell. pkg-config is used to get the flags and that's not shipped with macOS. |
Add libz dependency for curl rather than getting it through libarchive and fix overlinking on macOS where --as-needed isn't available.