[Bug debuginfod/29926] New: debuginfod using deprecated curl (since 7.55.0) curl API, fails to build with 7.87.0

2022-12-21 Thread andrew at ishiboo dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29926

Bug ID: 29926
   Summary: debuginfod using deprecated curl (since 7.55.0) curl
API, fails to build with 7.87.0
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: debuginfod
  Assignee: unassigned at sourceware dot org
  Reporter: andrew at ishiboo dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

The debuginfod build fails because it is using deprecated curl APIs that were
marked deprecated in 7.55 and hard-deprecated in 7.87, triggering
-Werror=deprecated-declarations errors:


../../debuginfod/debuginfod-client.c: In function 'debuginfod_query_server':
../../debuginfod/debuginfod-client.c:895:15: error: 'CURLINFO_SIZE_DOWNLOAD' is
deprecated: since 7.55.0. Use CURLINFO_SIZE_DOWNLOAD_T
[-Werror=deprecated-declarations]
  895 |   curl_res = curl_easy_getinfo(target_handle,
  |   ^~~~
In file included from ../../debuginfod/debuginfod-client.c:86:
/opt/bbinfra/include/curl/curl.h:2836:3: note: declared here
 2836 |   CURLINFO_SIZE_DOWNLOAD
  |   ^~
../../debuginfod/debuginfod-client.c:913:15: error:
'CURLINFO_CONTENT_LENGTH_DOWNLOAD' is deprecated: since 7.55.0. Use
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Werror=deprecated-declarations]
  913 |   curl_res = curl_easy_getinfo(target_handle,
  |   ^~~~
In file included from ../../debuginfod/debuginfod-client.c:86:
/opt/bbinfra/include/curl/curl.h:2853:3: note: declared here
 2853 |   CURLINFO_CONTENT_LENGTH_DOWNLOAD
  |   ^~~~
../../debuginfod/debuginfod-client.c: In function 'debuginfod_query_server':
../../debuginfod/debuginfod-client.c:895:15: error: 'CURLINFO_SIZE_DOWNLOAD' is
deprecated: since 7.55.0. Use CURLINFO_SIZE_DOWNLOAD_T
[-Werror=deprecated-declarations]
  895 |   curl_res = curl_easy_getinfo(target_handle,
  |   ^~~~
In file included from ../../debuginfod/debuginfod-client.c:86:
/opt/bbinfra/include/curl/curl.h:2836:3: note: declared here
 2836 |   CURLINFO_SIZE_DOWNLOAD
  |   ^~
../../debuginfod/debuginfod-client.c:913:15: error:
'CURLINFO_CONTENT_LENGTH_DOWNLOAD' is deprecated: since 7.55.0. Use
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Werror=deprecated-declarations]
  913 |   curl_res = curl_easy_getinfo(target_handle,
  |   ^~~~
In file included from ../../debuginfod/debuginfod-client.c:86:
/opt/bbinfra/include/curl/curl.h:2853:3: note: declared here
 2853 |   CURLINFO_CONTENT_LENGTH_DOWNLOAD
  |   ^~~~
cc1: all warnings being treated as errors


This is due to the code having an `#ifdef` fallback on the old identifiers that
must be removed to compile with 7.87.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug debuginfod/29926] debuginfod using deprecated curl (since 7.55.0) curl API, fails to build with 7.87.0

2022-12-21 Thread andrew at ishiboo dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29926

--- Comment #1 from Andrew Paprocki  ---
Created attachment 14535
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14535&action=edit
Fix selection of non-deprecated Curl API

The `CURLINFO_SIZE_DOWNLOAD_T` and `CURLINFO_CONTENT_LENGTH_DOWNLOAD_T`
identifiers are `enum`s, not pre-processor definitions, so the current
`#ifdef` logic is not selecting the newer API.  This results in the
older identifiers being used and they now generate errors when compiled
against Curl 7.87, which has silently deprecated them, causing GCC to
emit `-Werror=deprecated-declarations`.

Instead, the newer identifiers were added in Curl 7.55, so explicitly
check for `CURL_AT_LEAST_VERSION(7, 55, 0)` instead of the current
logic.  This eliminates the error when compiling against Curl 7.87.

Ref: https://github.com/curl/curl/pull/1511

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug debuginfod/29926] debuginfod using deprecated curl (since 7.55.0) API, fails to build with 7.87.0

2022-12-21 Thread andrew at ishiboo dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29926

Andrew Paprocki  changed:

   What|Removed |Added

Summary|debuginfod using deprecated |debuginfod using deprecated
   |curl (since 7.55.0) curl|curl (since 7.55.0) API,
   |API, fails to build with|fails to build with 7.87.0
   |7.87.0  |

-- 
You are receiving this mail because:
You are on the CC list for the bug.