LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2021, 07:20 PM   #1
kabirbg
LQ Newbie
 
Registered: Jun 2021
Distribution: Artix
Posts: 5

Rep: Reputation: Disabled
Linux 5.12.9 compilation issues in swab.h, byteorder/little_endian.h


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!
 
Old 06-10-2021, 03:19 PM   #2
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
You may try to customize configuration file for Slackware huge kernel - Slackware is using vanilla kernel.
 
Old 06-10-2021, 04:20 PM   #3
kabirbg
LQ Newbie
 
Registered: Jun 2021
Distribution: Artix
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi, thanks for the quick reply!! If I’m understanding correctly, you suggest using the config file for Slack’s huge kernel for my KISS system? Do you know where I can download the config file (or the whole sources) for the huge kernel? I tried looking around on Slack Wiki and googling but couldn’t really find much… Or did I misunderstand?

Last edited by kabirbg; 06-11-2021 at 06:47 AM.
 
Old 06-11-2021, 02:57 AM   #4
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Of course you can use kernel - I am suggesting to use config file for Slackware kernel. You can customize it for your needs - but first of to build. To resolve the problem of source of issue.
 
Old 06-13-2021, 07:31 PM   #5
kabirbg
LQ Newbie
 
Registered: Jun 2021
Distribution: Artix
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi, I tried using the config file at https://mirrors.slackware.com/slackw...ernels/huge.s/, but I got the same output from make. I'm going to include the full output here now, if it helps:

Code:
  DESCEND  objtool
diff: unrecognized option: I
BusyBox v1.33.0 (2021-03-26 01:34:08 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'
diff -u tools/arch/x86/include/asm/inat.h arch/x86/include/asm/inat.h
diff: unrecognized option: I
BusyBox v1.33.0 (2021-03-26 01:34:08 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/insn.h' differs from latest version at 'arch/x86/include/asm/insn.h'
diff -u tools/arch/x86/include/asm/insn.h arch/x86/include/asm/insn.h
diff: unrecognized option: I
BusyBox v1.33.0 (2021-03-26 01:34:08 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace
Warning: Kernel ABI header at 'tools/arch/x86/lib/inat.c' differs from latest version at 'arch/x86/lib/inat.c'
diff -u tools/arch/x86/lib/inat.c arch/x86/lib/inat.c
diff: unrecognized option: I
BusyBox v1.33.0 (2021-03-26 01:34:08 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace
Warning: Kernel ABI header at 'tools/arch/x86/lib/insn.c' differs from latest version at 'arch/x86/lib/insn.c'
diff -u tools/arch/x86/lib/insn.c arch/x86/lib/insn.c
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CC       /usr/src/linux/linux-5.12.9/tools/objtool/arch/x86/decode.o
In file included from /usr/include/linux/byteorder/little_endian.h:13,
                 from /usr/include/asm/byteorder.h:5,
                 from /usr/src/linux/linux-5.12.9/tools/arch/x86/include/asm/insn.h:10,
                 from arch/x86/decode.c:10:
/usr/include/linux/swab.h:136:23: error: expected ';' before 'unsigned'
  136 | static __always_inline unsigned long __swab(const unsigned long y)
      |                       ^~~~~~~~~
      |                       ;
/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
  171 | static __always_inline __u16 __swab16p(const __u16 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:171:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab16p'
  171 | static __always_inline __u16 __swab16p(const __u16 *p)
      |                              ^~~~~~~~~
/usr/include/linux/swab.h:184:8: error: unknown type name '__always_inline'
  184 | static __always_inline __u32 __swab32p(const __u32 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:184:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab32p'
  184 | static __always_inline __u32 __swab32p(const __u32 *p)
      |                              ^~~~~~~~~
/usr/include/linux/swab.h:197:8: error: unknown type name '__always_inline'
  197 | static __always_inline __u64 __swab64p(const __u64 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/swab.h:197:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab64p'
  197 | static __always_inline __u64 __swab64p(const __u64 *p)
      |                              ^~~~~~~~~
/usr/include/linux/swab.h:252:23: error: expected ';' before 'void'
  252 | static __always_inline void __swab32s(__u32 *p)
      |                       ^~~~~
      |                       ;
/usr/include/linux/swab.h:265:23: error: expected ';' before 'void'
  265 | static __always_inline void __swab64s(__u64 *p)
      |                       ^~~~~
      |                       ;
In file included from /usr/include/asm/byteorder.h:5,
                 from /usr/src/linux/linux-5.12.9/tools/arch/x86/include/asm/insn.h:10,
                 from arch/x86/decode.c:10:
/usr/include/linux/byteorder/little_endian.h:44:8: error: unknown type name '__always_inline'
   44 | static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:44:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le64p'
   44 | static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:48:8: error: unknown type name '__always_inline'
   48 | static __always_inline __u64 __le64_to_cpup(const __le64 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:48:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le64_to_cpup'
   48 | static __always_inline __u64 __le64_to_cpup(const __le64 *p)
      |                              ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:52:8: error: unknown type name '__always_inline'
   52 | static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:52:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le32p'
   52 | static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:56:8: error: unknown type name '__always_inline'
   56 | static __always_inline __u32 __le32_to_cpup(const __le32 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:56:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le32_to_cpup'
   56 | static __always_inline __u32 __le32_to_cpup(const __le32 *p)
      |                              ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:60:8: error: unknown type name '__always_inline'
   60 | static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:60:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le16p'
   60 | static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:64:8: error: unknown type name '__always_inline'
   64 | static __always_inline __u16 __le16_to_cpup(const __le16 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:64:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le16_to_cpup'
   64 | static __always_inline __u16 __le16_to_cpup(const __le16 *p)
      |                              ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:68:8: error: unknown type name '__always_inline'
   68 | static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:68:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_be64p'
   68 | static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:72:8: error: unknown type name '__always_inline'
   72 | static __always_inline __u64 __be64_to_cpup(const __be64 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:72:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be64_to_cpup'
   72 | static __always_inline __u64 __be64_to_cpup(const __be64 *p)
      |                              ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:76:8: error: unknown type name '__always_inline'
   76 | static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:76:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_be32p'
   76 | static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:80:8: error: unknown type name '__always_inline'
   80 | static __always_inline __u32 __be32_to_cpup(const __be32 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:80:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be32_to_cpup'
   80 | static __always_inline __u32 __be32_to_cpup(const __be32 *p)
      |                              ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:84:8: error: unknown type name '__always_inline'
   84 | static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:84:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_be16p'
   84 | static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
      |                               ^~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:88:8: error: unknown type name '__always_inline'
   88 | static __always_inline __u16 __be16_to_cpup(const __be16 *p)
      |        ^~~~~~~~~~~~~~~
/usr/include/linux/byteorder/little_endian.h:88:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be16_to_cpup'
   88 | static __always_inline __u16 __be16_to_cpup(const __be16 *p)
      |                              ^~~~~~~~~~~~~~
make[4]: *** [/usr/src/linux/linux-5.12.9/tools/build/Makefile.build:97: /usr/src/linux/linux-5.12.9/tools/objtool/arch/x86/decode.o] Error 1
make[3]: *** [/usr/src/linux/linux-5.12.9/tools/build/Makefile.build:139: arch/x86] Error 2
make[2]: *** [Makefile:56: /usr/src/linux/linux-5.12.9/tools/objtool/objtool-in.o] Error 2
make[1]: *** [Makefile:69: objtool] Error 2
make: *** [Makefile:1978: tools/objtool] Error 2
 
Old 06-13-2021, 07:54 PM   #6
kabirbg
LQ Newbie
 
Registered: Jun 2021
Distribution: Artix
Posts: 5

Original Poster
Rep: Reputation: Disabled
Actually, I think I figured it out. See https://k1sslinux.org/news/20210507a; fixing the include issue in the source code did the trick. Thanks anyways!
 
Old 01-17-2024, 12:42 PM   #7
CJ101
LQ Newbie
 
Registered: Jan 2024
Location: Hawler
Posts: 1

Rep: Reputation: 0
Unhappy Dead Link :(

How Can I Solve This?
 
Old 01-19-2024, 11:39 AM   #8
LBob
LQ Newbie
 
Registered: Sep 2005
Location: Serbia & Montenegro
Distribution: Debian Wheezy, amd64
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by CJ101 View Post
How Can I Solve This?
If you are talking about the dead link, then:

https://web.archive.org/web/20210629...news/20210507a
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
patch-5.12 eliminates tools/arch/x86/include/asm/byteorder.h but insn.h and orc_types.h still include it RandomTroll Linux - Kernel 0 04-27-2021 04:56 PM
DNS issues, Downloading issues, Web issues. UbuntuHelp Linux - Networking 1 08-28-2012 07:34 AM
[SOLVED] Graphical Compilation/ IDE Compilation monika.2dec Ubuntu 4 08-22-2012 06:53 PM
qt-embedded swab error kasimMCA Linux - Embedded & Single-board computer 3 10-28-2011 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration