Hide Forgot
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.
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.
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.
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.
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.
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.
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.
Laura fixed make prepare in rawhide in the meantime. It will be available in f24.