LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-30-2007, 07:26 AM   #1
kiran@ccpu
LQ Newbie
 
Registered: Oct 2007
Posts: 7

Rep: Reputation: 0
Question I am having probelm to compile my source code in linux-2.6 version


I am having some source which will compile very well in linux 2.4 kernel
but when i want to compile that in linux-2.6 with suitable change in makefile ,i have also included the flags needed for 2.6 kernel but when i copile it give error in header file as in iqr.h irq_vector.h is not there and also huge number of errors w.r.to header file.If anybody is having idea please let me know.
 
Old 10-31-2007, 12:36 AM   #2
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
The reason is simple. What I understand is; any code that is very specific to a particular kernel and uses kernel headers, may work across different kernels if the implementation does not differ across these kernels. Since 2.4 and 2.6 supports same gcc version hence this is not a problem here.

You have mentioned about irq.h. The implementation of irq handling differs a significantly between 2.4 and 2.6. In kernel 2.6 the architecture dependent code and and architecture independent code are separated. If you want your code to be used with kernel 2.6 you will have to make changes in you code for 2.6.
 
Old 10-31-2007, 02:36 AM   #3
kiran@ccpu
LQ Newbie
 
Registered: Oct 2007
Posts: 7

Original Poster
Rep: Reputation: 0
What the error i am getting is in

<asm/irq.h> file contains
the line
#include "irq_vectors.h"
when I compiled it is telling that no such file called iqr_vector.h is not there ,how change in my source will resolve this problem.
 
Old 10-31-2007, 05:02 AM   #4
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
With a quick search I found that the file "irq_vectors.h" is with kernal 2.6 and not with 2.4. As I all ready mention this is a part of architecture dependent code. But I am surprise as you told that your code compiles on 2.4 and not 2.6.

Quote:
how change in my source will resolve this problem
Yes, I told that if you want your code to be used with kernel 2.6 you will have to make changes, but this is not as simple as I said. irq_vectors are used by 2.4 as well, but I did not find any "irq_vectors.h" with 2.4, it is there with 2.6. I think it is similar(may not be same) as hw_irq.h in 2.4 which is the architecture dependent code.(note that replacing it will not work)
I tried to answer you questions, still I can help more provided I have some knowledge about your code. You actually need to have a in depth look into the two implementations to make you code change. I am sorry to put it very simply, but its not that simple to do it.
 
  


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
compile jarred source code kpachopoulos Programming 1 06-02-2007 08:09 AM
Why can't FreeBSD compile anything from source code? mortal *BSD 5 03-21-2005 08:49 PM
how i compile a source code? nazib Linux - General 5 02-27-2005 10:13 AM
How to compile source code... Grim Reaper Linux - Newbie 3 04-26-2002 12:28 PM

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

All times are GMT -5. The time now is 03:35 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration