[Letux-kernel] v5.9-rc1 compile issue
H. Nikolaus Schaller
hns at goldelico.com
Tue Aug 18 10:46:13 CEST 2020
Hi David,
> Am 18.08.2020 um 09:56 schrieb David Shah <dave at ds0.me>:
>
> The full command I ran was a gcc command I observed make running; with -H added
> and the source file replaced by include/linux/ratelimit_types.h (very long!):
>
> arm-none-linux-gnueabihf-gcc -H -Wp,-MMD,fs/.dcache.o.d -nostdinc -isystem
> /home/david/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-
> gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/9.2.1/include
> -I./arch/arm/include -I./arch/arm/include/generated -I./include
> -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi
> -I./include/generated/uapi -include ./include/linux/kconfig.h -include
> ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Wall -Wundef
> -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
> -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-
> int -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-ipa-sra
> -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated
> -D__LINUX_ARM_ARCH__=6 -march=armv6k -mtune=arm1136j-s -msoft-float -Uarm -fno-
> delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-
> format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-
> races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-
> variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer
> -fno-var-tracking-assignments -gsplit-dwarf -gdwarf-4 -Wdeclaration-after-
> statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds
> -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-
> overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-
> stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-
> init -fmacro-prefix-map=./= -Wno-packed-not-aligned -fplugin=./scripts/gcc-
> plugins/arm_ssp_per_task_plugin.so -fplugin-arg-arm_ssp_per_task_plugin-tso=1
> -fplugin-arg-arm_ssp_per_task_plugin-offset=24 -DKBUILD_MODFILE='"fs/dcache"'
> -DKBUILD_BASENAME='"dcache"' -DKBUILD_MODNAME='"dcache"' -c
> include/linux/ratelimit_types.h
I had to remove some -isystem, and some -W and all -fplugin but then it works :)
>
> To avoid seeing the compile errors mixed in with the output, running with "-M
> -H" will run the preprocessor only.
>
> Best
>
> David
>
> On Tue, 2020-08-18 at 09:11 +0200, H. Nikolaus Schaller wrote:
>>> Am 17.08.2020 um 23:24 schrieb David Shah <dave at ds0.me>:
>>>
>>> I'm pretty sure these are supposed to come from include/linux/types.h (via
>>> the
>>> files this includes)
>>
>> Well it only includes uapi/linux/types.h
>>
>>> in this context.
>>>
>>> Running gcc -H
>>
>> thats nice. I didn't know about this gcc option after using it for 20 years...
>>
>>> on the problematic header (on upstream 5.9) gets the following
>>> include graph:
>>>
>>> . ./include/linux/bits.h
>>> .. ./include/linux/const.h
>>> ... ./include/vdso/const.h
>>> .... ./include/uapi/linux/const.h
>>> .. ./include/vdso/bits.h
>>> .. ./arch/arm/include/generated/uapi/asm/bitsperlong.h
>>> ... ./include/asm-generic/bitsperlong.h
>>> .... ./include/uapi/asm-generic/bitsperlong.h
>>> .. ./include/linux/build_bug.h
>>> ... ./include/linux/compiler.h
>>> .... ./include/linux/compiler_types.h
>>> .... ./arch/arm/include/generated/asm/rwonce.h
>>> ..... ./include/asm-generic/rwonce.h
>>> ...... ./include/linux/kasan-checks.h
>>> ....... ./include/linux/types.h
>>> ........ ./include/uapi/linux/types.h
>>> ......... ./arch/arm/include/uapi/asm/types.h
>>> .......... ./include/asm-generic/int-ll64.h
>>> ........... ./include/uapi/asm-generic/int-ll64.h
>>> ............ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
>>> ......... ./include/uapi/linux/posix_types.h
>>> .......... ./include/linux/stddef.h
>>> ........... ./include/uapi/linux/stddef.h
>>> .......... ./arch/arm/include/uapi/asm/posix_types.h
>>> ........... ./include/uapi/asm-generic/posix_types.h
>>> ............ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
>>> ...... ./include/linux/kcsan-checks.h
>>> . ./include/uapi/linux/param.h
>>> .. ./arch/arm/include/generated/uapi/asm/param.h
>>> ... ./include/asm-generic/param.h
>>> .... ./include/uapi/asm-generic/param.h
>>> . ./include/linux/spinlock_types.h
>>> .. ./arch/arm/include/asm/spinlock_types.h
>>> .. ./include/linux/lockdep_types.h
>>> .. ./include/linux/rwlock_types.h
Now I get (with letux tree):
iMac:master hns$ LANG=C /Users/hns/Documents/Projects/QuantumSTEP/System/Library/Frameworks/System.framework/Versions/x86_64-apple-darwin15.0.0/gcc/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -H -Wp,-MMD,fs/.dcache.o.d -nostdinc -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=6 -march=armv6k -mtune=arm1136j-s -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -gsplit-dwarf -gdwarf-4 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Wno-packed-not-aligned -DKBUILD_MODFILE='"fs/dcache"' -DKBUILD_BASENAME='"dcache"' -DKBUILD_MODNAME='"dcache"' -c include/linux/ratelimit_types.h
. ./include/linux/bits.h
.. ./include/linux/const.h
... ./include/vdso/const.h
.... ./include/uapi/linux/const.h
.. ./include/vdso/bits.h
.. ./arch/arm/include/generated/uapi/asm/bitsperlong.h
... ./include/asm-generic/bitsperlong.h
.... ./include/uapi/asm-generic/bitsperlong.h
.. ./include/linux/build_bug.h
... ./include/linux/compiler.h
.... ./include/linux/compiler_types.h
--- here is missing:
>>> .... ./arch/arm/include/generated/asm/rwonce.h
>>> ..... ./include/asm-generic/rwonce.h
>>> ...... ./include/linux/kasan-checks.h
>>> ....... ./include/linux/types.h
>>> ........ ./include/uapi/linux/types.h
>>> ......... ./arch/arm/include/uapi/asm/types.h
>>> .......... ./include/asm-generic/int-ll64.h
>>> ........... ./include/uapi/asm-generic/int-ll64.h
>>> ............ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
>>> ......... ./include/uapi/linux/posix_types.h
>>> .......... ./include/linux/stddef.h
>>> ........... ./include/uapi/linux/stddef.h
>>> .......... ./arch/arm/include/uapi/asm/posix_types.h
>>> ........... ./include/uapi/asm-generic/posix_types.h
>>> ............ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
>>> ...... ./include/linux/kcsan-checks.h
. ./include/uapi/linux/param.h
.. ./arch/arm/include/generated/uapi/asm/param.h
... ./include/asm-generic/param.h
.... ./include/uapi/asm-generic/param.h
. ./include/linux/spinlock_types.h
.. ./arch/arm/include/asm/spinlock_types.h
In file included from ./include/linux/spinlock_types.h:13:0,
from include/linux/ratelimit_types.h:7:
./arch/arm/include/asm/spinlock_types.h:13:3: error: unknown type name 'u32'
u32 slock;
^
./arch/arm/include/asm/spinlock_types.h:19:4: error: unknown type name 'u16'
u16 owner;
^
./arch/arm/include/asm/spinlock_types.h:20:4: error: unknown type name 'u16'
u16 next;
^
./arch/arm/include/asm/spinlock_types.h:29:2: error: unknown type name 'u32'
u32 lock;
^
.. ./include/linux/lockdep_types.h
... ./include/linux/types.h
.... ./include/uapi/linux/types.h
..... ./arch/arm/include/uapi/asm/types.h
...... ./include/asm-generic/int-ll64.h
....... ./include/uapi/asm-generic/int-ll64.h
........ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
..... ./include/uapi/linux/posix_types.h
...... ./include/linux/stddef.h
....... ./include/uapi/linux/stddef.h
...... ./arch/arm/include/uapi/asm/posix_types.h
....... ./include/uapi/asm-generic/posix_types.h
........ ./arch/arm/include/generated/uapi/asm/bitsperlong.h
.. ./include/linux/rwlock_types.h
Multiple include guards may be useful for:
./arch/arm/include/generated/uapi/asm/param.h
./include/generated/autoconf.h
./include/linux/compiler-gcc.h
./include/uapi/linux/stddef.h
cc1: warning: unrecognized command line option "-Wno-packed-not-aligned"
cc1: warning: unrecognized command line option "-Wno-restrict"
cc1: warning: unrecognized command line option "-Wno-stringop-overflow"
cc1: warning: unrecognized command line option "-Wno-stringop-truncation"
cc1: warning: unrecognized command line option "-Wno-unused-const-variable"
cc1: warning: unrecognized command line option "-Wno-address-of-packed-member"
cc1: warning: unrecognized command line option "-Wno-format-overflow"
cc1: warning: unrecognized command line option "-Wno-format-truncation"
cc1: warning: unrecognized command line option "-Wno-frame-address"
iMac:master hns$
>> What I have also observed in the past months is that compiler dependencies are
>> increasing...
So I now can check why my compiler does not include ./arch/arm/include/generated/asm/rwonce.h
although it exists. And why it happens for the first time in fs/dcache.c
after successfully building a lot of other stuff. So something must also be special here.
With v5.9-rc1 it works. So I have some conflicting patch in Letux. Maybe one of
the compile-fixes needed for earlier kernels?
BR and thanks for the great help,
Nikolaus
More information about the Letux-kernel
mailing list