Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 830268

Summary: app-admin/gtkdiskfree-2.0.4_p20200224 fails to compile: main.c:45:15: error: LC_NUMERIC undeclared (first use in this function)
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Samuel Bauer <samuel.bauer>
Status: CONFIRMED ---    
Severity: normal CC: proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: build.log

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.