Some problems on compiling modules

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Some problems on compiling modules

Postby Tasem » Jan 4th, '16, 10:51

Hi, I'm fairly new and have little knowledge on these sorts of things, so I apologize in advance if I give little to no detail on stuff that's actually relevant to the problem. Anyway, here it goes.
My teacher gave me a premade file which I had to compile. so I compile it from the konsole, using ./mmake kello command. But then, the konsole gives me this error message :
Code: Select all
make -C /lib/modules/4.1.13-desktop-2.mga5/build SUBDIRS=/home/tasem/Desktop/KernMod/kernelmod modules
make[1]: *** /lib/modules/4.1.13-desktop-2.mga5/build: No such file or directory.  Stop.
Makefile:9: recipe for target 'default' failed
make: *** [default] Error 2

What is going wrong ? Do I have to install a packet ?
A help would be appreciated.
Thanks !
Last edited by doktor5000 on Jan 4th, '16, 11:26, edited 1 time in total.
Reason: fixed code tags
Tasem
 
Posts: 1
Joined: Jan 4th, '16, 10:47

Re: Some problems on compiling modules

Postby doktor5000 » Jan 4th, '16, 11:25

Tasem wrote:
Code: Select all
make[1]: *** /lib/modules/4.1.13-desktop-2.mga5/build: No such file or directory.  Stop.

What is going wrong ? Do I have to install a packet ?

Yes, the line above tells you what is missing. /lib/modules/KERNELVERSION/build should be a link to kernel sources or at least to the kernel header files so you can compile additional modules for your running kernel.
Code: Select all
[doktor5000@Mageia5]─[10:21:28]─[~] ll /lib/modules/$(uname -r)/build
lrwxrwxrwx 1 root root 37 Nov 20 11:03 /lib/modules/4.1.13-desktop-2.mga5/build -> /usr/src/kernel-4.1.13-desktop-2.mga5/


Best install kernel-desktop-devel-latest metapackage which installs the kernel-devel package for the running kernel and also takes care of keeping it up-to-date.

If that is not sufficient and you need the full kernel sources (that would be pretty uncommon when building a simple module, but might happen) you may need to install the kernel-source package.

Don't hesitate to ask if you have further questions.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest