Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908414 - media-sound/deadbeef-1.9.5-r2 - error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x
Summary: media-sound/deadbeef-1.9.5-r2 - error: a function definition without a protot...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords: PullRequest, UPSTREAM
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2023-06-12 16:15 UTC by orbea
Modified: 2023-12-19 06:41 UTC (History)
0 users

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


Attachments
Build log. (build.log,354.25 KB, text/x-log)
2023-06-12 16:15 UTC, orbea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description orbea 2023-06-12 16:15:00 UTC
Created attachment 863741 [details]
Build log.

Deadbeef fails to build with clang and the new default of requiring strict prototypes.

In file included from gettext.c:30:
./gettextP.h:120:1: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
SWAP (i)
^
1 error generated.

This was fixed in gettext, but deadbeef still fails even when gettext is patched since the copies of the files are in the gettext-tools/misc/archive.dir.tar archive which presumably needs to be regenerated.

https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=cb2c1486336462c8180f487221181ee798b0e73e

The file is generated in deadbeef with the 'autopoint -f' command.
'
Comment 1 Piotr Karbowski (RETIRED) gentoo-dev 2023-08-07 05:56:33 UTC
It seems I am unable to reproduce the problem. I also cannot locate the gettext-tools/misc/archive.dir.tar anywhere. Can you help me reproduce it and clarify what you mean by this archive.dir.tar?
Comment 2 orbea 2023-08-07 13:07:34 UTC
See: /usr/share/gettext/archive.dir.tar.xz

Did you enable USE=stricter in sys-devel/clang-common?
Comment 3 Piotr Karbowski (RETIRED) gentoo-dev 2023-08-07 14:10:27 UTC
I do not have this use, you mention it is new default so I haven't been looking into it. I will look into it, however any help you can contribute will be much appreciated.
Comment 4 orbea 2023-08-07 16:18:05 UTC
Fixing the code is easy, but applying the patch to gettext is difficult for me. Basically inside /usr/share/gettext/archive.dir.tar.xz at least some of the copies of intl/gettextP.h need to be changed so the various old style functions are updated.

For example, change this:

static inline nls_uint32
SWAP (i)
     nls_uint32 i;
{

To:

static inline nls_uint32
SWAP (nls_uint32 i) {
Comment 5 Viorel Munteanu gentoo-dev 2023-12-15 15:54:20 UTC
Fixed in media-sound/deadbeef-1.9.6