From owner-freebsd-current@FreeBSD.ORG Tue Jul 27 01:17:41 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7185B16A4CE for ; Tue, 27 Jul 2004 01:17:41 +0000 (GMT) Received: from robbins.dropbear.id.au (044.c.011.mel.iprimus.net.au [210.50.218.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA38D43D46 for ; Tue, 27 Jul 2004 01:17:39 +0000 (GMT) (envelope-from tim@robbins.dropbear.id.au) Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id F27B94207; Tue, 27 Jul 2004 11:17:32 +1000 (EST) Date: Tue, 27 Jul 2004 11:17:32 +1000 From: Tim Robbins To: Arne Schwabe Message-ID: <20040727011732.GA32919@cat.robbins.dropbear.id.au> References: <86smbexwcr.fsf@kamino.rfc1149.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86smbexwcr.fsf@kamino.rfc1149.org> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: compile errors in current kernel whene locale is set to de_DE.UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 01:17:41 -0000 On Tue, Jul 27, 2004 at 12:00:20AM +0200, Arne Schwabe wrote: > Hi, > > In file included from /usr/src/sys/i386/acpica/acpi_wakeup.c:53: > acpi_wakecode.h:2:81: invalid suffix "x" on integer constant > In file included from /usr/src/sys/i386/acpica/acpi_wakeup.c:53: > acpi_wakecode.h:2: error: syntax error before '.' token > acpi_wakecode.h:2: error: stray '\372' in program > acpi_wakecode.h:2: error: stray '\310' in program [...] > % locale > LANG=de_DE.UTF-8 > LC_CTYPE="de_DE.UTF-8" > LC_COLLATE="de_DE.UTF-8" > LC_TIME="de_DE.UTF-8" > LC_NUMERIC="de_DE.UTF-8" > LC_MONETARY="de_DE.UTF-8" > LC_MESSAGES=C > LC_ALL= > > when I have LANG=C (then everything is =C" the kernel compiles without > problems. > > kernel config is attached. > > kernel sources/world are 1-2 days old. This is a strange one: sys/i386/acpica/genwakecode.sh tries to generate a C header file containing the contents of acpi_wakecode.bin as a byte array. It does the following: hexdump -Cv acpi_wakecode.bin | \ sed -e 's/^[0-9a-f][0-9a-f]*//' -e 's/\|.*$//' | \ The first sed command removes the offsets that hexdump(1) writes on the left of the output. The second attempts to remove the printable representation from the right hand side, in order to leave space-separated hex values. However, hexdump doesn't recognize multibyte characters, so the "printable" representation can contain invalid multibyte sequences. The "." operator in regular expressions only matches valid characters, so the second command fails, leaving garbage in acpi_wakecode.h. I'll fix genwakecode.sh shortly, but for now, you'll have to build kernels with LANG=C (or one of the ISO 8859 locales). Tim