LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2019, 04:26 AM   #1
mohanmoni
LQ Newbie
 
Registered: Jun 2019
Posts: 4

Rep: Reputation: Disabled
fatal error: linux/interrupt : no such file or directory


hi sir/madam


i am developing code for interrupt
when i am including " #include<linux/interrupt.h>"
i am getting fatal error : linux/interrupt.h no such file or directory

why i am getting this error and how to solve this error.



but when i am include that header file and ill get one more error, finally i ll get linux/compiler.h error



but all these files are present in</usr/src/linux-headers-4.4.0-151/include/linux/

can you please give me appropriate answer for this problem
 
Old 06-26-2019, 06:56 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Based on the information shown, your compile line or Makefile, if you have one, does not reference the /usr/src/linux-headers-4.4.0-152/include/linux path.

If you're using GCC, then read the manual page and review information about how to specify include paths.
 
Old 06-26-2019, 08:16 AM   #3
mohanmoni
LQ Newbie
 
Registered: Jun 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
hi sir ,
thanks for your reply, actually i am compiling line not makefile,

i am using gcc only, but when i am opening man page man interrupt it wont open,

can you please suggest me how to open man page
 
Old 06-26-2019, 08:23 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Based on the fact that you are accessing the Linux Questions site, you have the capability to access the web.

Therefore search for the GCC man page on the web.
 
1 members found this post helpful.
Old 06-27-2019, 04:36 AM   #5
mohanmoni
LQ Newbie
 
Registered: Jun 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
hi sir,

can you please solve that problem, i search and try so many ways but i am still getting fatal errors

please please can you give me appropriate solution
 
Old 06-27-2019, 04:59 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I can't actually.

I have no idea what you're compiling.

I've given you a correct way to look up the information needed to fix the type of error you posted.

Sorry, you're going to have to learn a bit more about using GCC.
 
Old 06-27-2019, 05:08 AM   #7
mohanmoni
LQ Newbie
 
Registered: Jun 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
hi sir

i am just compiling below code please just refer and find out the problem

c file name = gpio_interrupt.c

#include<stdio.h>
#include<linux/interrupt.h>

int main()
{

int a,b,c;


}
and
i am compiling as follows
cc gpio_interrupt.c
i am getting error as follows


fatal error : linux/interrupt.h no such file or directory
 
Old 06-27-2019, 06:36 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I believe I fully understand the problem you are describing.

I've already given you guidance about how to address this problem, please re-review my reply in post #2 from this thread.

I know that you are not using a Makefile, however I also gave you guidance about the gcc compiler and what to check.

If you are going to resist looking up information that is recommended to you and putting forth any real attempt to solve your problem, there is little anyone on the LQ site can do to offer you any assistance.
Quote:
Originally Posted by mohanmoni View Post
hi sir

i am just compiling below code please just refer and find out the problem

c file name = gpio_interrupt.c

#include<stdio.h>
#include<linux/interrupt.h>

int main()
{

int a,b,c;


}
and
i am compiling as follows
cc gpio_interrupt.c
i am getting error as follows


fatal error : linux/interrupt.h no such file or directory
Also minor additional note. This code does nothing but declares three variables. You do not need any #include files at all in the file. For any future posts including code, please use [code] tags to preserve formatting.

Last edited by rtmistler; 06-28-2019 at 08:55 AM.
 
  


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
[SOLVED] FATAL: Failed to open file - No such file or directory but file exists swb666 Linux - Newbie 15 01-24-2017 01:44 PM
fatal error: goo/gmem.h: No such file or directory; but file does exist!! lgoldma Linux - General 3 03-07-2013 04:00 PM
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 03:02 AM
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 - Newbie

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