LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2014, 11:53 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
debian - where is the build directory in /lib/modules?


Hi!

I just installed a debian box (running on qemu... don't have much installed as a matter of fact).

I'm trying to compile the sbull driver but I find there's no build directory inside /lib/mudules:

Code:
root@debian:~/sbull# make
make -C /lib/modules/3.2.0-4-686-pae/build M=/root/sbull modules
make: *** /lib/modules/3.2.0-4-686-pae/build: No such file or directory.  Stop.
make: *** [all] Error 2
root@debian:~/sbull# ls /lib/modules/3.2.0-4-686-pae/build
ls: cannot access /lib/modules/3.2.0-4-686-pae/build: No such file or directory
that makes sense... the directory is missing indeed so... where is it? I bet there's something I have to install (I already instaled linux-sources, just in case).

Thanks in advance.
 
Old 05-27-2014, 12:26 AM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
perhaps the problem is my Makefile:

Code:
obj-m := sbull.o

PWD := $(shell pwd)
KDIR := /lib/modules/$(shell uname -r)/build

all:
        make -C $(KDIR) M=$(PWD) modules
clean:
        make -C $(KDIR) M=$(PWD) clean
 
Old 05-27-2014, 12:30 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

it should be in the linux-headers package that correponds to your kernel. Eg
Code:
apt-get install linux-headers-$(uname -r)
Evo2.
 
2 members found this post helpful.
Old 05-27-2014, 12:40 AM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Dude, you are right... now I'm getting a ton of error messages from the compilation process. So glad. Thanks!
 
  


Reply

Tags
build, linux, module, modules, sbull



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/lib/modules/2.6.38-8-generic/build: No such file or directory. saman_artorious Linux - Software 1 02-23-2013 09:32 AM
[SOLVED] make: *** /lib/modules//build: No such file or directory. Stop. boidi Linux - Newbie 15 06-30-2010 01:54 AM
How to build /lib/modules/2.6.30.3 ? JonesD1 Linux - Newbie 6 08-16-2009 08:26 AM
Missing /lib/modules/<build name>/build for installing HP PSPs mikemc58 Linux - Server 1 06-10-2009 09:18 AM
/lib/modules/2.6.7/build/ - where is it? bobbens Debian 3 11-25-2004 10:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration