Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2004 11:17:32 +1000
From:      Tim Robbins <tjr@freebsd.org>
To:        Arne Schwabe <arne@rfc2549.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: compile errors in  current kernel whene locale is set to de_DE.UTF-8
Message-ID:  <20040727011732.GA32919@cat.robbins.dropbear.id.au>
In-Reply-To: <86smbexwcr.fsf@kamino.rfc1149.org>
References:  <86smbexwcr.fsf@kamino.rfc1149.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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