Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894322 - app-arch/sharutils-4.15.2-r2 fails to compile (MUSL-CLANG-SYSTEM): uuencode.c:204:3: error: call to undeclared function bindtextdomain; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Summary: app-arch/sharutils-4.15.2-r2 fails to compile (MUSL-CLANG-SYSTEM): uuencode.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard: uhm...
Keywords: PullRequest
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-02-14 08:38 UTC by Agostino Sarubbo
Modified: 2025-01-23 18:27 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,228.26 KB, text/plain)
2023-02-14 08:38 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 2023-02-14 08:38:15 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-arch/sharutils-4.15.2-r2 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-14 08:38:18 UTC
Created attachment 851010 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-14 08:38:19 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


./gettextP.h:118:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
./gettextP.h:118:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]In file included from 
1a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]./gettextP.h:
: 118warning: :a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]1
:./gettextP.h118::1181::1 :warning:  a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]warning: 
:118:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
encode.c:33:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
encode.c:55:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
encode.c:78:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
warning: ^SWAP (i)a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
uuencode.c:204:3: error: call to undeclared function 'bindtextdomain'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2024-10-22 13:49:03 UTC
That looks like more of a musl related problem... I wonder if -Wimplicit... is really needed for it to fail.
Comment 4 NHO 2025-01-22 13:00:47 UTC
it fails even with -std=gnu17
Comment 5 Agostino Sarubbo gentoo-dev 2025-01-22 13:09:11 UTC
(In reply to NHO from comment #4)
> it fails even with -std=gnu17

Unless I'm mistaken:

-std=gnu17 fixes the issue introduced with c23. This is a modern-c issue so -std=gnu17 has no effect.
Comment 6 Agostino Sarubbo gentoo-dev 2025-01-22 13:10:19 UTC
(In reply to NHO from comment #4)
> it fails even with -std=gnu17

if you are saying that, even with the patch, it fails for c23 issues (with gcc-15), please open another bug.
Comment 7 NHO 2025-01-22 14:24:48 UTC
I missed seeing the patch, and redid it completely differently.
Comment 8 Larry the Git Cow gentoo-dev 2025-01-23 18:27:14 UTC
The bug has been closed via the following commit(s):

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

commit 319c1a011cc04637dc556b3a80d5173a6a01abb0
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-01-22 14:25:36 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2025-01-23 18:27:10 +0000

    app-arch/sharutils: update EAPI 7 -> 8, fix modern C issues
    
    Patch removes which from m4 macros and regenerates configure.
    Patch adds include of lib/gettext.h into only place it can go
    so it works in glibc and musl - in the middle of *-opts.h file,
    after condifional declaration of gettext or inclusion of libintl,
    but before gettext is actually used.
    In other places funky macro dance either undefines gettext or
    uses it before marking it with asm attributes.
    This supercedes other PR, and also lets all code to be aware of all
    the defines from config.h and friends.
    
    Closes: https://bugs.gentoo.org/941724
    Closes: https://bugs.gentoo.org/894322
    Bug: https://bugs.gentoo.org/900248
    Closes: #31725
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40259
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 .../sharutils/files/sharutils-4.15.2-C23.patch     | 50 ++++++++++++++++++++++
 .../sharutils/files/sharutils-4.15.2-dewhich.patch | 32 ++++++++++++++
 ...4.15.2-r2.ebuild => sharutils-4.15.2-r3.ebuild} | 22 +++++++---
 3 files changed, 98 insertions(+), 6 deletions(-)