https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-libs/libmicrohttpd-0.9.77 has implicit function declarations in configure logs. Discovered on: amd64 (internal ref: clang-lld_tinderbox) System: CLANG-LLD (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CLANG-LLD) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#QA0072
Created attachment 884183 [details] build.log build log and emerge --info
Found the following implicit function declarations in configure logs: config.log:597 - stpncpy
Seems to be false positive as in https://bugs.gentoo.org/898662 Can I see configure.log? Building clang is not a quick process.
Created attachment 893689 [details] config.log with clang configure:7173: Checked features work with extensions and with _XOPEN_SOURCE=700 configure:7185: clang -c -march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -Wformat -Werror=format-security -Werror=implicit-function-declarati on -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types conftest.c >&5 conftest.c:84:10: error: call to undeclared library function 'stpncpy' with type 'char *(char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 84 | (void) stpncpy; | ^ conftest.c:84:10: note: include the header <string.h> or explicitly provide a declaration for 'stpncpy' conftest.c:87:10: error: use of undeclared identifier 'strnlen' 87 | (void) strnlen; | ^ conftest.c:93:10: error: use of undeclared identifier 'wcsnlen' 93 | (void) wcsnlen; | ^ conftest.c:107:10: error: use of undeclared identifier 'renameat' 107 | (void) renameat; | ^ conftest.c:111:10: error: use of undeclared identifier 'getline'; did you mean 'inline'? 111 | (void) getline; | ^~~~~~~ | inline conftest.c:111:10: error: expected expression conftest.c:123:10: error: use of undeclared identifier 'unsetenv' 123 | (void) unsetenv; | ^ 7 errors generated. configure:7185: $? = 1 Attached is full log.
And yet... | /* Start of MHD basic test includes */ | #include <stdio.h> | #include <sys/types.h> | #include <wchar.h> | #include <stdlib.h> | #include <string.h> | #include <strings.h> | #include <stdint.h> | #include <fcntl.h> | #include <time.h> | #include <unistd.h> | /* End of MHD basic test includes */ | | | /* Check will be passed if ALL features are available | * and failed if ANY feature is not available. */ | int main() | { | | #ifndef stpncpy | (void) stpncpy; | #endif
Yep, this is obviously false-positive detection. Constructions like ---- #ifndef stpncpy (void) stpncpy; #endif ---- are designed to fail even with implicit declarations.
I've opened a related portage bug: https://bugs.gentoo.org/932457
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9165284da18643f84258374610687a347937face commit 9165284da18643f84258374610687a347937face Author: Karlson2k (Evgeny Grin) <k2k@narod.ru> AuthorDate: 2024-05-22 11:51:56 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-22 17:02:45 +0000 net-libs/libmicrohttpd: mute QA warning with clang This is actually a workaround for clang bug. Closes: https://bugs.gentoo.org/923760 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/gentoo/pull/36774 Signed-off-by: Sam James <sam@gentoo.org> net-libs/libmicrohttpd/libmicrohttpd-0.9.76.ebuild | 2 ++ net-libs/libmicrohttpd/libmicrohttpd-0.9.77.ebuild | 6 ++++++ net-libs/libmicrohttpd/libmicrohttpd-1.0.1.ebuild | 6 ++++++ 3 files changed, 14 insertions(+)
Agostino, please, re-open the bug if any additional warnings are produced by clang.