LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Removal of include/linux/config.h file in 2.6.19 kernel (https://www.linuxquestions.org/questions/linux-kernel-70/removal-of-include-linux-config-h-file-in-2-6-19-kernel-506363/)

/bin/bash 11-30-2006 07:39 PM

Removal of include/linux/config.h file in 2.6.19 kernel
 
The file include/linux/config.h has been removed from 2.6.19 kernel. So remember this if you build your favorite module against the new 2.6.19 kernel and you get an error similar to this:

In file included from /usr/src/modules/qc-usb-0.6.4/qc-driver.c:47:
/usr/src/modules/qc-usb-0.6.4/quickcam.h:79:26: linux/config.h: No such file or directory



Thats because there is no more include/linux/config.h file in 2.6.19. This is from the Changelog:

Quote:

Author: Dave Jones <someone@someplace.com>
Date: Mon Oct 9 19:13:51 2006 -0400

[HEADERS] Put linux/config.h out of its misery.

Signed-off-by: Dave Jones <someone@someplace.com>



Author: Paul Mundt <nameremoved@a-linux-company.org>
Date: Tue Oct 3 13:19:02 2006 +0900

sh: Kill off remaining config.h references.

A few of these managed to sneak back in, get rid of them once
and for all.
What I did was to modify the code and commented out all instances of the include statement :
#include <linux/config.h>
This seemed to work. Another trick that worked was just do this:
touch /usr/src/linux/include/linux/config.h

gkiagia 12-01-2006 01:30 AM

Thanks for the information. It will be usefull.

axobeauvi 12-01-2006 10:32 AM

well the .h files are not from the main kernel package ,they are from the devel package(unless you built it yourself)
if kernel-devel(or -source depending on distro) isn't installed there wouldn't be any useful includes

gkiagia 12-01-2006 12:34 PM

Quote:

Originally Posted by axobeauvi
well the .h files are not from the main kernel package ,they are from the devel package(unless you built it yourself)
if kernel-devel(or -source depending on distro) isn't installed there wouldn't be any useful includes

I usually build the kernel myself... I am currently using 2.6.17-beyond4 but I plan to build 2.6.19 soon, so this information will be usefull.

/bin/bash 12-02-2006 03:34 AM

Quote:

Posted by axobeauvi
well the .h files are not from the main kernel package ,they are from the devel package(unless you built it yourself)
if kernel-devel(or -source depending on distro) isn't installed there wouldn't be any useful includes
The reason I posted this is for people who have the kernel sources installed and are trying to build a module against the sources and are getting the error I mentioned. You wouldn't be trying to build a module for the 2.6.19 kernel unless you had the sources installed.

Actually there is not much to the file:
Code:

#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
/* This file is no longer in use and kept only for backward compatibility.
 * autoconf.h is now included via -imacros on the commandline
 */
#include <linux/autoconf.h>

#endif

So if you have problems you could probably just add to code here to your module.c file.


All times are GMT -5. The time now is 12:27 PM.