All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Change host locale from C to en_US.UTF-8 for reproducable builds
@ 2018-01-28 11:22 Julius Kriukas
  2018-01-30 22:38 ` Thomas Petazzoni
  2018-01-31 21:36 ` [Buildroot] [PATCH v2] " Julius Kriukas
  0 siblings, 2 replies; 19+ messages in thread
From: Julius Kriukas @ 2018-01-28 11:22 UTC (permalink / raw)
  To: buildroot

When BR2_REPRODUCIBLE is enabled building systemd fails with error:

[1/1080] Generating systemd.bg.catalog with a meson_exe.py custom command.
FAILED: catalog/systemd.bg.catalog
/buildroot/output/host/bin/python3 /buildroot/output/host/bin/meson --internal exe /buildroot/output/build/systemd-236/build/meson-private/meson_exe_sed_232a0623cc7ce2cd67ec72ed784b76307102ed76.dat
Warning: You are using 'ANSI_X3.4-1968' which is not a Unicode-compatible locale.
You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents.
Please switch to a UTF-8 locale for your platform.
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1079: ordinal not in range(128)
package/pkg-generic.mk:247: recipe for target '/buildroot/output/build/systemd-236/.stamp_built' failed
make: *** [/buildroot/output/build/systemd-236/.stamp_built] Error 1

Other packages using meson build system might fail as well.

This patch changes default host system locale from C to en_US.UTF-8 to
fix this issue. Any Unicode-compatible locale would be suitable here.

Signed-off-by: Julius Kriukas <julius@kriukas.lt>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 7d8ab51a8c..5991c6a221 100644
--- a/Makefile
+++ b/Makefile
@@ -250,8 +250,8 @@ endif
 # timezone and locale may affect build output
 ifeq ($(BR2_REPRODUCIBLE),y)
 export TZ = UTC
-export LANG = C
-export LC_ALL = C
+export LANG = en_US.UTF-8
+export LC_ALL = en_US.UTF-8
 export GZIP = -n
 BR2_VERSION_GIT_EPOCH = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at)
 export SOURCE_DATE_EPOCH ?= $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-03-04  9:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 11:22 [Buildroot] [PATCH 1/1] Change host locale from C to en_US.UTF-8 for reproducable builds Julius Kriukas
2018-01-30 22:38 ` Thomas Petazzoni
2018-01-31 21:34   ` Julius Kriukas
2018-01-31 21:36 ` [Buildroot] [PATCH v2] " Julius Kriukas
2018-02-04 15:19   ` Yann E. MORIN
2018-02-06 16:32   ` Thomas Petazzoni
2018-02-12 21:34   ` [Buildroot] [PATCH v3] systemd: switch to en_US.UTF-8 locale when building Julius Kriukas
2018-02-17 18:06     ` John Keeping
2018-02-22 23:02       ` Julius Kriukas
2018-02-22 23:00     ` [Buildroot] [PATCH v4] " Julius Kriukas
2018-02-28 21:31       ` Yann E. MORIN
2018-02-28 22:13         ` Thomas Petazzoni
2018-03-01 18:06           ` Yann E. MORIN
2018-03-01 18:50             ` Peter Korsgaard
2018-03-01 19:12               ` Yann E. MORIN
2018-03-01 20:04                 ` Peter Korsgaard
2018-03-02 21:45       ` Thomas Petazzoni
     [not found]         ` <87vaecbsf2.fsf@paral.in>
2018-03-04  9:01           ` Yann E. MORIN
2018-02-23  9:06     ` [Buildroot] [PATCH v3] " Arnout Vandecappelle

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.