LINUX KERNEL build fail impossible to debug:
build error for kernel
The thing about building linux kernel is i have no idea where the error is and it does not tell clearly which file/line the error is coming from:
For example:
1)
Makefile:69: but there are so many makefiles in kernel source, it is impossible to tell which one?
2) make: *** [Makefile:1437: tools/objtool] Error 2
This above make one to believe it is a makefile in tools/objtool folder but there is a Makefile in there but it only has 71 lines.
WT...??
sudo make -j64
mkdir -p /home/nonroot/extdir/gg/git/kernelbuild/5.14.0-480.el9.x86_64/tools/objtool && make O=/home/nonroot/extdir/gg/git/kernelbuild/5.14.0-480.el9.x86_64 subdir=tools/objtool --no-print-directory -C objtool
make[2]: *** [Makefile:53: /home/nonroot/extdir/gg/git/kernelbuild/5.14.0-480.el9.x86_64/tools/objtool/objtool-in.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:69: objtool] Error 2
make: *** [Makefile:1437: tools/objtool] Error 2
make: *** Waiting for unfinished jobs....
scripts/Makefile.build:415: warning: overriding recipe for target 'modules.order'
Makefile:1531: warning: ignoring old recipe for target 'modules.order'
Answers
-
i managed to build with --debug option and found following but output seems too verbose and i could not make anything out of it...?
(partial log)
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File '__all' does not exist.
File 'all' does not exist.
File 'autoksyms_recursive' does not exist.
Must remake target 'autoksyms_recursive'.
Successfully remade target file 'autoksyms_recursive'.
File 'descend' does not exist.
File 'init' does not exist.
File 'prepare' does not exist.
File 'prepare0' does not exist.
File 'archprepare' does not exist.
File 'outputmakefile' does not exist.
Must remake target 'outputmakefile'.
Successfully remade target file 'outputmakefile'.
File 'archheaders' does not exist.
Must remake target 'archheaders'.
File 'archscripts' does not exist.
File 'scripts_basic' does not exist.
Must remake target 'scripts_basic'.
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File 'all' does not exist.
File 'FORCE' does not exist.
Must remake target 'FORCE'.
Successfully remade target file 'FORCE'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/uapi/asm/unistd_32.h' does not exist.
Must remake target 'arch/x86/include/generated/uapi/asm/unistd_32.h'.
Successfully remade target file 'arch/x86/include/generated/uapi/asm/unistd_32.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/uapi/asm/unistd_64.h' does not exist.
Must remake target 'arch/x86/include/generated/uapi/asm/unistd_64.h'.
Successfully remade target file 'arch/x86/include/generated/uapi/asm/unistd_64.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/uapi/asm/unistd_x32.h' does not exist.
Must remake target 'arch/x86/include/generated/uapi/asm/unistd_x32.h'.
Successfully remade target file 'arch/x86/include/generated/uapi/asm/unistd_x32.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/asm/syscalls_32.h' does not exist.
Must remake target 'arch/x86/include/generated/asm/syscalls_32.h'.
Successfully remade target file 'arch/x86/include/generated/asm/syscalls_32.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/asm/unistd_32_ia32.h' does not exist.
Must remake target 'arch/x86/include/generated/asm/unistd_32_ia32.h'.
Successfully remade target file 'arch/x86/include/generated/asm/unistd_32_ia32.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/asm/unistd_64_x32.h' does not exist.
Must remake target 'arch/x86/include/generated/asm/unistd_64_x32.h'.
Successfully remade target file 'arch/x86/include/generated/asm/unistd_64_x32.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/asm/syscalls_64.h' does not exist.
Must remake target 'arch/x86/include/generated/asm/syscalls_64.h'.
Successfully remade target file 'arch/x86/include/generated/asm/syscalls_64.h'.
Prerequisite 'FORCE' of target 'arch/x86/include/generated/asm/xen-hypercalls.h' does not exist.
Must remake target 'arch/x86/include/generated/asm/xen-hypercalls.h'.
Successfully remade target file 'arch/x86/include/generated/asm/xen-hypercalls.h'.0 -
That sounds incredibly frustrating, especially when the build process fails without giving any useful clues about the root cause. Sometimes checking unrelated system logs or dependency mismatches can reveal issues that the kernel output misses. I recently came across some interesting data while browsing Criminal Records Search and it reminded me how important detailed logging is when tracking down complex problems. Hopefully you can isolate the failing component and get a more actionable error message soon.
0
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 19 LFS256 Class Forum
- 1.4K LFS258 Class Forum
- 165 LFS261 Class Forum
- 26 LFS267 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 105 Mobile Computing
- 18 Android
- 72 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 944 Programming and Development
- 310 Kernel Development
- 616 Software Development
- 976 Software
- 368 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)