Hi Chris, Thanks for the report.Actually is not needed for a long time, but as MHD is tested by OS-supplied tool, it hasn't been noticed (clang still works with this flag).
You can just delete the offending line in configure.ac and run './bootstrap'. This should rebuild 'configure', if you have required tools installed.
The next MHD version will be released with fix for this problem. -- Evgeny On 21.06.2022 8:06, Chris Guiney wrote:
I've been being vexed by the configure script using -no-cpp-precomp as a CFLAG if the host is found to be macOShttps://git.gnunet.org/libmicrohttpd.git/tree/configure.ac#n765 <https://git.gnunet.org/libmicrohttpd.git/tree/configure.ac#n765>This flag has been removed from gcc, and according to the maintainers, hasn't been needed for many yearshttps://gcc.gnu.org/legacy-ml/gcc/2005-12/msg00368.html <https://gcc.gnu.org/legacy-ml/gcc/2005-12/msg00368.html>I'm hoping that I can either persuade a maintainer to remove it, or provide instruction on how I might remove it -- I've never had to contribute to a GNU project, or contribute to a autoconf/automake build.I find that if I do remove it, and run autoreconf, it's able to configure and compile cleanly.It manifests as an error indicating that it can't find a suitable threading library:CC=/opt/homebrew/bin/gcc-11 ./configure --prefix=/usr/local ... many lines of configure output ... checking for pthread-config... nochecking for threading lib to use with libmicrohttpd (auto)... configure: error: No threading lib is available. Consider installing pthreadsbut after viewing the config.log, one can find: configure:21066: checking for target host OS configure:21075: result: Darwin configure:22010: checking whether /opt/homebrew/bin/gcc-11 is Clang configure:22037: result: noconfigure:22102: checking whether pthreads work with "-pthread" and "-lpthread" configure:22213: /opt/homebrew/bin/gcc-11 -o conftest -no-cpp-precomp -fno-common -g -O2 -pthread conftest.c -lpthread >&5gcc-11: error: unrecognized command-line option '-no-cpp-precomp' For posterity, the output of gcc --version: /opt/homebrew/bin/gcc-11 --version gcc-11 (Homebrew GCC 11.3.0_2) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.I should also note that it does build with clang -- I'm intentionally trying to use gccAny help is appreciated, Chris
OpenPGP_signature
Description: OpenPGP digital signature