LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2012, 02:24 AM   #1
rpittala
Member
 
Registered: Jan 2012
Location: PUNE
Distribution: SunOS sun4v sparc sun4v Solaris
Posts: 102
Blog Entries: 1

Rep: Reputation: Disabled
Error while doing make and no idea about the error


This is in my Makefile content

obj-m += hello.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
*************************************************************************
The content in my hello.c


Please help me ASAP.
#include<linux/module.h>
#include<linux/init.h>
#include <linux/kernel.h>
int my_init(void)
{
printk("Hello world \n");
return 0;
}
void my_cleanup(void)
{
printk("Goodbye world \n");
}
module_init(my_init);
module_exit(my_cleanup);
**************************************************************************
rajesh@rajesh-Inspiron-N5110:~/raja/dev_drivers$ ls
char_dev hello.c Makefile module.mod.c modules.order Module.symvers
rajesh@rajesh-Inspiron-N5110:~/raja/dev_drivers$ sudo make
[sudo] password for rajesh:
make -C /lib/modules/2.6.35-22-generic/build M= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.35-22-generic'
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-22-generic'
make: *** [all] Error 2

Last edited by rpittala; 01-28-2012 at 02:27 AM.
 
Old 01-28-2012, 09:37 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
Originally Posted by rpittala View Post
make[2]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-22-gen
This would seem to be the error that killed your compile.

I have no idea what may have caused it, but this page may help:

http://www.linuxtutorialblog.com/pos...stall-tutorial

I am assuming that you were doing this with root privileges.

Last edited by frankbell; 01-28-2012 at 09:39 PM.
 
  


Reply



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
Make-3.82 error:Makefile:282:error: mixed implicit and normal rules Ramanc51 Linux - Newbie 5 06-08-2011 07:55 AM
jhbuild: Error during phase build of gnome-shell: Error running make Kenny_Strawn Linux - Desktop 1 07-09-2010 06:01 PM
Unable to compile C++ programs.make:g++ command not found error.Error 127 PrathuD Programming 3 03-16-2009 12:44 PM
RH9 make menuconfig error: make[1]: *** [lxdialog] Error 1 rrochele Linux - Kernel 3 02-07-2007 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:43 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