misc/63501: [patch] buildworld breaks with some locales due to tr change

Udo Erdelhoff ue at nathan.ruhr.de
Sat Feb 28 07:50:14 PST 2004


>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 at 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:


More information about the freebsd-bugs mailing list