Bug 1304938

Summary: Kernel-devel won't "make prepare" with a failure
Product: [Fedora] Fedora Reporter: Robin Laing <mesat>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: daniele, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-09 13:52:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Robin Laing 2016-02-05 02:17:05 UTC
Description of problem: While trying to build a binary file for a driver, I was getting an error and in the statement it requested that the kernel source needed to have two make scripts run.

make oldconfig and make prepare.

When I ran the scripts, make prepare failed.


Version-Release number of selected component (if applicable):
kernel-devel-4.3.4-300.fc23.x86_64

How reproducible:
Multiple attempts on three machines.  All fully updated.  One with no extra drivers necessary so only for test.

Steps to Reproduce:
1.  dnf install kernel-devel
2.  go to /usr/src/kernels/{version}
3.  Run "make oldconfig"
4.  Run "make prepare"
5.  Read error.

Actual results:
Error message generated.

 make prepare
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'.  Stop.
arch/x86/Makefile:191: recipe for target 'archheaders' failed
make: *** [archheaders] Error 2


Expected results:
make prepare to exit with no warnings allowing the kernel build package to work.

Additional info:
I have searched and cannot find any way of working around this.  It has been an issue in the past with kernels.  I wonder if there is a package that needs to be installed as well but I have not been able to find it.

This is critical as it prevent required drivers to be built and installed to make the computer fully usable.

Comment 1 Josh Boyer 2016-02-05 08:29:30 UTC
You shouldn't need to run make prepare to build external modules.  The existing kernel-devel package is used to build external modules successfully in e.g. rpmfusion.  The advice your driver is giving you seems wrong.

Comment 2 Robin Laing 2016-02-06 21:46:13 UTC
Even running "make prepare" on a clean system doesn't work.  In my testing I tried it on three different machines and they all failed the same.  It is part of the kernel source, not the module source.  The message is generated from the Makefile

From the kernel Makefile.

include/config/auto.conf:
        $(Q)test -e include/generated/autoconf.h -a -e $@ || (          \
        echo >&2;                                                       \
        echo >&2 "  ERROR: Kernel configuration is invalid.";           \
        echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
        echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
        echo >&2 ;                                                      \
        /bin/false)

# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".

Either the Makefile is not correct or some part of the source is not being downloaded.  It is still a bug.  From what I have read, I cannot find an decent description of what make prepare is supposed to do.

I got around the issue as I missed a step before trying to make the module not related to this issue.

Comment 3 Josh Boyer 2016-02-07 07:58:43 UTC
Yes, it doesn't work.  There are many make targets that won't work with the kernel-devel package as it is not a complete set of sources.  That isn't really a problem at all.

That being said, one of our team members is working on a patch to make this work even.

Comment 4 Robin Laing 2016-02-09 05:27:25 UTC
Thank you for the update.

It is interesting that the Source isn't a complete source.  It would be interesting to know what is missing from the sources and have that documented someplace for situations just like this.

Comment 5 Josh Boyer 2016-02-09 13:32:05 UTC
I said the kernel-devel package doesn't contain the full source.  It is not the Source package.  The kernel SRPM contains the full source and is available from the repos as usual.

The kernel-devel package, as it says in the RPM metadata, only contains the makefiles and header files needed to build modules.  It has always been this way.

Comment 6 Robin Laing 2016-03-09 04:45:48 UTC
Okay.

I was only trying what the software was telling me what to do.

I wouldn't read the RPM metadata and I was trying to build modules which gave me the instructions to run the make commands.

Thank you.

Comment 7 Josh Boyer 2016-03-09 13:52:28 UTC
Laura fixed make prepare in rawhide in the meantime.  It will be available in f24.