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] Requesting [core,mbedtls] still builds and depends on openssl #36713

Closed
genotrance opened this issue Feb 12, 2024 · 10 comments
Closed

[curl] Requesting [core,mbedtls] still builds and depends on openssl #36713

genotrance opened this issue Feb 12, 2024 · 10 comments
Assignees
Labels
category:question This issue is a question

Comments

@genotrance
Copy link

Describe the bug
./vcpkg install curl[core,mbedtls]

Environment

  • OS: Tested on Alpine Linux musl
  • Compiler: gcc 9.3.0

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install curl[core,mbedtls]

Expected behavior
I expect to depend 100% on mbedtls and have no dependencies on openssl.

Failure logs

  • There is no failure, just that the openssl binaries are also built and required at runtime.
@autoantwort
Copy link
Contributor

This is not possible until something like #22216 gets implemented since these feature are options and not additive

@dg0yt
Copy link
Contributor

dg0yt commented Feb 12, 2024

Cannot reproduce.

$ ./vcpkg depend-info curl[core,mbedtls]
vcpkg-cmake: 
vcpkg-cmake-config: 
mbedtls: vcpkg-cmake, vcpkg-cmake-config
zlib: vcpkg-cmake
curl[mbedtls]: mbedtls, vcpkg-cmake, vcpkg-cmake-config, zlib

@genotrance
Copy link
Author

My mistake - I reduced the feature list too much. The following works as expected:

./vcpkg install curl[core,mbedtls]

However, if you include http2, it drags in openssl.

 ./vcpkg install curl[core,http2,mbedtls] --recurse
Computing installation plan...
The following packages will be built and installed:
    curl[core,http2,mbedtls,openssl,ssl]:x64-linux@8.6.0
  * mbedtls:x64-linux@2.28.7
  * nghttp2:x64-linux@1.59.0
  * openssl:x64-linux@3.2.1
  * zlib:x64-linux@1.3.1

I didn't see any feature options in the nghttp2 package.

@jimwang118 jimwang118 self-assigned this Feb 18, 2024
@jimwang118
Copy link
Contributor

I didn't see any feature options in the nghttp2 package.

Yes, nghttp2 does not have any features.

@jimwang118 jimwang118 added the category:question This issue is a question label Feb 18, 2024
@dg0yt
Copy link
Contributor

dg0yt commented Feb 18, 2024

I didn't see any feature options in the nghttp2 package.

Yes, nghttp2 does not have any features.

What does this mean to the original problem?
Why is this issue now in category:question now?

curl[http2] is declared to depend on curl[core,ssl] which selects the default SSL backend, curl[openssl] on linux.
If possible, remove the dependency on curl[core,ssl]. It restricts choice of an alternative SSL backend.

@jimwang118
Copy link
Contributor

curl[http2] is declared to depend on curl[core,ssl] which selects the default SSL backend, curl[openssl] on linux. If possible, remove the dependency on curl[core,ssl]. It restricts choice of an alternative SSL backend.

Can curl[http2] delete the dependent feature ssl?

@dg0yt
Copy link
Contributor

dg0yt commented Feb 18, 2024

Try!

@jimwang118 jimwang118 added category:port-bug The issue is with a library, which is something the port should already support and removed category:question This issue is a question labels Feb 19, 2024
@jimwang118
Copy link
Contributor

Try!

After removing the ssl dependency, there is no problem compiling and using. I will submit a PR to fix it.

@jimwang118
Copy link
Contributor

The upstream explains that you need to rely on openssl when using http2, and we need to ensure the port's versatility. You can remove http2's dependence on ssl locally yourself. https://github.com/curl/curl/blob/d5b0fee39a7898dac42cb4fc64e35f5bc085e766/docs/HTTP2.md

@genotrance
Copy link
Author

The link is not clear but the following note from nghttp2's repo clarifies:

OpenSSL >= 1.1.1; or LibreSSL >= 3.8.1; or aws-lc >= 1.19.0; or BoringSSL

Doesn't look like nghttp2 even supports mbedtls right now.

I'm new to vcpkg and this was a surprise to me. Might be good to notify in some way but this can happen with any package with any dependency. It would require vcpkg to support all combinations of features for every package (libressl and wolfssl are already in vcpkg so you would want nghttp2 to have those as features) and track which features are alternatives and reduce redundancy.

Closing this this is not feasible for mbedtls specifically but the general issue still holds.

@jimwang118 jimwang118 added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants