Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766866 - x11-misc/lightdm-1.30.0-r2 - language.c:217:24: error: 'LC_IDENTIFICATION' undeclared (first use in this function) (on musl)
Summary: x11-misc/lightdm-1.30.0-r2 - language.c:217:24: error: 'LC_IDENTIFICATION' un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2021-01-24 12:34 UTC by ernsteiswuerfel
Modified: 2022-09-01 02:16 UTC (History)
4 users (show)

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


Attachments
emerge --info (file_766866.txt,6.78 KB, text/plain)
2021-01-24 12:34 UTC, ernsteiswuerfel
Details
build.log (lightdm-1.30.0-r2:20210124-122924.log,52.19 KB, text/plain)
2021-01-24 12:34 UTC, ernsteiswuerfel
Details
musl-language.patch (musl-language.patch,956 bytes, patch)
2021-01-24 12:38 UTC, ernsteiswuerfel
Details | Diff
musl-updwtmpx.patch (musl-updwtmpx.patch,1.35 KB, patch)
2021-01-24 12:41 UTC, ernsteiswuerfel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2021-01-24 12:34:23 UTC
Created attachment 684432 [details]
emerge --info

[...]
libtool: compile:  x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -pthread -I/usr/include/libxml2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -I../common -DCONFIG_DIR=\"/etc/lightdm\" -DSESSIONS_DIR=\"/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions\" -DWAYLAND_SESSIONS_DIR=\"/usr/share/wayland-sessions\" -DREMOTE_SESSIONS_DIR=\"/usr/share/lightdm/remote-sessions\" -Os -march=x86-64 -msse3 -mtune=athlon64-sse3 -pipe -c language.c  -fPIC -DPIC -o .libs/liblightdm_gobject_1_la-language.o
language.c: In function 'lightdm_language_get_code':
language.c:193:13: warning: Deprecated pre-processor symbol, replace with 
  193 |     return GET_PRIVATE (language)->code;
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~                    
language.c: In function 'lightdm_language_get_name':
language.c:209:13: warning: Deprecated pre-processor symbol, replace with 
  209 |     LightDMLanguagePrivate *priv = GET_PRIVATE (language);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
language.c:217:24: error: 'LC_IDENTIFICATION' undeclared (first use in this function)
  217 |             setlocale (LC_IDENTIFICATION, locale);
      |                        ^~~~~~~~~~~~~~~~~
language.c:217:24: note: each undeclared identifier is reported only once for each function it appears in
language.c:220:53: error: '_NL_IDENTIFICATION_LANGUAGE' undeclared (first use in this function)
  220 |             const gchar *language_en = nl_langinfo (_NL_IDENTIFICATION_LANGUAGE);
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
language.c: In function 'lightdm_language_get_territory':
language.c:249:13: warning: Deprecated pre-processor symbol, replace with 
  249 |     LightDMLanguagePrivate *priv = GET_PRIVATE (language);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
language.c:257:24: error: 'LC_IDENTIFICATION' undeclared (first use in this function)
  257 |             setlocale (LC_IDENTIFICATION, locale);
      |                        ^~~~~~~~~~~~~~~~~
language.c:260:46: error: '_NL_IDENTIFICATION_TERRITORY' undeclared (first use in this function)
  260 |             gchar *country_en = nl_langinfo (_NL_IDENTIFICATION_TERRITORY);
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
language.c: In function 'lightdm_language_matches':
language.c:291:13: warning: Deprecated pre-processor symbol, replace with 
  291 |     LightDMLanguagePrivate *priv = GET_PRIVATE (language);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
language.c: In function 'lightdm_language_set_property':
language.c:317:13: warning: Deprecated pre-processor symbol, replace with 
  317 |     LightDMLanguagePrivate *priv = GET_PRIVATE (self);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
make[2]: *** [Makefile:629: liblightdm_gobject_1_la-language.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/x11-misc/lightdm-1.30.0-r2/work/lightdm-1.30.0/liblightdm-gobject'
make[1]: *** [Makefile:484: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-misc/lightdm-1.30.0-r2/work/lightdm-1.30.0'
make: *** [Makefile:416: all] Error 2
 * ERROR: x11-misc/lightdm-1.30.0-r2::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2021-01-24 12:34:44 UTC
Created attachment 684435 [details]
build.log
Comment 2 ernsteiswuerfel archtester 2021-01-24 12:38:40 UTC
Created attachment 684438 [details, diff]
musl-language.patch

This patch from https://github.com/void-ppc/void-packages/blob/master/srcpkgs/lightdm/patches/musl-language.patch fixes problem.
Comment 3 ernsteiswuerfel archtester 2021-01-24 12:41:19 UTC
Created attachment 684441 [details, diff]
musl-updwtmpx.patch

This patch from https://github.com/void-ppc/void-packages/blob/master/srcpkgs/lightdm/patches/musl-updwtmpx.patch fixes the next build problem which you run into on musl.

With both patches lightdm-1.30.0-r2 builds just fine.
Comment 4 Larry the Git Cow gentoo-dev 2022-09-01 02:11:47 UTC
The bug has been closed via the following commit(s):

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

commit 0326445b2ff09d42d0fa399840e3314e56dd1644
Author:     brahmajit das <listout@protonmail.com>
AuthorDate: 2022-07-21 13:53:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-01 02:09:10 +0000

    x11-misc/lightdm: Fix LC_IDENTIFICATION and updwtmpx on musl
    
    This commit fixes two issues with lightdm on musl
    
    - LC_IDENTIFICATION not being defined, and
    - updwtmpx giving conflicting types
    
    Patches are documented to the best of my abilities.
    
    Closes: https://bugs.gentoo.org/766866
    
    Signed-off-by: brahmajit das <listout@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26469
    Signed-off-by: Sam James <sam@gentoo.org>

 .../lightdm/files/lightdm-1.30.0-musl-locale.patch | 42 ++++++++++++++++++++++
 .../files/lightdm-1.30.0-musl-updwtmpx.patch       | 26 ++++++++++++++
 x11-misc/lightdm/lightdm-1.30.0-r3.ebuild          |  5 +++
 3 files changed, 73 insertions(+)