Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Feb 2004 16:44:10 +0100 (CET)
From:      Udo Erdelhoff <ue@nathan.ruhr.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/63501: [patch] buildworld breaks with some locales due to tr change
Message-ID:  <200402281544.i1SFiAE1004456@nathan.internal>
Resent-Message-ID: <200402281550.i1SFoEX6050312@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         63501
>Category:       misc
>Synopsis:       [patch] buildworld breaks with some locales due to tr change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 28 07:50:13 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Udo Erdelhoff
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD nathan.internal 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat Feb 28 10:25:37 CET 2004 root@nathan.internal:/home/data/obj/home/data/src/sys/NATHAN i386

>Description:
The problem occurs during "make buildworld" if the user executing the
command has locales set in his environment.  The problem was noticed with
de_DE.ISO8859-1 and de_DE.ISO8859-15, but seems to occur with some other
locales, as well.

The symptom is that "make buildworld" breaks in src/lib/libedit due
to missing definitions.  This is caused by corruption of the contents
of the generated file fcns.h.  The root cause is a bad call of tr,
using a-z A-Z as parameters.  There is an attempted fix by setting
LC_ALL=C, but this does not help.

The thread "weird locale problems" on -current has more background
about the tr behaviour.

>How-To-Repeat:

Set your shell to the de_DE.ISO8859-15 locale
Go to src/lib/libedit
make a backup copy of fcns.h
make clean fcns.h
compare new and old file

>Fix:


cvs diff -u makelist
Index: makelist
===================================================================
RCS file: /home/ncvs/src/lib/libedit/makelist,v
retrieving revision 1.8
diff -u -r1.8 makelist
--- makelist    4 Aug 2003 21:31:51 -0000       1.8
+++ makelist    28 Feb 2004 15:32:46 -0000
@@ -146,7 +146,7 @@
 #
 -fh)
     cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
-    sort | LC_ALL=C tr 'a-z' 'A-Z' | $AWK '
+    sort | LC_ALL=C tr '[:lower:]' '[:upper:]' | $AWK '
        BEGIN {
            printf("/* Automatically generated file, do not edit */\n");
            printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402281544.i1SFiAE1004456>