LinuxQuestions.org
Help answer threads with 0 replies.
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 10-21-2011, 08:15 PM   #1
roMoon
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
linux/compiler.h: No such file or directory


I came to this problem while making:

$make install
cc -c -O -Wall ezusb.c -o ezusb.o
ezusb.c:33:30: fatal error: linux/compiler.h: No such file or directory
compilation terminated.

I did not find compiler.h in /usr/include/linux/.

Highly appreciate any suggestion THANK U SO MUCH!
 
Old 10-21-2011, 08:31 PM   #2
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,121
Blog Entries: 2

Rep: Reputation: 259Reputation: 259Reputation: 259
You've haven't really provided much info, but I guess first thing I'd suggest is making sure your kernel headers are installed, then check that you have the correct development packages installed too.
 
Old 10-21-2011, 10:10 PM   #3
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
my /usr/include/linux has a compiler.h
it's most likely a kernel version thing
make a backup then edit the file that has
#include <linux/compiler.h>
and take it out
it might be at the top of the c file you are working on ezusb.c or in a .h file included in ezusb.c
 
Old 10-22-2011, 12:51 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
"ezusb.c" is the source for the kernel module 'ezusb.ko'.

Please use a "Module build Makefile" :
Will look for, and find the headers in /usr/src/linux/include/***

Makefile :
Code:
obj-m    := ezusb.o

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

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Type make, and these files are created : ezusb.ko ezusb.mod.c
ezusb.mod.o ezusb.o modules.order Module.symvers

.

Last edited by knudfl; 10-22-2011 at 11:03 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
compiler.h: no such file or directory shogun1234 Linux - Kernel 0 11-08-2007 05:38 AM
linux/module_params.h: No such file or directory sudhirbarker Linux - Kernel 8 09-05-2007 12:27 PM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM
awk: fatal:cannot open file for reading (no such file or Directory) in Linux sangati vishwanath Linux - Software 4 07-06-2005 12:59 AM

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

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