locale-related build problems (was: kernel build failed)

Jilles Tjoelker jilles at stack.nl
Sun Jan 3 14:03:05 UTC 2010


On Sat, Jan 02, 2010 at 11:01:06PM +0200, E. O. wrote:
> pls help me , kernel always returns an error

> make buildkernel

> and error

> ./pci_if.h:214: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '_RELEASE_MS'
> ./pci_if.h:214: error: stray '\335' in program
> 
> ./pci_if.h:226: error: stray '\335' in program
> ./pci_if.h:226: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '_MS'
> ./pci_if.h:226: error: stray '\335' in program
> ./pci_if.h:238: error: stray '\335' in program
> ./pci_if.h:238: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '_MS'
> ./pci_if.h:238: error: stray '\335' in program
> [...]

The build system appears not to cope with locales. My guess is that
you're using Turkish locale, which has dotless and dotted uppercase and
lowercase 'i', where the uppercase version of the dotted 'i' is an
uppercase dotted 'I'. awk(1) knows about this and generates a file that
conforms to Turkish conventions but obviously will not work.

As a workaround, you can run your builds with LC_ALL=C in the
environment, disabling locale support. (e.g. env LC_ALL=C make
buildkernel).

This should be fixed by adding LC_ALL=C somewhere in the build process,
possibly only for these awk commands.

-- 
Jilles Tjoelker


More information about the freebsd-stable mailing list