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

[curl] Default features not getting disabled, using a specific SSL backend is basically impossible #32838

Closed
glorantq opened this issue Jul 30, 2023 · 2 comments · Fixed by #32852
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@glorantq
Copy link
Contributor

glorantq commented Jul 30, 2023

Is your feature request related to a problem? Please describe.

When in manifest mode, default features cannot be disabled. Having this as a dependency in my vcpkg.json:
{ "name": "curl", "default-features": false },
I see that curl is getting build with the default options still enabled: curl[core,non-http,sectransp,ssl]. This makes it impossible to build only for http usage, and to select a custom SSL backend.

Furthermore, the http2 option also forces the default ssl backend, which again, makes it impossible to use a specific backend exclusively.

Proposed solution

The expected behaviour would be that the default-features switch works, and the http2 option shouldn't depend on the default ssl backend feature, when a custom ssl backend is enabled.

Describe alternatives you've considered

No response

Additional context

Building with options: "mbedtls", "http2", "brotli", "zstd", "tool", output of curl -V
Actual:

curl 8.2.0-DEV (Darwin) libcurl/8.2.0-DEV SecureTransport (mbedTLS/2.28.1) zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 nghttp2/1.55.1
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz MultiSSL NTLM SSL threadsafe UnixSockets zstd

Expected (with modified vcpkg.json for the port):

curl 8.2.0-DEV (Darwin) libcurl/8.2.0-DEV mbedTLS/2.28.1 zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 nghttp2/1.55.1
Release-Date: [unreleased]
Protocols: http https
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe UnixSockets zstd
@glorantq glorantq added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jul 30, 2023
@jimwang118
Copy link
Contributor

The content of the local test file is as follows:
vcpkg.json

{
  "name": "test",
  "version-string": "no-version",
  "dependencies": [
    {
      "name": "curl",
      "default-features": false   
    }
  ]
}

test.cpp

#include <iostream>
#include <fstream>
#include <sstream>
#include <curl/curl.h>

int main()
{
    cout << "verions:" << endl;
    return 0;
}

cmakelists.txt
cmake_minimum_required(VERSION 3.8)

project(test)

# Add source to this project's executable.
add_executable (test "test.cpp")

find_package(CURL CONFIG REQUIRED)
    target_link_libraries(test PRIVATE CURL::libcurl)

After compiling, the result is as expected, and only the curl library is installed locally. The default-features: non-http and ssl will not be installed.
image

@jimwang118 jimwang118 added requires:repro The issue is not currently repro-able and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Jul 31, 2023
@glorantq
Copy link
Contributor Author

Upon further investigation, I see that another dependency, curlpp is causing the mentioned features to be enabled. While it's weird for a cURL wrapper to directly request features for cURL, it's not a bug with the cURL port, sorry.

The issues with the http2 feature forcing the default ssl backend still stand.

@jimwang118 jimwang118 added category:port-bug The issue is with a library, which is something the port should already support and removed requires:repro The issue is not currently repro-able labels Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants