[BUG] mod/file2alias: build error in devicetable-offsets.c [was:asm/types.h Header file wont get generated while building uImage ?]

From: Jon Medhurst (Tixy)
Date: Fri Mar 22 2013 - 07:29:47 EST


On Fri, 2013-03-08 at 13:31 +0530, Prabhakar Lad wrote:
> Usually for building uImage I follow this steps,
> 1: do a clean distclean
> 2: make ARCH=arm CROSS_COMPILE=xxx xxxdefconfig
> 3: make ARCH=arm CROSS_COMPILE=xxx uImage
>
> This used to work until 3.8, for 3.9 I see the following error:
>
> HOSTCC scripts/genksyms/parse.tab.o
> In file included from include/linux/types.h:5:0,
> from include/linux/mod_devicetable.h:11,
> from scripts/mod/devicetable-offsets.c:2:
> include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such
> file or directory
> compilation terminated.
>
> Well this get fixed if do make ARCH=arm
> CROSS_COMPILE=arm-none-linux-gnueabi- headers_install
> and the build the uImage.

I am seeing a similar problem.

This appears to be introduced by commit 6543becf (mod/file2alias: make
modalias generation safe for cross compiling). More specifically a race
condition between the generation of devicetable-offsets.h and the
generation of asm/types.h by scripts/Makefile.asm-generic.

For builds which succeed I see this order:

WRAP arch/arm/include/generated/asm/types.h
[...]
GEN include/generated/asm-offsets.h

and for those which fail:

CC scripts/mod/devicetable-offsets.s
In file included from include/linux/types.h:5:0,
from include/linux/mod_devicetable.h:11,
from scripts/mod/devicetable-offsets.c:2:
include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
[...]
WRAP arch/arm/include/generated/asm/types.h

These makefile and scripts are a bit beyond my immediate understanding
so can't suggest a fix.

--
Tixy


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/