milasudril / anja

Anja sample player
http://milasudril.github.io/anja/
Other
5 stars 1 forks source link

Locale issue on Arch #113

Closed milasudril closed 6 years ago

milasudril commented 6 years ago

It appears that there is a problem with using the C.UTF-8 locale on Arch:


doc/index.sh: line 29: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
Traceback (most recent call last):
  File "doc/makepage.py", line 603, in <module>
    main(sys.argv[1:])
  File "doc/makepage.py", line 538, in main
    tree=ET.parse(sys.stdin)
  File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 6, column 14
Error: I/O errordoc/index.xml: Compilation failed with status 1.
make: *** [Makefile:4: release] Error 255
make  114.35s user 10.03s system 72% cpu 2:51.76 total```

This breaks compilation of the HTML version of the manual.
mxmilkiib commented 6 years ago
$ locale -a
C
en_GB.utf8
POSIX

$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

locale on the Arch Wiki

The non-zero exit code is a problem for creating an Arch PKGBUILD. Here's my incomplete PKGBUILD for Anja.

mxmilkiib commented 6 years ago

commercialhaskell/stack#856 appears to have the answer

milasudril commented 6 years ago

Try to change the script so it changes the locale to C or POSIX instead. I need to verify that it works on Ubuntu though.

mxmilkiib commented 6 years ago

I tried just "C" but it failed, then "POSIX", but that failed also, so I tried "en_GB.utf8" and it was juuust right! :)

With a hacky sed change, the PKGBUILD works. Anja is now in the AUR. Edit; hack is now an echo $LANG

mxmilkiib commented 6 years ago

That appears to work, thanks! I've updated the PKGBUILD in the AUR.