Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923143 - net-misc/asterisk-22.0.0 has implicit function declarations in configure logs
Summary: net-misc/asterisk-22.0.0 has implicit function declarations in configure logs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jaco Kroon
URL:
Whiteboard: false positive
Keywords: PullRequest
Depends on:
Blocks: implicit-in-configure
  Show dependency tree
 
Reported: 2024-01-28 16:30 UTC by Agostino Sarubbo
Modified: 2024-11-04 00:30 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,939.62 KB, text/plain)
2024-01-28 16:30 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-01-28 16:30:06 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2024-01-28 16:30:09 UTC
Created attachment 883476 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-01-28 16:30:10 UTC
Found the following implicit function declarations in configure logs:

config.log:6184 - htonll
config.log:6418 - ntohll
Comment 3 Agostino Sarubbo gentoo-dev 2024-02-06 15:03:40 UTC
ci has reproduced this issue with version 21.1.0 - Updating summary.
Comment 4 Agostino Sarubbo gentoo-dev 2024-08-06 07:00:53 UTC
ci has reproduced this issue with version 21.4.1 - Updating summary.
Comment 5 Jaco Kroon 2024-08-06 08:10:15 UTC
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.
Comment 6 Agostino Sarubbo gentoo-dev 2024-08-13 09:24:19 UTC
ci has reproduced this issue with version 21.4.2 - Updating summary.
Comment 7 Agostino Sarubbo gentoo-dev 2024-09-28 18:05:45 UTC
ci has reproduced this issue with version 21.4.3 - Updating summary.
Comment 8 Agostino Sarubbo gentoo-dev 2024-10-18 15:03:46 UTC
ci has reproduced this issue with version 22.0.0 - Updating summary.
Comment 9 Eli Schwartz gentoo-dev 2024-10-20 16:06:18 UTC
(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).
Comment 10 Eli Schwartz gentoo-dev 2024-10-20 16:17:33 UTC
| #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.
Comment 11 Larry the Git Cow gentoo-dev 2024-10-25 22:55:53 UTC
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(+)