Find the answer to your Linux question:
Results 1 to 5 of 5
Haii, I compiled a simple kernel module in fedora core 6,shows some error.But the same code worked in RHEL.Any one know the reason pls pls help me.The error message is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    16

    kernel compilation error


    Haii,
    I compiled a simple kernel module in fedora core 6,shows some error.But the same code worked in RHEL.Any one know the reason pls pls help me.The error message is

    make -C /lib/modules/2.6.25-14.fc9.i686/build M=/media/disk/mypgms modules
    make: *** /lib/modules/2.6.25-14.fc9.i686/build: No such file or directory. Stop.
    make: *** [all] Error 2

    and the make file is
    obj-m += hello.o
    all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

    regerds shabeer

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Hi shabeer,
    I'm not sure about exact error messages, Have check this useful guide about LKM,

    The Kernel Newbie Corner: Your First Loadable Kernel Module
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,527
    The kernel build configuration is quite different between FC and various RHEL distributions. Do check on the requirements in either case in order to resolve your problem. In any case, the error is saying that the directory /lib/modules/2.6.25-14.fc9.i686/build doesn't exist. You could create it and see if that fixes your build error, or if something else comes up.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Apr 2007
    Posts
    16
    Thaks for the replays.......
    I think the problem was the missing of kernel headers and i install kdeve-packages(kernel-devel-2.6.25-14.fc9.i686.rpm ), bcoz i am using fc9.
    Now the programs are working fine.and thaks.
    But now i got a warning --Clock skew detected. Your build may be incomplete.
    do u know the reason?? But the insmod and other utilities are working fine with the compiled modus.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,527
    Clock skew would only be an issue if you are doing partial builds where make uses the file time stamps to determine if certain sources need to be compiled or not. If you are doing a complete/clean build, then this will not be an issue since all of the sources will be compiled.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •