https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-misc/asterisk-20.5.2 has implicit function declarations in configure logs. Discovered on: amd64 (internal ref: gcc14_tinderbox) System: GCC-14-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-14) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#QA0072
Created attachment 883476 [details] build.log build log and emerge --info
Found the following implicit function declarations in configure logs: config.log:6184 - htonll config.log:6418 - ntohll
ci has reproduced this issue with version 21.1.0 - Updating summary.
ci has reproduced this issue with version 21.4.1 - Updating summary.
Advise on this one? htonll isn't available generally, so here the test is to see if it's available. If it's not available (as is the case on Linux) a compat variant is provided by asterisk itself. So advise on the best possible fix here would be appreciated.
ci has reproduced this issue with version 21.4.2 - Updating summary.
ci has reproduced this issue with version 21.4.3 - Updating summary.
ci has reproduced this issue with version 22.0.0 - Updating summary.
(In reply to Jaco Kroon from comment #5) > Advise on this one? htonll isn't available generally, so here the test is > to see if it's available. If it's not available (as is the case on Linux) a > compat variant is provided by asterisk itself. So advise on the best > possible fix here would be appreciated. The question is whether the test correctly detects that it isn't available. Not all tests are well written -- sometimes they accidentally pass because the compiler didn't default-error on -Wimplicit-function-declaration. The reverse is also possible -- sometimes tests are written that assume they will pass because a function which isn't being tested triggers -Wimplicit-function-declaration, such as exit() -- that's not the case here. If you verified that the configure tests produce the correct results on both gcc 13 and gcc 14 then add the function itself to the ebuild array QA_CONFIG_IMPL_DECL_SKIP (grep gentoo.git for existing examples, if you like).
| #include <arpa/inet.h> | int | main (void) | { | return htonll(0); | ; | return 0; | } conftest.c: In function 'main': conftest.c:223:8: error: implicit declaration of function 'htonll'; did you mean 'htonl'? [-Werror=implicit-function-declaration] 223 | return htonll(0); | ^~~~~~ | htonl cc1: some warnings being treated as errors configure:19101: $? = 1 This will indeed fail correctly. It correctly includes the header needed to expose this symbol, which is the important bit. For systems such as linux where it isn't defined there, the configure test still fails on gcc 13, due to: conftest.c: In function 'main': conftest.c:223:8: warning: implicit declaration of function 'htonll'; did you mean 'htonl'? [-Wimplicit-function-declaration] 223 | return htonll(0); | ^~~~~~ | htonl /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-misc/asterisk-22.0.0/temp/ccjbDNy3.ltrans0.ltrans.o: in function `main': <artificial>:(.text.startup+0x31): undefined reference to `htonll' collect2: error: ld returned 1 exit status configure:19101: $? = 1 So yes -- this should be skipped via the QA variable for marking this as a false positive.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a871f99039515c78a2d3c968e18894480d516e04 commit a871f99039515c78a2d3c968e18894480d516e04 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2024-10-25 18:38:12 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-10-25 22:55:35 +0000 net-misc/asterisk: add 22.0.0-r1 Closes: https://bugs.gentoo.org/942045 Closes: https://bugs.gentoo.org/923143 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/39111 Signed-off-by: Matt Jolly <kangie@gentoo.org> net-misc/asterisk/asterisk-22.0.0-r1.ebuild | 358 ++++++++++++++++++++++++++++ 1 file changed, 358 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b214af8bd24a07478b2759aae16ce8e74cfe1230 commit b214af8bd24a07478b2759aae16ce8e74cfe1230 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2024-10-25 18:36:43 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-10-25 22:55:35 +0000 net-misc/asterisk: 21.5.0 -> 21.5.0-r1 Bug: https://bugs.gentoo.org/942045 Bug: https://bugs.gentoo.org/923143 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Signed-off-by: Matt Jolly <kangie@gentoo.org> .../asterisk/{asterisk-21.5.0.ebuild => asterisk-21.5.0-r1.ebuild} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32bf3840569324c2971ae8935f00e9111775678e commit 32bf3840569324c2971ae8935f00e9111775678e Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2024-10-25 18:31:42 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-10-25 22:55:34 +0000 net-misc/asterisk: add 20.10.0-r1 Bug: https://bugs.gentoo.org/942045 Bug: https://bugs.gentoo.org/923143 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Signed-off-by: Matt Jolly <kangie@gentoo.org> net-misc/asterisk/asterisk-20.10.0-r1.ebuild | 371 +++++++++++++++++++++++++++ 1 file changed, 371 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12a6a2be3b84a7ef7a50c2935e87ba80995e36fe commit 12a6a2be3b84a7ef7a50c2935e87ba80995e36fe Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2024-10-25 18:15:53 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-10-25 22:55:34 +0000 net-misc/asterisk: add 18.25.0-r1 Bug: https://bugs.gentoo.org/942045 Bug: https://bugs.gentoo.org/923143 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Signed-off-by: Matt Jolly <kangie@gentoo.org> net-misc/asterisk/asterisk-18.25.0-r1.ebuild | 375 +++++++++++++++++++++++++++ 1 file changed, 375 insertions(+)