LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Logitech webcam driver (https://www.linuxquestions.org/questions/linux-hardware-18/logitech-webcam-driver-670523/)

norm.h 09-17-2008 09:22 AM

Logitech webcam driver
 
I am trying to produce a driver for my Logitech Quickcam Web webcam using the instructions on the sourceforge website "http://qce-ga.sourceforge.net/", but I get the following error message.
My distro is Fedora 9, with a 2.6.26.3-29 kernel. Can anyone advise please?
norm

[root@localhost ~]# cd /root/qc-usb-0.6.6
[root@localhost qc-usb-0.6.6]# make all
awk: cmd. line:1: fatal: cannot open file `/lib/modules/2.6.26.3-29.fc9.i686/build/include/linux/version.h' for reading (No such file or directory)
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
cc -I/lib/modules/2.6.26.3-29.fc9.i686/build/include -nostdinc -iwithprefix include -DMODULE -D__KERNEL__ -DNOKERNEL -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wall -Wstrict-prototypes -Wno-trigraphs -DHAVE_UTSRELEASE_H= -pipe -c qc-driver.c
make: cc: Command not found
make: *** [qc-driver.o] Error 127
[root@localhost qc-usb-0.6.6]#

TB0ne 09-17-2008 09:55 AM

Quote:

Originally Posted by norm.h (Post 3283158)
I am trying to produce a driver for my Logitech Quickcam Web webcam using the instructions on the sourceforge website "http://qce-ga.sourceforge.net/", but I get the following error message.
My distro is Fedora 9, with a 2.6.26.3-29 kernel. Can anyone advise please?
norm

[root@localhost ~]# cd /root/qc-usb-0.6.6
[root@localhost qc-usb-0.6.6]# make all
awk: cmd. line:1: fatal: cannot open file `/lib/modules/2.6.26.3-29.fc9.i686/build/include/linux/version.h' for reading (No such file or directory)
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
cc -I/lib/modules/2.6.26.3-29.fc9.i686/build/include -nostdinc -iwithprefix include -DMODULE -D__KERNEL__ -DNOKERNEL -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wall -Wstrict-prototypes -Wno-trigraphs -DHAVE_UTSRELEASE_H= -pipe -c qc-driver.c
make: cc: Command not found
make: *** [qc-driver.o] Error 127
[root@localhost qc-usb-0.6.6]#

What version of GCC do you have installed? Looks like the makefile is looking for cc, but it isn't there, or isn't in your path. As root, type in "find / -name cc", and see where it is. If you don't find it, try the find command again with gcc instead. If you don't find that, you need to go install the gcc compiler, before you can do anything.

If you DO find cc, make sure it's in your path. Type in "set | grep PATH", and see what it pops back. If you're in BASH, you can type in "export PATH=<the path that you found above>;<the place where you found cc>", then try the make again.

If you don't find cc, but DO find GCC, you can make a link "ln -s <full path of gcc>/gcc <same path as gcc>/cc", then try it again.

norm.h 09-20-2008 08:40 AM

Found gcc in "/usr/libexec/gcc"
Tried to make a link as suggested but nothing happened. What is the difference between "full path as gcc" and "same path as gcc". I think this is where I've gone wrong, but I'm only a 74 year old newbie.
norm

TB0ne 09-22-2008 08:28 AM

Quote:

Originally Posted by norm.h (Post 3286414)
Found gcc in "/usr/libexec/gcc"
Tried to make a link as suggested but nothing happened. What is the difference between "full path as gcc" and "same path as gcc". I think this is where I've gone wrong, but I'm only a 74 year old newbie.
norm

Full path is "/usr/libexec/gcc". Same path as gcc for link would be
"/usr/libexec/". The "/usr/libexec" is the path. The link command would be:

ln -s /usr/libexec/gcc /usr/libexec/cc.

However if the /usr/libexec directory isn't in your path now, it still won't find cc. Did you check the path? Try this:

ln -s /usr/libexec/gcc /usr/bin/cc

and see if it works.

norm.h 09-23-2008 12:28 PM

Quote:

Originally Posted by TB0ne (Post 3288174)
Full path is "/usr/libexec/gcc". Same path as gcc for link would be
"/usr/libexec/". The "/usr/libexec" is the path. The link command would be:

ln -s /usr/libexec/gcc /usr/libexec/cc.

However if the /usr/libexec directory isn't in your path now, it still won't find cc. Did you check the path? Try this:

ln -s /usr/libexec/gcc /usr/bin/cc

and see if it works.

Hi, TBOne and thanks for your continuing help. I'm very grateful.

Here are the results of your suggested commands.

[root@localhost ~]# find / -name cc
/usr/libexec/gcc/cc
/usr/libexec/cc
/usr/bin/cc
/usr/lib/ccache/cc
[root@localhost ~]# ln -s /usr/libexec/gcc /usr/bin/cc
ln: creating symbolic link `/usr/bin/cc': File exists
[root@localhost ~]#

This is the result of another attempt to compile the driver using Sourceforge instructions, but I'm lost (again).
The "insmod" command is as specified in the Sourceforge instructions, although for my kernel Sourceforge says the driver should be "./quickcam.ko" not ".o" which is for earlier kernels.

Have you any further suggestions, before I throw either the webcam or myself (or both) out of the window!

[norm@localhost ~]$ cd /norm/qc-usb-0.6.6
bash: cd: /norm/qc-usb-0.6.6: No such file or directory
[norm@localhost ~]$ cd /home/norm/qc-usb-0.6.6
[norm@localhost qc-usb-0.6.6]$ make
which: no depmod in (/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/home/norm/bin)
awk: cmd. line:1: fatal: cannot open file `/lib/modules/2.6.26.3-29.fc9.i686/build/include/linux/version.h' for reading (No such file or directory)
/bin/sh: line 0: [: -ge: unary operator expected
/bin/sh: line 0: [: -ge: unary operator expected
-=- Logitech QuickCam USB camera driver -=-

Current configuration:
Driver source directory (PWD): /home/norm/qc-usb-0.6.6
Kernel source directory (LINUX_DIR): /lib/modules/2.6.26.3-29.fc9.i686/build
Module install directory (MODULE_DIR): /lib/modules/2.6.26.3-29.fc9.i686
Utility install directory (PREFIX): /usr/local
User options (USER_OPT): -DHAVE_UTSRELEASE_H=
Driver file name (use with insmod): quickcam.o
Kernel version code:
[norm@localhost qc-usb-0.6.6]$ su -l
Password:
[root@localhost ~]# insmod ./quickcam.o
insmod: can't read './quickcam.o': No such file or directory

TB0ne 09-23-2008 12:43 PM

Quote:

Originally Posted by norm.h (Post 3289433)
Hi, TBOne and thanks for your continuing help. I'm very grateful.


[norm@localhost qc-usb-0.6.6]$ su -l
Password:
[root@localhost ~]# insmod ./quickcam.o
insmod: can't read './quickcam.o': No such file or directory

No problem...that's what the community is here for.

Try doing a "modprobe quickcam", and see what happens. Also, you appear to have cc/gcc installed and it's finding it now. The missing version.h file is telling, though. To compile any kernel module, you must have the source-code for the kernel installed. The build program states where it is trying to find the kernel source, but since it can't find version.h, chances are it's not there.

Look on your install CD/DVD, for a kernel-source<some name and number>.rpm file. If you do a "uname -a" at a command prompt, you'll see what kernel version you have. The numbers on the kernel-source and the uname should match, if you haven't done any online upgrades. Once you locate the package, do an "rpm -i <that package name", then try to run the build again. But try the modprobe quickcam first, though. :)

norm.h 09-29-2008 04:55 AM

Quote:

Originally Posted by TB0ne (Post 3289446)
No problem...that's what the community is here for.

Try doing a "modprobe quickcam", and see what happens. Also, you appear to have cc/gcc installed and it's finding it now. The missing version.h file is telling, though. To compile any kernel module, you must have the source-code for the kernel installed. The build program states where it is trying to find the kernel source, but since it can't find version.h, chances are it's not there.

Look on your install CD/DVD, for a kernel-source<some name and number>.rpm file. If you do a "uname -a" at a command prompt, you'll see what kernel version you have. The numbers on the kernel-source and the uname should match, if you haven't done any online upgrades. Once you locate the package, do an "rpm -i <that package name", then try to run the build again. But try the modprobe quickcam first, though. :)

Sorry for the delay in responding.

[root@localhost ~]# modprobe quickcam
FATAL: Module quickcam not found.

[norm@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.26.3-29.fc9.i686 #1 SMP Wed Sep 3 03:42:27 EDT 2008 i686 i686 i386 GNU/Linux

I've looked on my install DVD (a cover DVD from the August Linux Format magazine) but can't find any reference to a kernel version number.
In any case I've done the online updates after the recent work on the infrastructure following its reported compromise.
So I have no idea where this leaves me!
norm

TB0ne 09-29-2008 09:33 AM

Quote:

Originally Posted by norm.h (Post 3294867)
Sorry for the delay in responding.

[root@localhost ~]# modprobe quickcam
FATAL: Module quickcam not found.

[norm@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.26.3-29.fc9.i686 #1 SMP Wed Sep 3 03:42:27 EDT 2008 i686 i686 i386 GNU/Linux

I've looked on my install DVD (a cover DVD from the August Linux Format magazine) but can't find any reference to a kernel version number.
In any case I've done the online updates after the recent work on the infrastructure following its reported compromise.
So I have no idea where this leaves me!
norm

The package should be something like kernel-source<whatever>......naming conventions may be different for your distro. Without the kernel source, there's nothing you can do.

norm.h 10-15-2008 12:33 PM

Quote:

Originally Posted by TB0ne (Post 3295014)
The package should be something like kernel-source<whatever>......naming conventions may be different for your distro. Without the kernel source, there's nothing you can do.

I failed to get the Quickcam Web webcam to work at all.
Finally established it was a hardware conflict.:o
A Logitech E5000 with Linux UVC worked out of the box.
Thanks to those who tried to help, and my problem is now solved.
norm


All times are GMT -5. The time now is 09:53 AM.