LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-09-2005, 11:01 AM   #1
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Rep: Reputation: 15
error compiling ivtv in KnoppMyth


Hi all:

I'm a Windows technician most days, but very new to Linux-only a couple of weeks experience.

I'm trying to get a Hauppauge PVR-150 capture card working in KnoppMyth R5A12 (Debian Testing, kernel 2.6.9 variant).

I untarred the kernel sources, but when I try to compile ivtv, I get this error:

Code:
root@box:/ivtv-0.3.2s/driver# make
make CONFIG_VIDEO_IVTV=m -C /lib/modules/2.6.9-chw-4/build M=/ivtv-0.3.2s/driver/modules
make: *** /lib/modules/2.6.9-chw-4/build: No such file or directory. Stop.
make: *** [all} Error 2
I'd appreciate it if someone could suggest something, including an explanation, as I'm trying to learn and not just learn to type commands.



Thanks in advance
 
Old 05-10-2005, 03:25 PM   #2
monkeyman2000
Member
 
Registered: Oct 2003
Posts: 68

Rep: Reputation: 15
ivtv

Hi,

I'm not an expert but I also had to get ivtv working on linux (though a different distribution). It took a while since the documentation is rather sparse but I did finally manage to get it working.

The forum for discussing ivtv is here:

http://www.shspvr.com/forum/viewforum.php?f=30

Important: you probably want to use the ivtv source being worked on by Chris Kennedy. He seems to be the main (only?) one doing active development these days. Unfortunately, there is no one keeping the documentation up to date.

http://www.ivtv.tv/

There is also a wiki about ivtv here, the info may be out of date but it might help:

http://ivtv.writeme.ch/tiki-index.php


Good luck!
 
Old 05-10-2005, 03:32 PM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
It wants to build new kernel modules so it looks for the source for the currently running kernel in /lib/modules/`uname -r`/build
When you compile a new kernel and do make modules_install it creates an symbolic link in /lib/modules/`uname -r`/build pointing at the kernel source. If you enter the command uname -r into a terminal it will return the name of the currently running kernel. Compiling the kernel is hard. Getting a TV card to work can be hard (I have a Hauppauge WinTV Nova-T DVB-T), so it may a steep learning curve that you face. Hard, but not impossible Good luck
 
Old 05-10-2005, 10:27 PM   #4
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
error compiling ivtv on KnoppMyth

Appreciate the info. guys, but I'm still not clear.


I've already downloaded the ivtv source, and untarred the kernel source.
I'm pretty sure I need to compile the driver only, NOT the kernel.

Are you saying that compiling ivtv is going to trigger a kernel compile? That doesn't sound right to me. As far as I've read, all the Makefile does is look at the kernel source for info. and compile ivtv. That's it.

I guess what I need to ask is, why is the Makefile not finding the directory when it's there?

Someone suggested to me that it can't find the right folder, or that it's finding a different version than it's expecting.
Is it a symlink problem?
Do I need to modify the Makefile? Should a beginner even consider modifying a Makefile for a driver?

Please elaborate. The endless loop of symlinks here has me very confused.


Thanks

newmoon

Last edited by newmoon; 05-10-2005 at 10:31 PM.
 
Old 05-11-2005, 02:56 AM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
You should be able to get it working without recompiling the kernel, but the ivtv source is going to want to find the kernel source for your currently running kernel in the state it was in just after the kernel was compiled. So downloading a vanila kernel from kernel.org won't do. I'm not familiar with KnoppMyth. You haven't said how you installed the kernel source or where it is. Does /lib/modules/2.6.9-chw-4/build exist? Is it a symbolic link? What's it pointing at?
 
Old 05-11-2005, 10:03 AM   #6
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
error compiling ivtv on KnoppMyth

Andrew:

Thanks for your reply. Yeah, I figured downloading a vanilla kernel wouldn't work, since this kernel has been customized. The KnoppMyth installer did the kernel install for me. Yes,

/lib/modules/2.6.9-chw-4/build does exist. It is a symlink that points to /usr/src/linux

I'm guessing that might be the problem. /usr/src/linux points to /kernel-source-2.6.9-chw ,
a directory which does exist. However...

according to the author's comments, "By default, the build is done against the running kernel version..." I assume that means that the makefile will look for /kernel-source-2.6.9-chw-4 ?

Since /usr/src/linux points to kernel-source-2.6.9-chw , but the Makefile looks for 2.6.9-chw-4 ,
I'm guessing that's the problem.

Does that sound right, (coming from a Windows guy) ?

How would one go about fixing something like that?
BTW, in case you haven't guessed, KnoppMyth is Knoppix customized for MythTV PVR/entertainment software. It makes MythTV much easier to install, though you'd never know it from my posts.

Thanks again,


newmoon


Quote:
Originally posted by Andrew Benton
You should be able to get it working without recompiling the kernel, but the ivtv source is going to want to find the kernel source for your currently running kernel in the state it was in just after the kernel was compiled. So downloading a vanila kernel from kernel.org won't do. I'm not familiar with KnoppMyth. You haven't said how you installed the kernel source or where it is. Does /lib/modules/2.6.9-chw-4/build exist? Is it a symbolic link? What's it pointing at?
 
Old 05-11-2005, 01:24 PM   #7
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
From the way that you've described the chain of symbolic links things should be OK. The fact that the folder is called kernel-source-2.6.9-chw shouldn't matter as the ivtv source should think it's called /lib/modules/2.6.9-chw-4/build. I think it checks what version the source is by looking in the Makefile. You can check the chain of symlinks is sane and see what is in the kernel makefile with the command

cat /lib/modules/2.6.9-chw-4/build/Makefile | more

There is an Ivtv forum. http://www.shspvr.com/forum/viewforum.php?f=30
I don't know how active it is but it might be worth posting there too.
 
Old 05-11-2005, 02:46 PM   #8
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
error compiling ivtv on Knoppmyth

Andrew:

Code:
root@box:/# cat /lib/modules/2.6.9-chw-4/build/Makefile | more
cat: /lib/modules/2.6.9-chw-4/build/Makefile: No such file or directory



Isn't that the makefile for the kernel, though?



Would you please explain what the above command does?



Thanks.

newmoon
 
Old 05-11-2005, 04:04 PM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
Code:
rm -rf /lib/modules/2.6.9-chw-4/build
ln -s /usr/src/kernel-source-2.6.9-chw /lib/modules/2.6.9-chw-4/build
 
Old 05-13-2005, 09:43 AM   #10
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
Andrew:

Well, I was so sure that this made sense, and that it would work. But when I tried it, it didn't. Exact same error message as before.

Any ideas where to go from here?

newmoon


Quote:
Originally posted by Andrew Benton
Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
Code:
rm -rf /lib/modules/2.6.9-chw-4/build
ln -s /usr/src/kernel-source-2.6.9-chw /lib/modules/2.6.9-chw-4/build
 
Old 05-13-2005, 10:39 AM   #11
newmoon
Member
 
Registered: May 2005
Distribution: 1. KnoppMyth R5A12 2. Debian Testing (Sarge)
Posts: 54

Original Poster
Rep: Reputation: 15
Got it!

Andrew:

Thank you soooo much. At last, I can see progress.
Actually, kernel source was in root directory.
so I needed to do:

Code:
ln -s /kernel-source-2.6.9-chw /lib/modules/2.6.9-chw-4/build
Now Make ran fine, with the exception of one error. In stage 2, I got error:

Code:
Building modules, stage 2.
MODPOST
Warning: could not find versions for .tmp_versions/ivtv.mod
Thanks for sticking with me so far, Andrew. I posted on other boards, and people
just dropped by for one comment or gave me totally misleading info. altogether.

Any idea what that error is?

newmoon



Quote:
Originally posted by Andrew Benton
Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
Code:
rm -rf /lib/modules/2.6.9-chw-4/build
ln -s /usr/src/kernel-source-2.6.9-chw /lib/modules/2.6.9-chw-4/build

Last edited by newmoon; 05-13-2005 at 10:43 AM.
 
Old 05-13-2005, 11:27 AM   #12
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
In my experience warnings are just giving you information and can usually be ignored. If it says error, that's a different matter
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
installing ivtv make error thebeef Linux - Software 1 07-24-2005 04:24 PM
need help with knoppmyth zonen Linux - Software 1 05-31-2005 11:22 PM
lirc setup error on KnoppMyth R5A12 newmoon Linux - General 1 05-31-2005 10:39 PM
Error building MythTV installing ivtv Perrin7 Linux - Newbie 1 10-01-2004 09:13 AM
KnoppMyth R4 cesman Linux - Distributions 0 11-04-2003 09:19 AM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration