LinuxQuestions.org
Visit Jeremy's Blog.
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 05-22-2019, 07:24 AM   #1
richucj
LQ Newbie
 
Registered: May 2019
Posts: 2

Rep: Reputation: Disabled
Kernel fails to compile


Hi,
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.
root@localbox:/LinuxKernel/linux-3.13#



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

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
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
richucj
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/checksyscalls.sh
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]
smp_mb__before_atomic();
^
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]
smp_mb__after_atomic();
^
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
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,676

Rep: Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966Reputation: 3966
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
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,808

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"
 
  


Reply


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

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

All times are GMT -5. The time now is 01:52 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration