* [Buildroot] locale supports in buildroot (segment fault)
@ 2013-08-22 2:26 Woody Wu
2013-08-22 5:43 ` [Buildroot] [PATCH] generatelocales: fix 'cut' invocation Arnout Vandecappelle
2013-08-22 5:48 ` [Buildroot] locale supports in buildroot (segment fault) Arnout Vandecappelle
0 siblings, 2 replies; 4+ messages in thread
From: Woody Wu @ 2013-08-22 2:26 UTC (permalink / raw)
To: buildroot
Hi,
I want to build locale support for my local langauge. Then I enabled
BR2_GENERATE_LOCALE="en_US zh_CN zh_CN.gbk". In the progress of
building (after post-build script), it begins to report errors:
Generating locale en_US.en_US
character map file `en_US' not found: No such file or directory
/bin/sh: line 1: 7006 Segmentation fault
I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
/home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
--prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
"LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
${locale}
Generating locale zh_CN.zh_CN
character map file `zh_CN' not found: No such file or directory
/bin/sh: line 1: 7041 Segmentation fault
I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
/home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
--prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
"LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
${locale}
Generating locale zh_CN.gbk
character map file `gbk' not found: No such file or directory
/bin/sh: line 1: 7074 Segmentation fault
I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
/home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
--prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
"LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
${locale}
How should I dod it correct? Thanks.
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] [PATCH] generatelocales: fix 'cut' invocation
2013-08-22 2:26 [Buildroot] locale supports in buildroot (segment fault) Woody Wu
@ 2013-08-22 5:43 ` Arnout Vandecappelle
2013-08-23 4:59 ` Thomas Petazzoni
2013-08-22 5:48 ` [Buildroot] locale supports in buildroot (segment fault) Arnout Vandecappelle
1 sibling, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2013-08-22 5:43 UTC (permalink / raw)
To: buildroot
'cut' needs to be invoked with the -s option to make sure it doesn't
print anything when the delimiter isn't found. This is particularly
important for the charmap detection, because UTF-8 is appended if
the charmap is empty. But without -s, it will never be empty.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 794d217..6018d63 100644
--- a/Makefile
+++ b/Makefile
@@ -543,8 +543,8 @@ ifneq ($(GENERATE_LOCALE),)
target-generatelocales: host-localedef
$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
$(Q)for locale in $(GENERATE_LOCALE) ; do \
- inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
- charmap=`echo $${locale} | cut -f2 -d'.'` ; \
+ inputfile=`echo $${locale} | cut -f1 -d'.' -s` ; \
+ charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
if test -z "$${charmap}" ; then \
charmap="UTF-8" ; \
fi ; \
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH] generatelocales: fix 'cut' invocation
2013-08-22 5:43 ` [Buildroot] [PATCH] generatelocales: fix 'cut' invocation Arnout Vandecappelle
@ 2013-08-23 4:59 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-08-23 4:59 UTC (permalink / raw)
To: buildroot
Dear Arnout Vandecappelle (Essensium/Mind),
On Thu, 22 Aug 2013 07:43:58 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> 'cut' needs to be invoked with the -s option to make sure it doesn't
> print anything when the delimiter isn't found. This is particularly
> important for the charmap detection, because UTF-8 is appended if
> the charmap is empty. But without -s, it will never be empty.
>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Applied, thanks.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] locale supports in buildroot (segment fault)
2013-08-22 2:26 [Buildroot] locale supports in buildroot (segment fault) Woody Wu
2013-08-22 5:43 ` [Buildroot] [PATCH] generatelocales: fix 'cut' invocation Arnout Vandecappelle
@ 2013-08-22 5:48 ` Arnout Vandecappelle
1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2013-08-22 5:48 UTC (permalink / raw)
To: buildroot
On 22/08/13 04:26, Woody Wu wrote:
> Hi,
>
> I want to build locale support for my local langauge. Then I enabled
> BR2_GENERATE_LOCALE="en_US zh_CN zh_CN.gbk". In the progress of
> building (after post-build script), it begins to report errors:
>
> Generating locale en_US.en_US
This is strange. It should generate locale for en_US.UTF-8 - the en_US
charmap obviously doesn't exist.
I see now - the cut command is missing a '-s' option. Patch follows.
> character map file `en_US' not found: No such file or directory
> /bin/sh: line 1: 7006 Segmentation fault
> I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
> /home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
> --prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
> "LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
> ${locale}
> Generating locale zh_CN.zh_CN
> character map file `zh_CN' not found: No such file or directory
> /bin/sh: line 1: 7041 Segmentation fault
> I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
> /home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
> --prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
> "LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
> ${locale}
> Generating locale zh_CN.gbk
> character map file `gbk' not found: No such file or directory
Charmaps are always in capitals, so this should be GBK instead. Look in
/usr/share/i18n/charmaps.
Regards,
Arnout
> /bin/sh: line 1: 7074 Segmentation fault
> I18NPATH=/home/woody/src/buildroot-2013.05/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/share/i18n:/usr/share/i18n
> /home/woody/src/buildroot-2013.05/output/host/usr/bin/localedef
> --prefix=/home/woody/src/buildroot-2013.05/output/target --`echo
> "LITTLE" | tr [A-Z] [a-z]`-endian -i ${inputfile} -f ${charmap}
> ${locale}
>
>
> How should I dod it correct? Thanks.
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-23 4:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 2:26 [Buildroot] locale supports in buildroot (segment fault) Woody Wu
2013-08-22 5:43 ` [Buildroot] [PATCH] generatelocales: fix 'cut' invocation Arnout Vandecappelle
2013-08-23 4:59 ` Thomas Petazzoni
2013-08-22 5:48 ` [Buildroot] locale supports in buildroot (segment fault) 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.