LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-27-2009, 08:19 AM   #1
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Compiling quickcam driver for Mandriva 2009.1


I have a Logitech Quickcam. It is an old webcam, and Mandriva does not seem to have any package I can find that supports this webcam.

Some research has led me to this driver.

-->http://www.qbik.ch/usb/devices/showdev.php?id=847

I have downloaded it. I'm trying to follow the instructions here.

-->http://qce-ga.sourceforge.net/

I have the kernel source installed. I'm struggling to understand this statement in the instructions.

Quote:
# Kernel source for the kernel you are running. The symbolic link /lib/modules/`uname -r`/build should point to the source directory.
# A working installation of gcc >= 2.95
uname -r shows ...

Quote:
uname -r
2.6.29.6-desktop586-1mnb
Lib Modules shows....

Quote:
ls
2.6.29.1-desktop586-4mnb/ 2.6.29.3-desktop586-1mnb/ 2.6.29.6-desktop-1mnb/ 2.6.29.6-desktop586-1mnb/
I have had more than one kernel installed. The current one is shown above.

My question, the instructions say the simlink should be in /lib/modules. I have directories for each of the kernels that are or were installed, not symlinks. If I change to the dir for the current kernel, there are two symlinks there. Build and source.

Here they are, from /lib/modules/2.6.29.6-desktop586-1mnb/

Quote:
file build
build: symbolic link to `/usr/src/linux-2.6.29.6-desktop586-1mnb'
[cliff@Duelie 2.6.29.6-desktop586-1mnb]$ file source
source: symbolic link to `/usr/src/linux-2.6.29.6-desktop586-1mnb'
Are these symlinks in the correct place?

I can not compile the module. It dies with this output.

Code:
 make all
which: no depmod in (/bin:/usr/bin:/usr/local/bin:/usr/games:/usr/lib/qt4/bin:/usr/bin:/opt/kde3/bin:/opt/real/RealPlayer:/opt/real/RealPlayer:/home/cliff/bin:/opt/real/RealPlayer)                                                      
make -C "/lib/modules/2.6.29.6-desktop586-1mnb/build" SUBDIRS="/home/cliff/quickcam/qc-usb-0.6.6" modules V=1 USER_OPT="-DHAVE_UTSRELEASE_H=1"                                                                                            
make[1]: Entering directory `/usr/src/linux-2.6.29.6-desktop586-1mnb'                                                
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \                                    
        echo;                                                           \                                            
        echo "  ERROR: Kernel configuration is invalid.";               \                                            
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \                    
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \                            
        echo;                                                           \                                            
        /bin/false)                                                                                                  
mkdir -p /home/cliff/quickcam/qc-usb-0.6.6/.tmp_versions ; rm -f /home/cliff/quickcam/qc-usb-0.6.6/.tmp_versions/*   
make -f scripts/Makefile.build obj=/home/cliff/quickcam/qc-usb-0.6.6                                                 
  gcc -Wp,-MD,/home/cliff/quickcam/qc-usb-0.6.6/.qc-driver.o.d  -nostdinc -isystem /usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/include -Iinclude  -I/usr/src/linux-2.6.29.6-desktop586-1mnb/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iarch/x86/include/asm/mach-generic -Iarch/x86/include/asm/mach-default -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv -DNOKERNEL -DHAVE_UTSRELEASE_H=1 -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_driver)"  -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -D"DEBUG_HASH=58" -D"DEBUG_HASH2=4" -c -o /home/cliff/quickcam/qc-usb-0.6.6/.tmp_qc-driver.o /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c                        
In file included from /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:47:                                              
/home/cliff/quickcam/qc-usb-0.6.6/quickcam.h:129:1: warning: "BIT" redefined                                         
In file included from include/linux/kernel.h:15,                                                                     
                 from include/linux/cache.h:4,                                                                       
                 from include/linux/time.h:7,                                                                        
                 from include/linux/videodev2.h:60,                                                                  
                 from include/linux/videodev.h:17,                                                                   
                 from /home/cliff/quickcam/qc-usb-0.6.6/quickcam.h:95,                                               
                 from /home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:47:                                              
include/linux/bitops.h:6:1: warning: this is the location of the previous definition                                 
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_i2c_init’:                                            
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:824: error: ‘struct urb’ has no member named ‘lock’                    
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:825: warning: assignment from incompatible pointer type                
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_isoc_start’:                                          
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:1867: warning: assignment from incompatible pointer type               
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_poll’:                                            
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2256: error: ‘struct video_device’ has no member named ‘priv’          
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_open’:                                            
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2308: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_close’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2376: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_read’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2424: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_mmap’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2479: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_v4l_ioctl’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2511: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:2529: error: ‘struct video_device’ has no member named ‘type’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: At top level:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3008: error: unknown field ‘type’ specified in initializer
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3009: error: unknown field ‘hardware’ specified in initializer
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3013: warning: initialization from incompatible pointer type
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: In function ‘qc_usb_init’:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3158: error: ‘struct video_device’ has no member named ‘priv’
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c: At top level:
/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.c:3410: fatal error: opening dependency file /home/cliff/quickcam/qc-usb-0.6.6/.qc-driver.o.d: Permission denied
compilation terminated.
make[2]: *** [/home/cliff/quickcam/qc-usb-0.6.6/qc-driver.o] Error 1
make[1]: *** [_module_/home/cliff/quickcam/qc-usb-0.6.6] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.29.6-desktop586-1mnb'
make: *** [quickcam.ko] Error 2
I have run both make oldconfig and make prepare. The system reports 'nothing to be done for either.

No matter what I do, I can not compile this module.

Any help would be appreciated.
 
Old 07-27-2009, 09:30 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Check that the symbolic link point to the right place.

/lib/modules/2.6.29.6-desktop586-1mnb/build needs to point at the kernel source... which appears to be the case.
However:

echo " include/linux/autoconf.h or include/config/auto.conf are missing.";

... suggests that you may not have the kernel headers installed.

You should also check your gcc version.
 
Old 07-27-2009, 11:02 AM   #3
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Original Poster
Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
I have a package called 'kernel-desktop586-devel-2.6.29.6-1mnb' installed. The description says it includes 'headers and build tools'.

From what I understand, the sym-links point to the correct location.

GCC

Quote:
gcc --version
gcc (GCC) 4.3.2
This is consistent with the packages I see. They are listed as 4.3.2.

Any other thoughts?
 
Old 07-27-2009, 09:18 PM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
You have GCC 4+ - the source wants gcc 2.95+ - interestingly, there was a major change at gcc4.0 which broke backwards compatability. However, most distros have an old version of gcc in the repos - try that. It is also possible that your kernel is too new - which would be a bummer.

The model camera you have: 046d:0870 (please verify via lsusb)
Have you tried the spca driver?
http://forum.mandriva.com/viewtopic.php?t=90718
 
Old 07-28-2009, 05:03 AM   #5
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Original Poster
Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Simon, thank-you for your response.

I will look into an older version of GCC.

I have not tried the spca driver. One more thing to try. I'll post back what I can find.
Quote:
lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:0870 Logitech, Inc. QuickCam Express
Yes it is a 046d:0870...

Last edited by camorri; 07-28-2009 at 09:42 AM.
 
Old 07-28-2009, 10:56 AM   #6
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Original Poster
Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
GCC Version 3.36 is also in the repos, I have installed it, ( two packages ) GCC3.3 and GCC3.3-cpp. I re-ran the quickcam.sh script, but is is still trying to use GCC 4.3.2.

I looked at the script, it appears to me as if it tests the system for the version, and it is still using 4.3.2. Do I have to un-install the newer version, or is there some easier way to tell it to use 3.3? BTW, I have done very little compiling of software. I have a general understanding, but that is it. Thank-you in advance.
 
Old 07-28-2009, 12:57 PM   #7
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1
Posts: 4,851

Original Poster
Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Well, I have another machine running PCLinuxOS 2009.1 on an old ThinkPad. Just as a shot in the dark i installed the dkms-qc-usb package. It installed, opened a window, compiled the driver after Synaptic installed the file. Cool.

I installed Camorama, plugged in the webcam, started the app, it all works. I didn't even need load quickcam.ko.

I looked at the /usr/src/qc-usb-0.6.6-2pclos directory. There are more patches there, one for the level of kernel on that system. ( 2.6.26.8 ). Just a guess, but I suspect that patch is what I need for my Mandy system... Gcc on PClinuxOS box is listed as 4.1.1 ( a pre-release ).

For now, I'll leave the web cam on that system...
 
Old 07-28-2009, 11:54 PM   #8
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Of course, when pclos upgrades it's kernel you'll probably have to recompile the driver.
Well done.

For the future, when you need to use the older gcc, you also have to edit the makefile's compiler path to point to it.
 
  


Reply

Tags
compile, mandriva, quickcam, webcam


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
Mandriva Linux 2009.1 *Spring) released to the public today - 29, April 2009 ernie Mandriva 13 06-12-2009 05:58 PM
Mandriva Linux 2009 Spring (2009.1) has been officially released! tux99 Mandriva 1 04-30-2009 10:07 AM
nvidia driver in Mandriva 2009 galapogos Mandriva 4 03-05-2009 05:29 AM
Logitech quickcam zoom with Mandriva 2006 louis_m_c Linux - Hardware 1 12-24-2005 06:54 AM
Logitech Quickcam Messenger - Problems compiling driver Yukino Linux - Hardware 0 02-01-2005 04:03 PM


All times are GMT -5. The time now is 05:31 AM.

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