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

error: ‘CURLOPT_SSL_ENABLE_NPN’ is deprecated: since 7.86.0. #971

Closed
costagabbie opened this issue Oct 20, 2023 · 2 comments · Fixed by #972
Closed

error: ‘CURLOPT_SSL_ENABLE_NPN’ is deprecated: since 7.86.0. #971

costagabbie opened this issue Oct 20, 2023 · 2 comments · Fixed by #972

Comments

@costagabbie
Copy link

Description

Trying to build with cmake --build . --parallel the master branch on Debian 12(amd64) i get the following output
In file included from /home/gcs/Git/cpr/include/cpr/curlholder.h:8, from /home/gcs/Git/cpr/include/cpr/cookies.h:4, from /home/gcs/Git/cpr/include/cpr/response.h:12, from /home/gcs/Git/cpr/include/cpr/async_wrapper.h:8, from /home/gcs/Git/cpr/include/cpr/session.h:12, from /home/gcs/Git/cpr/cpr/session.cpp:1: /home/gcs/Git/cpr/cpr/session.cpp: In member function ‘void cpr::Session::SetSslOptions(const cpr::SslOptions&)’: /home/gcs/Git/cpr/cpr/session.cpp:516:37: error: ‘CURLOPT_SSL_ENABLE_NPN’ is deprecated: since 7.86.0. Has no function [-Werror=deprecated-declarations] 516 | curl_easy_setopt(curl_->handle, CURLOPT_SSL_ENABLE_NPN, options.enable_npn ? ON : OFF); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/curl/curl.h:1901:3: note: declared here 1901 | CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225, | ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors
Didn't seem to have any other issue opened with the same deprecation error

Example/How to Reproduce

On a Debian 12(amd64) system

  1. git clone https://github.com/libcpr/cpr.git
  2. cd cpr && mkdir build && cd build
  3. cmake .. -DCPR_USE_SYSTEM_CURL=ON
  4. cmake --build . --parallel
  5. Error(that is a warning) described in the description happens

Possible Fix

No response

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS:GNU/Linux Debian 12 (amd64)
  • Version: 12
@COM8
Copy link
Member

COM8 commented Oct 21, 2023

Thanks for reporting @costagabbie!

Fixed in #972. Can you confirm?

@costagabbie
Copy link
Author

Thanks for reporting @costagabbie!

Fixed in #972. Can you confirm?

Seems like it is fixed on #972

@COM8 COM8 closed this as completed in #972 Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants