-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[curl] Support disabling IPv6 #35834
Comments
This is normal for static linkage.
Right. Or you ask pkg-config for
I don't think an ipv6 changes anything about the fact that you have to supply all direct and transitive link libraries when linking executables with static libs. In the right order. |
Have you solved this problem |
"_CFRelease", referenced from: |
The frameworks are only required when the IPv6 is enabled, that's one point. Another point is, if you're going to provide a fat bundled library that gathers all static libraries, you have to tell users to link the extra frameworks as well. For example, I have to build the curl from source like: cmake -B build \
-DENABLE_IPV6=OFF \
-DCURL_ENABLE_SSL=OFF \
-DUSE_LIBIDN2=OFF \
-DCURL_USE_LIBPSL=OFF \
-DCURL_USE_LIBSSH2=OFF \
-DENABLE_UNIX_SOCKETS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_CURL_EXE=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=OFF
cmake --build build -j8 Then I can build an executable like: g++ main.cc -I ./include build/lib/libcurl.a -lz Only the ZLib dependency is required. This compile command works both for Linux and macOS. However, if I installed curl via vcpkg, I have to add |
The key question is whether we want add a feature to control IPv6 support. In 2024. |
I got your points now. From my perspective, the core point is that the frameworks are provided by the system and no extra dependencies are involved with the IPv6 support. Let's close this issue. |
Is your feature request related to a problem? Please describe.
When linking the static library of curl (
libcurl.a
) on macOS, some frameworks need to be linked.Reproduce (on macOS m1 13.6.3):
./vcpkg install 'curl[core]'
Create a simple
main.c
:Then built it via
clang
directly:I have to add the
-framework SystemConfiguration -framework CoreFoundation
flags to make it succeed.Proposed solution
Add an
ipv6
feature as a default feature.Actually this feature is not supported on UWP, see https://github.com/microsoft/vcpkg/blob/f30434939d5516ce764c549ab04e3d23d312180a/ports/curl/portfile.cmake#L59C26-L59C26
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: