https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-libs/libmicrohttpd-0.9.75 has implicit function declarations in configure logs. Discovered on: amd64 (internal ref: ci) NOTE: See also: https://bugs.gentoo.org/898488#c4.
Created attachment 855512 [details] build.log build log and emerge --info
These implicit declarations and few other detection issues related to new compiler settings were partially fixed already in git master. Others will be fixed soon and included in the next release.
All these three possible problems reported by QA are false positives. See: * for 'gethrtime' - https://git.gnunet.org/libmicrohttpd.git/tree/configure.ac?h=v0.9.75#n1825 * for 'sysctl' - https://git.gnunet.org/libmicrohttpd.git/tree/configure.ac?h=v0.9.75#n1934 *for 'sysctlbyname' - https://git.gnunet.org/libmicrohttpd.git/tree/configure.ac?h=v0.9.75#n1947 and https://git.gnunet.org/libmicrohttpd.git/tree/m4/mhd_check_func.m4 The configure script does not rely on implicit declarations for these functions, while "implicit declaration" is a natural warning for functions not declared in headers. This bug should be closed as INVALID.
I'll QA_CONFIG_IMPL_DECL_SKIP to libmicrohttpd ebuild. However there are many functions checked by configure. Some of them may be not available on specific platforms, while other functions may be not available on other platforms. Should I add all functions correctly checked by 'configure' to the exclusion list? I could be very large list.
(In reply to Karlson2k from comment #3) > The configure script does not rely on implicit declarations for these > functions, while "implicit declaration" is a natural warning for functions > not declared in headers. Are you sure that configure yields correct results with clang-16? Even if they're irrelevant to the check at hand, make sure that these declarations don't cause the check to flip the result.
This configure script does not rely on implicit declarations. Any simple code like int main(void) { non_exisiting_function(); return 0; } will emit the warning about implicit declaration of non_exisiting_function. This will fail on compile or link stage, depending on build flags. And the warning or error for implicit declaration should be fine as this is the way to correctly check for function presence on the platform. libmicrohttpd configure script uses right headers. For example for gethrtime() check includes <sys/time.h> and <time.h> which must declare this function if it is present on system. See https://git.gnunet.org/libmicrohttpd.git/tree/configure.ac?h=v0.9.75#n1825 I would prefer to not spoil ebuild files with *all* functions correctly checked by configure, but which could be potentially absent on some particular system.
The sysctl() check looks suspicious.
It is a syscall, not utility. This is correct, see https://linux.die.net/man/2/sysctl libmicrohttpd uses it on FreeBSD and other *BSD platforms.
ci has reproduced this issue with version 0.9.76 - Updating summary.
QA reports are false positives. libmicrohttpd detects all functions correctly with clang-16, clang-17 (current development version), gcc-12 -Werror=implicit-function-declaration,implicit-int There is no problem with libmicrohttpd to fix.
(In reply to Karlson2k from comment #10) > QA reports are false positives. > > libmicrohttpd detects all functions correctly with clang-16, clang-17 > (current development version), gcc-12 > -Werror=implicit-function-declaration,implicit-int > There is no problem with libmicrohttpd to fix. Then add them to the whitelist?
Three functions "detected" are not the complete list. With other settings or environment configure may detect more missing function. Add to whitelist all functions detected by configure? Then what's the reason to have this kind of such "problem" detection? It would make more sense to just whitelist this configure.
This is false positive warnings. libmicrohttpd always uses correct headers when checking for functions in configure. If function is not declared then compiler warns on implicit declaration and then linker fail or (depending on compiler and flags) compiler stops with error. In any case the check fails. libmicrohttpd does not rely on any implicit declaration, neither in configure nor in building process. libmicrohttpd uses a lot of correct checks for functions presence on the platform. To workarounds false positive warnings it is required to add all checks to QA exclude list, but in such case exclude list makes no sense (if everything that is checked needs to be excluded from check). libmicrohttpd detects all functions correctly with any gcc version (checked from 3.4 up to the latest), including versions 10.4, 11.3, 12.3 and 13.1. clang works fine for any versions from 3.3 up to 16.0.2. All checks work correctly with -Werror=implicit-function-declaration,implicit-int and without it. There is nothing to fix in libmicrohttpd.
(In reply to Karlson2k from comment #13) > There is nothing to fix in libmicrohttpd. You've made that clear. So please set the exclude list to avoid noise.
OK, I'm giving up. :)
If you're asserting it's fine, set the thing to silence it? I don't get how that's controversial. Note that you can use .* if you insist.
I've added all custom checks that may potentially trigger QA warnings.
I wasn't aware about wildcard masking capability, so I used specific checks masking, which is more future-proof. Anyway, in next version configure will use double checks for every function: first check for declaration only and then check whether linker succeed. Configure works longer, but it should not generate any false positive warnings and probably it may improve configure results debugging.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a566d1a5c7f9d722369d0b511f8a881b7804e2ef commit a566d1a5c7f9d722369d0b511f8a881b7804e2ef Author: Karlson2k (Evgeny Grin) <k2k@narod.ru> AuthorDate: 2023-05-09 14:06:11 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-10 19:42:33 +0000 net-libs/libmicrohttpd: fixed false positive QA warnings Closes: https://bugs.gentoo.org/898662 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/gentoo/pull/30954 Signed-off-by: Sam James <sam@gentoo.org> net-libs/libmicrohttpd/libmicrohttpd-0.9.75.ebuild | 38 ++++++++++++++++++++++ net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild | 38 ++++++++++++++++++++++ 2 files changed, 76 insertions(+)