All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15456] No more login on Raspberry Pi 3 since 2023.02
Date: Tue, 21 Mar 2023 19:25:11 +0000	[thread overview]
Message-ID: <bug-15456-163-cs9dHnnFBv@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-15456-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=15456

--- Comment #4 from Peter Seiderer <ps.report@gmx.net> ---
The systemd default locale is 'C.UTF-8' (since 252, see [1] and
/etc/locale.conf  on the board):

    $ echo $LANG
    C.UTF-8

From build/readline-8.2/nls.c:

    126 char *
    127 _rl_init_locale (void)
    128 {
    129   char *ret, *lspec;
    130
    131   /* Set the LC_CTYPE locale category from environment variables. */
    132   lspec = _rl_get_locale_var ("LC_CTYPE");
    133   /* Since _rl_get_locale_var queries the right environment variables,
    134      we query the current locale settings with setlocale(), and, if
    135      that doesn't return anything, we set lspec to the empty string to
    136      force the subsequent call to setlocale() to define the `native'
    137      environment. */
    138 #if defined (HAVE_SETLOCALE)
    139   if (lspec == 0 || *lspec == 0)
    140     lspec = setlocale (LC_CTYPE, (char *)NULL);
    141   if (lspec == 0)
    142     lspec = "";
    143   ret = setlocale (LC_CTYPE, lspec);    /* ok, since it does not change
locale */
    144 #else
    145   ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
    146 #endif
    147
    148   _rl_utf8locale = (ret && *ret) ? utf8locale (ret) : 0;
    149
    150   _rl_current_locale = savestring (ret);
    151   return ret;
    152 }

The call to '_rl_get_locale_var()' returns 'C.UTF-8' (line 132) but the
call to 'setlocale(LC_CTYPE, 'C.UTF-8')' returns 0 (line 143) which
leads to the segmentation fault in the call to 'savestring(0)' (line 150).

Setting the following in the buildroot config file fixes the problem for me:

    BR2_ENABLE_LOCALE_WHITELIST="C"
    BR2_GENERATE_LOCALE="C"

[1] https://github.com/systemd/systemd/blob/main/NEWS

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-03-21 19:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19  9:28 [Buildroot] [Bug 15456] New: No more login on Raspberry Pi 3 since 2023.02 bugzilla
2023-03-19 11:22 ` [Buildroot] [Bug 15456] " bugzilla
2023-03-19 13:50 ` bugzilla
2023-03-19 20:36 ` bugzilla
2023-03-21 19:25 ` bugzilla [this message]
2023-03-22 15:44 ` bugzilla
2023-03-24 16:32 ` bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15456-163-cs9dHnnFBv@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.