Skip to content

LKL build doesn't work with OUTPUT variable other than the source tree #581

@rodionov

Description

@rodionov

Running mkdir /tmp/lkl/ && OUTPUT=/tmp/lkl/ make -C tools/lkl all V=1 results in the following error:

...
gcc -Wp,-MMD,scripts/mod/.devicetable-offsets.s.d -nostdinc -I./arch/lkl/include -I./arch/lkl/include/generated -I./include -I./arch/lkl/include/uapi -I./arch/lkl/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -fno-builtin -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fno-stack-clash-protection -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wframe-larger-than=1024 -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-restrict -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-overflow -Wno-stringop-truncation -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -DKBUILD_MODFILE='"scripts/mod/devicetable-offsets"' -DKBUILD_BASENAME='"devicetable_offsets"' -DKBUILD_MODNAME='"devicetable_offsets"' -D__KBUILD_MODNAME=kmod_devicetable_offsets -fverbose-asm -S -o scripts/mod/devicetable-offsets.s scripts/mod/devicetable-offsets.c
In file included from ./arch/lkl/include/asm/bitsperlong.h:4,
                 from ./include/uapi/asm-generic/int-ll64.h:12,
                 from ./include/asm-generic/int-ll64.h:11,
                 from ./include/uapi/asm-generic/types.h:7,
                 from ./arch/lkl/include/generated/uapi/asm/types.h:1,
                 from ./include/uapi/linux/types.h:5,
                 from ./include/linux/types.h:6,
                 from ./include/uapi/linux/mei_uuid.h:12,
                 from ./include/uapi/linux/mei.h:10,
                 from ./include/linux/mod_devicetable.h:12,
                 from scripts/mod/devicetable-offsets.c:3:
./arch/lkl/include/uapi/asm/bitsperlong.h:4:10: fatal error: asm/config.h: No such file or directory
    4 | #include <asm/config.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:116: scripts/mod/devicetable-offsets.s] Error 1
make[1]: *** [Makefile:1204: prepare0] Error 2
make: *** [Makefile:91: /tmp/lkl//tools/lkl/lib/lkl.o] Error 2

When OUTPUT variable isn't provided in the make command line, then config.h is generated in $(srctree)/arch/lkl/nclude/generated/uapi/asm/config.h

When OUPUT=/tmp/lkl/ is provided in the make command, then config.h is generated in /tmp/lkl/arch/lkl/include/generated/uapi/asm/config.h

Is there an assumption that config.h should be inside arch/lkl/include/generated/uapi/asm folder? Or we are missing adding path OUTPUT/arch/lkl/include/generated/uapi/asm to the includes?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions