cannot find linux/module.h
i am using a fedora 8 distribution , when i tried to write a sample module and compile it for loading it dynamically into the kernel , it gave an error saying that there is no header as such : <linux/module.h>
i could not find the reason , ....... i have installed all the required RPMS , the list of kernel related RPMS installed are : kernel-debug-2.6.23.1-42.fc8 kernel-2.6.23.1-42.fc8 kernel-headers-2.6.23.1-42.fc8 kernel-PAE-2.6.23.1-42.fc8 kernel-xen-devel-2.6.21-2950.fc8 kernel-PAE-devel-2.6.23.1-42.fc8 kernel-debug-devel-2.6.23.1-42.fc8 kernel-xen-2.6.21-2950.fc8 but i am still not able to get the header file /usr/include/linux/module.h ..... can anyone help me out ....? |
You may need a symbolic link. When Fedora 8 installs the header files or kernel source /usr/src/kernels they are usually installed with the version number included in the name. That way you can have more than one version's source installed at the same time. The compile typically looks for a header file or source file with a general name so you need a symbolic link from the general name to the release specific name. For example if you have linux source installed as /usr/src/kernels/linux-2.6.23.1-42.fc8 then you need a symbolic link like:
ln -s /usr/src/kernels/linux-2.6.23.1-42.fc8 /usr/src/linux so that the compiler can find the correct version of the linux source. I am not sure that I have the symbolic link described correctly for Fedora but it will be similar to what I posted. --------------------------- Steve Stites |
Quote:
or /lib/modules/uname -r/source I found on a couple distros even if the source was there the symbolic link to the source was not there. build is linked to headers or source and source is linked to source {uname -r.] mine is /lib/modules/2.6.22.7/build and also /lib/modules/2.6.22.7/ source I always make sure both links are the for some scripts are one way only. the header file you may be missing is from another program that is also need to fulfill the dependences. |
Quote:
when we install programs the header files that are built go to the /usr/include/linux. and from what you told me you do have a /usr/include/linux if you install the full source it uninstalls the pre built headers and installs the full source witch also becomes the /usr/include/ linux. all about kernel flavor. |
The one package that you seem to be missing is kernel-devel.
PD'S |
All times are GMT -5. The time now is 01:54 AM. |