cannot change locale prevents me from running patchbot

24 views
Skip to first unread message

Reimundo Heluani

unread,
Aug 25, 2020, 9:23:19 AM8/25/20
to sage-...@googlegroups.com
Hello, now that GCC-10 has been merged I wanted to run a patchbot again. The
issue of the non-existing C-locale C.UTF-8 prevents me from doing so since
there are tests that failed like so:

File "src/sage/tests/cmdline.py", line 227, in sage.tests.cmdline.test_executable
Failed example:
err # optional - build
Expected:
''
Got:
'/home/sage-patchbot/sage/build/bin/sage-spkg: line 73: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory\n/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\n'


What can I do about this?

R.

signature.asc

Dima Pasechnik

unread,
Aug 25, 2020, 9:58:50 AM8/25/20
to sage-devel
can you install the C.UTF-8 locale?

>
> R.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.

Reimundo Heluani

unread,
Aug 25, 2020, 10:40:04 AM8/25/20
to sage-...@googlegroups.com
On Aug 25, Dima Pasechnik wrote:
>On Tue, Aug 25, 2020 at 2:23 PM 'Reimundo Heluani' via sage-devel
><sage-...@googlegroups.com> wrote:
>>
>> Hello, now that GCC-10 has been merged I wanted to run a patchbot again. The
>> issue of the non-existing C-locale C.UTF-8 prevents me from doing so since
>> there are tests that failed like so:
>>
>> File "src/sage/tests/cmdline.py", line 227, in sage.tests.cmdline.test_executable
>> Failed example:
>> err # optional - build
>> Expected:
>> ''
>> Got:
>> '/home/sage-patchbot/sage/build/bin/sage-spkg: line 73: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory\n/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\n'
>>
>>
>> What can I do about this?
>
>can you install the C.UTF-8 locale?
>
That locale seems to be an invention of Debian that Ubuntu started using. This
was closed as wontfix 8 years ago on Arch.

https://bugs.archlinux.org/task/32296

It seems to me that having these test failing and flooding the logs of a
regular build is not the way to go. Is there a trac ticket about this? I could
only find my comments on #30002 which was already closed.

R.

>>
>> R.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.
>
>--
>You received this message because you are subscribed to the Google Groups "sage-devel" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1ZCR7N1Sg%3DdeyJ80XcygqcmxQHQpVnTbmL5nTra8D71A%40mail.gmail.com.
signature.asc

Dima Pasechnik

unread,
Aug 25, 2020, 11:15:49 AM8/25/20
to sage-devel
On Tue, Aug 25, 2020 at 3:40 PM 'Reimundo Heluani' via sage-devel
<sage-...@googlegroups.com> wrote:
>
> On Aug 25, Dima Pasechnik wrote:
> >On Tue, Aug 25, 2020 at 2:23 PM 'Reimundo Heluani' via sage-devel
> ><sage-...@googlegroups.com> wrote:
> >>
> >> Hello, now that GCC-10 has been merged I wanted to run a patchbot again. The
> >> issue of the non-existing C-locale C.UTF-8 prevents me from doing so since
> >> there are tests that failed like so:
> >>
> >> File "src/sage/tests/cmdline.py", line 227, in sage.tests.cmdline.test_executable
> >> Failed example:
> >> err # optional - build
> >> Expected:
> >> ''
> >> Got:
> >> '/home/sage-patchbot/sage/build/bin/sage-spkg: line 73: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory\n/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\n'
> >>
> >>
> >> What can I do about this?
> >
> >can you install the C.UTF-8 locale?
> >
> That locale seems to be an invention of Debian that Ubuntu started using. This
> was closed as wontfix 8 years ago on Arch.
>
> https://bugs.archlinux.org/task/32296

IMHO it's silly not to have a language-neutral locale that supports
UTF-8, that's what C.UTF-8 really is.
I'd suggest to Arch to reconsider their position.
Different <your_lang_env>.UTF-8 locales lead to different ordering of
Unicode symbols, something
that'd require extra care in doctests etc.

If you'd still go with <your_lang_env>.UTF-8,
a proper fix for Sage would seem to use gettext, as this is the
solution from the autotools universe.
Patches welcome :-)

Then, locale on Linux supports aliases, something to be defined in
/etc/locale.alias - I presume C.UTF-8 may be
defined there as an alias for <your_lang_env>.UTF-8
- if this works, this would be a quick fix.
Otherwise you can patch build/bin/sage-spkg - that's the only place
where C.UTF-8 is mentioned, I think.












>
> It seems to me that having these test failing and flooding the logs of a
> regular build is not the way to go. Is there a trac ticket about this? I could
> only find my comments on #30002 which was already closed.
>
> R.
>
> >>
> >> R.
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.
> >
> >--
> >You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1ZCR7N1Sg%3DdeyJ80XcygqcmxQHQpVnTbmL5nTra8D71A%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825143953.GA582885%40vertex.

Dima Pasechnik

unread,
Aug 25, 2020, 11:21:49 AM8/25/20
to sage-devel
On Tue, Aug 25, 2020 at 3:40 PM 'Reimundo Heluani' via sage-devel
<sage-...@googlegroups.com> wrote:
>
> On Aug 25, Dima Pasechnik wrote:
> >On Tue, Aug 25, 2020 at 2:23 PM 'Reimundo Heluani' via sage-devel
> ><sage-...@googlegroups.com> wrote:
> >>
> >> Hello, now that GCC-10 has been merged I wanted to run a patchbot again. The
> >> issue of the non-existing C-locale C.UTF-8 prevents me from doing so since
> >> there are tests that failed like so:
> >>
> >> File "src/sage/tests/cmdline.py", line 227, in sage.tests.cmdline.test_executable
> >> Failed example:
> >> err # optional - build
> >> Expected:
> >> ''
> >> Got:
> >> '/home/sage-patchbot/sage/build/bin/sage-spkg: line 73: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory\n/bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\nbash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)\n'
> >>
> >>
> >> What can I do about this?
> >
> >can you install the C.UTF-8 locale?
> >
> That locale seems to be an invention of Debian that Ubuntu started using. This
> was closed as wontfix 8 years ago on Arch.
>
> https://bugs.archlinux.org/task/32296
>

PS. no matter who invented it, but it's in Debian/Ubuntu and various
derived from them systems, as well as in
Fedora and the related systems (RedHat/CentOS/etc); and it is in
OpenBSD, FreeBSD, macOS, etc,
so Arch really is an outlier.

> It seems to me that having these test failing and flooding the logs of a
> regular build is not the way to go. Is there a trac ticket about this? I could
> only find my comments on #30002 which was already closed.
>
> R.
>
> >>
> >> R.
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.
> >
> >--
> >You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1ZCR7N1Sg%3DdeyJ80XcygqcmxQHQpVnTbmL5nTra8D71A%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825143953.GA582885%40vertex.

Reimundo Heluani

unread,
Aug 25, 2020, 11:52:41 AM8/25/20
to sage-...@googlegroups.com
Well, I'm no expert on Linux systems, but I guess Gentoo also doesn't have it
(or didn't by 2017)

https://archives.gentoo.org/gentoo-user/message/984549c6bb9ff5f1e43b101fbf7fd447

I don't think Arch will reconsider that bug, it has been consistently closing
bugs as duplicates of the one closed as wontfix.

R.
>
>> It seems to me that having these test failing and flooding the logs of a
>> regular build is not the way to go. Is there a trac ticket about this? I could
>> only find my comments on #30002 which was already closed.
>>
>> R.
>>
>> >>
>> >> R.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.
>> >
>> >--
>> >You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> >To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> >To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1ZCR7N1Sg%3DdeyJ80XcygqcmxQHQpVnTbmL5nTra8D71A%40mail.gmail.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825143953.GA582885%40vertex.
>
>--
>You received this message because you are subscribed to the Google Groups "sage-devel" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3W%3DTHXWNJui0Ws6FN7Wr1TkdEOf_7V5TFc6eUdGo15cA%40mail.gmail.com.
signature.asc

Michael Orlitzky

unread,
Aug 25, 2020, 11:53:47 AM8/25/20
to sage-...@googlegroups.com
On 2020-08-25 10:39, 'Reimundo Heluani' via sage-devel wrote:
>>
> That locale seems to be an invention of Debian that Ubuntu started using. This
> was closed as wontfix 8 years ago on Arch.
>
> https://bugs.archlinux.org/task/32296
>
> It seems to me that having these test failing and flooding the logs of a
> regular build is not the way to go. Is there a trac ticket about this? I could
> only find my comments on #30002 which was already closed.

Sorry, I let this slip in because my distribution is using a patched
glibc and tricked me into thinking it was a standard locale. We should
not require a huge unofficial patch to something as critical as glibc. A
fix will appear eventually on,

https://trac.sagemath.org/ticket/30053

It's still not totally clear to me what the various locale manglings
achieve. It would be really helpful to know what goes wrong with,

* No mangling at all
* LC_ALL=C

and where it goes wrong. Using the C locale is supposed to help with
character-range regular expressions in spkg-install scripts, I guess.
But the UTF-8 helps python... somehow? Neither #15791 nor #29033 go into
detail.

Note that many people "compile out" the locales that they don't intend
to use, so using something like en_US.utf8 unconditionally is also not a
good idea. The POSIX/C locale should always be there, though.

Reimundo Heluani

unread,
Aug 25, 2020, 11:56:37 AM8/25/20
to sage-...@googlegroups.com
Thanks, this seems to work. I edited /usr/share/locale/locale.alias directly
and now I get

$ locale -a
C
C.UTF-8
en_US.utf8
es_AR.utf8
POSIX
pt_BR.utf8

I'll try to run the patchbot and see if the test still fails.

R.
>
>
>
>
>
>
>
>
>
>
>
>
>>
>> It seems to me that having these test failing and flooding the logs of a
>> regular build is not the way to go. Is there a trac ticket about this? I could
>> only find my comments on #30002 which was already closed.
>>
>> R.
>>
>> >>
>> >> R.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825132311.GA580290%40vertex.
>> >
>> >--
>> >You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> >To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> >To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1ZCR7N1Sg%3DdeyJ80XcygqcmxQHQpVnTbmL5nTra8D71A%40mail.gmail.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20200825143953.GA582885%40vertex.
>
>--
>You received this message because you are subscribed to the Google Groups "sage-devel" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq04pVQeJUTfJ4%2BPHuOgnPdcNVtWkpKJtYyjsye3tUuhvg%40mail.gmail.com.
signature.asc

Dima Pasechnik

unread,
Aug 25, 2020, 12:01:58 PM8/25/20
to sage-devel
Nowadays Gentoo does have C.UTF-8 locale.

Reply all
Reply to author
Forward
0 new messages