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

Move from some deprecations in cURL since 7.56.0 #867

Open
botanegg opened this issue Mar 2, 2025 · 2 comments · May be fixed by #883
Open

Move from some deprecations in cURL since 7.56.0 #867

botanegg opened this issue Mar 2, 2025 · 2 comments · May be fixed by #883

Comments

@botanegg
Copy link
Contributor

botanegg commented Mar 2, 2025

Add a description

We have a lot of deprecated warnings during the build.

Related to https://t.me/userver_ru/31492

deprecated logs
In file included from .../userver/core/src/clients/http/error.cpp:5:
.../userver/core/src/curl-ev/error_code.hpp:132:24: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_OK’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  132 |     kSuccess = native::CURL_FORMADD_OK,
      |                        ^~~~~~~~~~~~~~~
In file included from .../userver/core/src/curl-ev/native.hpp:40,
                 from .../userver/core/src/curl-ev/error_code.hpp:14:
/usr/include/x86_64-linux-gnu/curl/curl.h:2552:3: note: declared here
 2552 |   CURL_FORMADD_OK             CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
      |   ^~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:133:23: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_MEMORY’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  133 |     kMemory = native::CURL_FORMADD_MEMORY,
      |                       ^~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2554:3: note: declared here
 2554 |   CURL_FORMADD_MEMORY         CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:134:28: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_OPTION_TWICE’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  134 |     kOptionTwice = native::CURL_FORMADD_OPTION_TWICE,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2555:3: note: declared here
 2555 |   CURL_FORMADD_OPTION_TWICE   CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:135:21: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_NULL’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  135 |     kNull = native::CURL_FORMADD_NULL,
      |                     ^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2556:3: note: declared here
 2556 |   CURL_FORMADD_NULL           CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:136:30: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_UNKNOWN_OPTION’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  136 |     kUnknownOption = native::CURL_FORMADD_UNKNOWN_OPTION,
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2557:3: note: declared here
 2557 |   CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:137:27: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_INCOMPLETE’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  137 |     kIncomplete = native::CURL_FORMADD_INCOMPLETE,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2558:3: note: declared here
 2558 |   CURL_FORMADD_INCOMPLETE     CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:138:29: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_ILLEGAL_ARRAY’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  138 |     kIllegalArray = native::CURL_FORMADD_ILLEGAL_ARRAY,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2559:3: note: declared here
 2559 |   CURL_FORMADD_ILLEGAL_ARRAY  CURL_DEPRECATED(7.56.0, ""),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
.../userver/core/src/curl-ev/error_code.hpp:139:25: warning: ‘userver::v2_8_rc::curl::native::CURL_FORMADD_DISABLED’ is deprecated: since 7.56.0.  [-Wdeprecated-declarations]
  139 |     kDisabled = native::CURL_FORMADD_DISABLED
      |                         ^~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2561:3: note: declared here
 2561 |   CURL_FORMADD_DISABLED       CURL_DEPRECATED(7.56.0, ""),

Seems like even Ubuntu 18.04 have cURL 7.58.0
It should be possible to move from curl_formfree to curl_mime_init and etc..

@botanegg botanegg changed the title ‘userver::curl::native::CURL_<SOMETHING>’ is deprecated: since 7.56.0. Move from some deprecations in cURL since 7.56.0 Mar 2, 2025
@byian
Copy link

byian commented Mar 10, 2025

Hi there,

I have had some time to research this task and have found that this is only possible on versions 7.87.0 and higher.

Earlier versions will not allow us to keep the current interface of Request creation, because curl_mime_init prior to 7.87.0 required a strict binding to the curl easy handle. More info can be found here - curl/curl#9927

If it is reasonable to raise the minimum version of libcurl to 7.87.0 - I can prepare a PR.

@botanegg
Copy link
Contributor Author

https://serverpilot.io/docs/upgrading-curl-on-ubuntu-lts/

Seems like it is too early to set minimum version to Ubuntu 24.04 (but we have a base image with 24.04)

@apolukhin opinion needed here

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 a pull request may close this issue.

2 participants