Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 897856 - net-im/toxic-0.11.3 fails to compile (MUSL-CLANG-SYSTEM): chat_commands.c:66:9: error: call to undeclared function strcasecmp; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Summary: net-im/toxic-0.11.3 fails to compile (MUSL-CLANG-SYSTEM): chat_commands.c:66:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: JoMull01
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-02-26 08:17 UTC by Agostino Sarubbo
Modified: 2023-04-10 08:10 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,47.37 KB, text/plain)
2023-02-26 08:17 UTC, Agostino Sarubbo
Details
Fixed Ebuild (toxic-0.11.3.ebuild,3.12 KB, text/plain)
2023-03-07 22:15 UTC, JoMull01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-26 08:17:27 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-im/toxic-0.11.3 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-26 08:17:29 UTC
Created attachment 854758 [details]
build.log

build log and emerge --info
Comment 2 JoMull01 2023-03-07 22:15:30 UTC
Created attachment 856674 [details]
Fixed Ebuild

It seems that the function in question is included in strings.h, not string.h. The attached ebuild modifies the CFLAGS variable to include the strings.h file. Could you use the ebuild and let me know if it fixes the problem. (I don't have a musl system at my disposal. If desired, I could build one though.) Thanks.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-08 03:03:38 UTC
Two comments:
1. Please submit a github PR or git-send-email a patch to the gentoo proxy maint mailing list, or failing that (least preferable as it's easy to miss) attach a 'git am-able patch' (using git-format-patch) on this bug.

2. This should be fixed with a patch to the code (and sent upstream), not via an -include.
Comment 4 JoMull01 2023-03-08 13:49:20 UTC
Thank you for your feedback.

1. I had not wanted to open a PR because I was uncertain if this ebuild would fix the issue. However, if the standard procedure is to hash out the functionality of bug fixes in a PR, then I will do that henceforth.

2. Given the nature of the issue, an -include statement seems more elegant than a patch since it requires less modification of the Gentoo tree. That is, one line changed in the ebuild versus a patch file and a new line in the ebuild. However, if a patch is strongly preferred then I will make one. Regarding upstream: since upstream uses Github I will simply open a PR with the changes so a patch file is not necessary for them.
Comment 5 Larry the Git Cow gentoo-dev 2023-04-10 08:10:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0540c6ca7d2220a420537c68666e6dde3621585

commit f0540c6ca7d2220a420537c68666e6dde3621585
Author:     Josiah Mullins <JoMull01@protonmail.com>
AuthorDate: 2023-03-29 15:35:49 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-04-10 08:10:02 +0000

    net-im/toxic: Fixes implicit function declaration
    
    This commit adds an include statement and a macro
    declaration to the USER_CFLAGS variable. The include
    statement includes strings.h for strcasecmp (see man
    strcasecmp). The macro declaration causes strcasestr
    to be included (see man strcasestr).
    
    Closes: https://bugs.gentoo.org/897856
    Signed-off-by: Josiah Mullins <JoMull01@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/30400
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-im/toxic/{toxic-0.11.1.ebuild => toxic-0.11.1-r1.ebuild} | 4 +++-
 net-im/toxic/{toxic-0.11.3.ebuild => toxic-0.11.3-r1.ebuild} | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)