Linux 5.12.9 compilation issues in swab.h, byteorder/little_endian.h
by kabirbg from LinuxQuestions.org on (#5JWED)
Hi! I'm trying to compile the Linux 5.12.9 kernel (for a KISS Linux installation); I was originally trying out the Zen kernel but tried switching to the vanilla kernel from kernel.org and experienced the same issue. This issue was that, after generating a config with `make defconfig` and reviewing `make menuconfig` (although I did not edit anything in the config at all), `make -j4` failed very soon with a compiler error. I'm a first-timer at compiling the kernel, so I have no idea what went wrong, but I'm wondering if there are some options I ought to have changed in the config pre-compilation that I didn't? The make output told me the following (a lot of times):
Code:/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline
[/usr/include/linux/swab.h:184:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab32p'and
Code:/usr/include/linux/byteorder/little_endian.h:44:8: error: unknown type name '__always_inline'
/usr/include/linux/byteorder/little_endian.h:60:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le16p'The errors are pretty similar, there only seem to be two types of errors and only in two files. I did install libelf, I'm on a working KISS chroot; any advice as to what could be causing the errors would be super helpful. My thanks in advance - and apologies if this is a question better suited to one of the other subforums!
Code:/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline
[/usr/include/linux/swab.h:184:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab32p'and
Code:/usr/include/linux/byteorder/little_endian.h:44:8: error: unknown type name '__always_inline'
/usr/include/linux/byteorder/little_endian.h:60:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le16p'The errors are pretty similar, there only seem to be two types of errors and only in two files. I did install libelf, I'm on a working KISS chroot; any advice as to what could be causing the errors would be super helpful. My thanks in advance - and apologies if this is a question better suited to one of the other subforums!