View Issue Details

IDProjectCategoryView StatusLast Update
0006078libmicrohttpdbuild systempublic2021-09-02 17:54
Reporterbcs Assigned ToChristian Grothoff  
Status closedResolutionfixed 
Product Version0.9.69 
Target Version0.9.70Fixed in Version0.9.70 
Summary0006078: config fails due to -Werror=unused-but-set-parameter while looking for pthreads
Descriptiontl;dr; My problem goes away if I patch in a more recent version of m4/ax_pthread.m4:

Can that be done at head?


One of the config steps runs a test compile/link that fails with the following error:

conftest.c: In function 'routine':
conftest.c:36:51: error: parameter 'a' set but not used [-Werror=unused-but-set-parameter]
                         static void routine(void *a) { a = 0; }

This in turn make configure assert that pthreads is not available and halt the build.
Steps To ReproduceI encountered this while trying to get a build working for an existing bazel project and I'm still trying to sort out exactly what it's doing different. I *suspect* it's caused by passing -Werror=all or something like that, but I've not been able to sort out exactly what it's doing. However I suspect it would reproduce like this:

# BUILD.microhttpd
load("@rules_foreign_cc//tools/build_defs:configure.bzl", "configure_make")
    name = "microhttpd",
    lib_source = "libmicrohttpd-0.9.69",
    make_commands = ["make"],
    visibility = ["//visibility:public"],

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
    name = "org_gnu_microhttpd",
    urls = [""],
    sha256 = "fb9b6b148b787493e637d3083588711e65cbcb726fa02cee2cd543c5de27e37e",
    build_file = "@//:BUILD.microhttpd",

    name = "rules_foreign_cc",
    path = "/home/bcs/Documents/rules_foreign_cc",
    remote = "git://",
    commit = "ed3db61a55c13da311d875460938c42ee8bbc2a5",
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")

bazel build @org_gnu_microhttpd//:microhttpd
TagsNo tags attached.


Christian Grothoff

2020-02-07 14:30

manager   ~0015315

Fixed in 6da31a1c..44c32e4c. Thanks for reporting and investigating!

Christian Grothoff

2021-09-02 17:54

manager   ~0018170

Fix committed to master branch.

Related Changesets

libmicrohttpd: master 44c32e4c

2020-02-07 14:26:22

Christian Grothoff

Details Diff
fix 0006078 Affected Issues
mod - m4/ax_pthread.m4 Diff File

Issue History

Date Modified Username Field Change
2020-02-05 06:14 bcs New Issue
2020-02-07 14:16 Christian Grothoff Assigned To => Christian Grothoff
2020-02-07 14:16 Christian Grothoff Status new => assigned
2020-02-07 14:30 Christian Grothoff Status assigned => resolved
2020-02-07 14:30 Christian Grothoff Resolution open => fixed
2020-02-07 14:30 Christian Grothoff Fixed in Version => 0.9.70
2020-02-07 14:30 Christian Grothoff Note Added: 0015315
2020-02-07 14:30 Christian Grothoff Target Version => 0.9.70
2020-02-08 22:03 Christian Grothoff Status resolved => closed
2021-09-02 17:54 Christian Grothoff Changeset attached => libmicrohttpd master 44c32e4c
2021-09-02 17:54 Christian Grothoff Note Added: 0018170