Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-22-2019, 07:24 AM   #1
LQ Newbie
Registered: May 2019
Posts: 2

Rep: Reputation: Disabled
Kernel fails to compile

After including a driver in kernel using make menuconfig.
I try to build the entire kernel but it throws error as below.

scripts/kconfig/conf --silentoldconfig Kconfig
*** Configuration file ".config" not found!
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.

Can anyone explain how to rectify these?
Old 05-22-2019, 10:01 AM   #2
Senior Member
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 2,969
Blog Entries: 7

Rep: Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549
You need a configuration file (always called .config) to build a kernel. You can get one with sensible defaults by using the command make defconfig. Then use make menuconfig to explore the configuration and make any necessary changes.
Old 05-22-2019, 11:35 PM   #3
LQ Newbie
Registered: May 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your reply,

I try to build the kernel after using make defconfig and it throws another error as below.
scripts/kconfig/conf --silentoldconfig Kconfig
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_64.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
WRAP arch/x86/include/generated/asm/clkdev.h
WRAP arch/x86/include/generated/asm/mcs_spinlock.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/sortextable
CC init/main.o
In file included from include/linux/kernel_stat.h:8:0,
from init/main.c:32:
include/linux/interrupt.h: In function ‘tasklet_unlock’:
include/linux/interrupt.h:502:2: error: implicit declaration of function ‘smp_mb__before_atomic’ [-Werror=implicit-function-declaration]
include/linux/interrupt.h: In function ‘tasklet_disable_nosync’:
include/linux/interrupt.h:550:2: error: implicit declaration of function ‘smp_mb__after_atomic’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

#### make failed to build some targets (14 seconds) ####
Old 05-23-2019, 06:13 AM   #4
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,699

Rep: Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981
please do not post centered text, this is more or less unreadable.
You need to use code tags to insert such text.
Old 05-25-2019, 09:46 AM   #5
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,810

Rep: Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443Reputation: 1443
Are you building for your own system to boot, or building one for a different system?

Frequently the "defconfig" is not necessarily the right one to use, and the error messages imply there is a conflicting option being specified... (basically, a bug in the defconfig, but it can depend on which architecture is the default).

I use what is specified in the /boot/config-<version>... file.

That way I know it is coming from a working configuration foundation for the system I am using.

All I do is "cp /boot/config-<version>... .config"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
kernel-package fails to compile kernel headers on (*)Ubuntu 16.04.2 donald3.heckel Linux - Software 2 05-26-2017 08:44 PM
GCC fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check jaydoc Linux From Scratch 1 01-28-2009 05:17 PM
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 06:51 AM
Mandrake 10 off. 2.6.3 kernel fails to compile... why???? Samppa72 Mandriva 1 07-23-2004 08:55 PM
New Debian kernel fails to compile rickenbacherus Linux - Software 1 07-19-2003 08:56 AM > Forums > Linux Forums > Linux - Newbie

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

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