Bug 26528 - Build failure with libmicrohttpd-0.9.71
Summary: Build failure with libmicrohttpd-0.9.71
Status: RESOLVED DUPLICATE of bug 26195
Alias: None
Product: elfutils
Classification: Unclassified
Component: debuginfod (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-24 04:29 UTC by Tim Haines
Modified: 2020-08-24 22:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Haines 2020-08-24 04:29:03 UTC
libmicrohttpd changed the return types of many of their interfaces in 0.9.71. See https://git.gnunet.org/libmicrohttpd.git/commit/?id=6347f514aa2388e774d5bf356df8046864e5f73c and https://git.gnunet.org/libmicrohttpd.git/commit/?id=de872dea2d88f183c3f434c694acdcdb373f639c for details.

This is causing build failures because the callback 'handler_cb' in debuginfod.cxx no longer has the correct return type.

The note from libmicrohttpd suggests a way forward:

Introduce `enum MHD_Result` for #MHD_YES/#MHD_NO to avoid using 'int' so much.
Note that this change WILL cause compiler warnings until (most) MHD callbacks
in application code change their return type from 'int' to 'enum MHD_Result'.
That said, avoiding possible confusions of different enums is going to make
the code more robust in the future. For conditional compilation, test
for "MHD_VERSION >= 0x00097002".
Comment 1 Mark Wielaard 2020-08-24 07:24:17 UTC
Does the following commit help?

commit acb453851c9e6c46531b70fda7396885c0e7e1db
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Thu Jul 2 14:52:48 2020 +0000

    PR26195: adapt debuginfod to API change in libmicrohttpd-0.9.71
    
    To make our code build with -Werror as well as against older libmicrohttpd,
    we must conditionalize the data type (int vs. enum) returned by callbacks
    and some mhd functions.
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

If not, could you show the specific warnings you are getting?
Comment 2 Tim Haines 2020-08-24 22:08:57 UTC
I'm not sure how I missed that commit when I was searching for this. I verified that patch does fix the compilation issue for me.

*** This bug has been marked as a duplicate of bug 26195 ***