Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830268 - app-admin/gtkdiskfree-2.0.4_p20200224 fails to compile: main.c:45:15: error: LC_NUMERIC undeclared (first use in this function)
Summary: app-admin/gtkdiskfree-2.0.4_p20200224 fails to compile: main.c:45:15: error: ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Samuel Bauer
Depends on:
Blocks: c99-porting
  Show dependency tree
Reported: 2021-12-30 07:02 UTC by Agostino Sarubbo
Modified: 2023-07-03 12:45 UTC (History)
1 user (show)

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

build.log (build.log,63.94 KB, text/plain)
2021-12-30 07:02 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-12-30 07:02:04 UTC

Issue: app-admin/gtkdiskfree-2.0.4_p20200224 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)

This machine uses MUSL libc
Comment 1 Agostino Sarubbo gentoo-dev 2021-12-30 07:02:06 UTC
Created attachment 760786 [details]

build log and emerge --info
Comment 2 Samuel Bauer 2022-01-15 16:22:26 UTC
This may be related to musl, but I don't know how.
LC_NUMERIC seems to be declared in musl headers, for some reason with musl locale.h may not be inherited from any parent header. I think I should just include locale.h by default in main.c for a workaround.

Fix I guess would be to use glib counterpart for atof, but this is only from what I remember, anyway, I have to look for a proper way to convert string <-> float

Could you test some the patch to check it works with musl when I'll submit it here ?

P.S.: I will have to drop flags from the ebuild
    gtk2 (cf #769128)
Comment 3 Samuel Bauer 2023-07-03 12:41:16 UTC
*** Bug 894204 has been marked as a duplicate of this bug. ***
Comment 4 Samuel Bauer 2023-07-03 12:45:48 UTC
Oups I think I erased my local copy of git repository with patch.