Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 625396 - sys-apps/systemd-234 fails to build with a non-UTF-8 locale
Summary: sys-apps/systemd-234 fails to build with a non-UTF-8 locale
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords: PATCH
: 625566 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-17 08:10 UTC by Philipp
Modified: 2017-07-19 07:38 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp 2017-07-17 08:10:51 UTC
Paludis always sets the locale to "C", so the build fails regardless of what the system locale is. The log looks like this:


>>> Starting src_compile
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
ninja -v -j8 -l0
[1/1705] /usr/bin/python3.6 /usr/lib64/python-exec/python3.6/meson --internal exe /var/tmp/paludis/sys-apps-systemd-234/work/systemd-234-abi_x86_64.amd64/meson-private/meson_exe_sed_c94d61f1b7ccf08defecb92b3b1f2dac341cff1d.dat
FAILED: catalog/systemd.be.catalog 
/usr/bin/python3.6 /usr/lib64/python-exec/python3.6/meson --internal exe /var/tmp/paludis/sys-apps-systemd-234/work/systemd-234-abi_x86_64.amd64/meson-private/meson_exe_sed_c94d61f1b7ccf08defecb92b3b1f2dac341cff1d.dat
WARNING: You are using 'ANSI_X3.4-1968' which is not a a Unicode-compatible locale.
WARNING: You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents.
WARNING: Please switch to a UTF-8 locale for your platform.
Traceback (most recent call last):
  File "/usr/lib64/python-exec/python3.6/meson", line 37, in <module>
    sys.exit(main())
  File "/usr/lib64/python-exec/python3.6/meson", line 34, in main
    return mesonmain.run(launcher, sys.argv[1:])
  File "/usr/lib64/python3.6/site-packages/mesonbuild/mesonmain.py", line 269, in run
    sys.exit(run_script_command(args[1:]))
  File "/usr/lib64/python3.6/site-packages/mesonbuild/mesonmain.py", line 257, in run_script_command
    return cmdfunc(cmdargs)
  File "/usr/lib64/python3.6/site-packages/mesonbuild/scripts/meson_exe.py", line 76, in run
    return run_exe(exe)
  File "/usr/lib64/python3.6/site-packages/mesonbuild/scripts/meson_exe.py", line 59, in run_exe
    p, stdout, stderr = Popen_safe(cmd + exe.cmd_args, env=child_env, cwd=exe.workdir)
  File "/usr/lib64/python3.6/site-packages/mesonbuild/mesonlib.py", line 512, in Popen_safe
    o, e = p.communicate(write)
  File "/usr/lib64/python3.6/subprocess.py", line 836, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib64/python3.6/subprocess.py", line 1536, in _communicate
    self.stdout.errors)
  File "/usr/lib64/python3.6/subprocess.py", line 735, in _translate_newlines
    data = data.decode(encoding, errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 105: ordinal not in range(128)
Comment 1 Pacho Ramos gentoo-dev 2017-07-17 15:29:35 UTC
It looks like a meson issue
Comment 2 Mike Gilbert gentoo-dev 2017-07-17 15:46:12 UTC
I would suggest we modify meson.eclass to call the python_export_utf8_locale function from python-utils-r1.eclass.
Comment 3 Harris Landgarten 2017-07-18 18:47:27 UTC
Same issue with paludis even with utf8 locale.
Comment 4 Mike Gilbert gentoo-dev 2017-07-18 19:14:22 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bae7477c594c2f2ce079e18c28b89bc7810bbe85

commit bae7477c594c2f2ce079e18c28b89bc7810bbe85
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Mon Jul 17 12:14:13 2017 -0400

    meson.eclass: ensure we have a UTF-8 locale set

    Bug: https://bugs.gentoo.org/625396

 eclass/meson.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 5 Mike Gilbert gentoo-dev 2017-07-18 20:09:02 UTC
*** Bug 625566 has been marked as a duplicate of this bug. ***
Comment 6 Philipp 2017-07-19 07:38:05 UTC
Thank you. I can confirm that it's working now.