Get Your Webcam Working with GSPCA
August 6th, 2008 by Elliot Isaacson
Webcams are notorious for their lack of support under Linux. But thanks to GSPCA, many webcams now have functional V4L drivers. This tutorial covers the building, installation, and configuration of the GSPCA drivers, including how to adjust color balance and brightness directly at the kernel module level.
__________________________
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Jul-01-09
- Jun-29-09
Recently Popular
From the Magazine
July 2009, #183
News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.
To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .
All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.
Delicious
Digg
StumbleUpon
Reddit
Facebook








Comment.ec:2910: error: too many arguments to function
On May 11th, 2009 mwango (not verified) says:
Hello,
We Installed RHEL 5 for this Informix products
Informix SE version 7.26 UC6R1
Informix 4gl Developer Version 7.32 UC4
Informix 4gl Runtime Version 7.32 UC4
Informix 4gl Compiler RT Version 7.32 UC3
Informix Sql Development Version 7.32 UC4
Informix Sql Runtime Version 7.32 UC4
I am getting the above error. What is amazing is that, some programs are linking and not all.
Could have an idea on this ?
Thanking you for your cooperation.
Felix Mwango Mutale
Error instalation
On April 2nd, 2009 Anonymous (not verified) says:
When i click Lancer installation
Following error happens:
@ubuntu:~$ gksudo 'python /usr/share/EasyCam2/core.py --gtk'
GO !
ln: creating symbolic link `/lib/modules/2.6.27-11-generic/build/include/linux/config.h': File exists
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-2.6.27-11-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
REMOVE the old module if present
ERROR: Module gspca does not exist in /proc/modules
CLEAN gspca source tree
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
.gspca.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i \
*.symvers *.err
COMPILE gspca Please Wait ....!!
INSTALL gspca in the kernel binary tree
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
install: cannot stat `gspca.ko': No such file or directory
make: *** [install] Error 1
LOAD gspca in memory
FATAL: Module gspca not found.
PRINT COMPILATION MESSAGES if ERRORS look kgspca.err
make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/share/EasyCam2/drivers/gspca CC=cc modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-11-generic'
CC [M] /usr/share/EasyCam2/drivers/gspca/gspca_core.o
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:54:27: error: asm/semaphore.h: No such file or directory
/usr/share/EasyCam2/drivers/gspca/gspca_core.c: In function 'spca5xx_ioctl':
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2464: error: implicit declaration of function 'video_usercopy'
/usr/share/EasyCam2/drivers/gspca/gspca_core.c: At top level:
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2610: error: unknown field 'owner' specified in initializer
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2610: warning: initialization from incompatible pointer type
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2612: error: unknown field 'type' specified in initializer
/usr/share/EasyCam2/drivers/gspca/gspca_core.c: In function 'spca50x_create_sysfs':
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2770: error: implicit declaration of function 'video_device_create_file'
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:2781: error: implicit declaration of function 'video_device_remove_file'
/usr/share/EasyCam2/drivers/gspca/gspca_core.c: In function 'spca5xx_probe':
/usr/share/EasyCam2/drivers/gspca/gspca_core.c:4310: error: incompatible types in assignment
make[2]: *** [/usr/share/EasyCam2/drivers/gspca/gspca_core.o] Error 1
make[1]: *** [_module_/usr/share/EasyCam2/drivers/gspca] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-11-generic'
make: *** [default] Error 2
:'(
It didn't compile for me
On March 7th, 2009 AMAMH (not verified) says:
It didn't compile for me either.
After googling, I think the problem is that it was made for older linux kernels, it cannot be compiled for current kernels.
it doesn't work
On March 2nd, 2009 nitrofurano01 (not verified) says:
i also got all of these errors, on both Ubuntu 8.10 i386 and amd64, following this video
from some forum post i also tried this one used to work on Ubuntu 8.04, but not anymore on Ubuntu 8.10:
sudo apt-get install gspca-source module-assistant
sudo module-assistant update
sudo m-a a-i gspca
modprobe gspca
sudo apt-get install xawtv
xawtv
what may happen for causing it? is there some really working way on having webcam really working on an updated Ubuntu? thanks! =)
./gspca_build didn't work
On February 6th, 2009 Anonymous (not verified) says:
i know i'm a linux n00b but none the less...
when i type in ./gspca_build i get:
root@indy-desktop:/home/indy/gspcav1-20071224# ./gspca_build
REMOVE the old module if present
ERROR: Module gspca does not exist in /proc/modules
CLEAN gspca source tree
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
.gspca.o.cmd *.o *.ko *.mod.* .[a-z]* core *.i \
*.symvers *.err
COMPILE gspca Please Wait ....!!
INSTALL gspca in the kernel binary tree
mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
install: cannot stat `gspca.ko': No such file or directory
make: *** [install] Error 1
LOAD gspca in memory
FATAL: Module gspca not found.
PRINT COMPILATION MESSAGES if ERRORS look kgspca.err
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/indy/gspcav1-20071224 CC=cc modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-11-generic'
CC [M] /home/indy/gspcav1-20071224/gspca_core.o
/home/indy/gspcav1-20071224/gspca_core.c:54:27: error: asm/semaphore.h: No such file or directory
/home/indy/gspcav1-20071224/gspca_core.c: In function ‘spca5xx_ioctl’:
/home/indy/gspcav1-20071224/gspca_core.c:2463: error: implicit declaration of function ‘video_usercopy’
/home/indy/gspcav1-20071224/gspca_core.c: At top level:
/home/indy/gspcav1-20071224/gspca_core.c:2609: error: unknown field ‘owner’ specified in initializer
/home/indy/gspcav1-20071224/gspca_core.c:2609: warning: initialization from incompatible pointer type
/home/indy/gspcav1-20071224/gspca_core.c:2611: error: unknown field ‘type’ specified in initializer
/home/indy/gspcav1-20071224/gspca_core.c: In function ‘spca50x_create_sysfs’:
/home/indy/gspcav1-20071224/gspca_core.c:2769: error: implicit declaration of function ‘video_device_create_file’
/home/indy/gspcav1-20071224/gspca_core.c:2780: error: implicit declaration of function ‘video_device_remove_file’
/home/indy/gspcav1-20071224/gspca_core.c: In function ‘spca5xx_probe’:
/home/indy/gspcav1-20071224/gspca_core.c:4301: error: incompatible types in assignment
make[2]: *** [/home/indy/gspcav1-20071224/gspca_core.o] Error 1
make[1]: *** [_module_/home/indy/gspcav1-20071224] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-11-generic'
make: *** [default] Error 2
root@indy-desktop:/home/indy/gspcav1-20071224#
any ideas what went wrong?
i'm MORE than willing to do anything it takes.
PLEASE email me: independence.adams@gmail.com
Thanks
Error
On October 9th, 2008 Nedim (not verified) says:
I get this error :
make
make: sdl-config: Command not found
cc -DUSE_SDL -O2 -DLINUX -DHAVE_LIBJPEG=1 -c -o spcagui.o spcagui.c
In file included from spcagui.c:23:
gui.h:11:21: error: SDL/SDL.h: No such file or directory
gui.h:12:23: error: SDL_image.h: No such file or directory
In file included from spcagui.c:23:
gui.h:41: error: expected specifier-qualifier-list before ‘SDL_Surface’
gui.h:51: error: expected specifier-qualifier-list before ‘SDL_Surface’
gui.h:63: error: expected specifier-qualifier-list before ‘SDL_Surface’
gui.h:76: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:79: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:87: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:90: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:99: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:102: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
gui.h:105: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
In file included from spcagui.c:26:
utils.h:22:21: error: jpeglib.h: No such file or directory
spcagui.c:224: error: expected declaration specifiers or ‘...’ before ‘SDL_Surface’
spcagui.c: In function ‘refresh_screen’:
spcagui.c:238: error: ‘Screen’ undeclared (first use in this function)
spcagui.c:238: error: (Each undeclared identifier is reported only once
spcagui.c:238: error: for each function it appears in.)
spcagui.c: In function ‘telecom’:
spcagui.c:289: error: ‘SDL_Surface’ undeclared (first use in this function)
spcagui.c:289: error: ‘screen’ undeclared (first use in this function)
spcagui.c:291: error: ‘Uint32’ undeclared (first use in this function)
spcagui.c:291: error: expected ‘;’ before ‘video_flags’
spcagui.c:292: error: ‘SDL_Event’ undeclared (first use in this function)
spcagui.c:292: error: expected ‘;’ before ‘event’
spcagui.c:295: error: ‘lib_flags’ undeclared (first use in this function)
spcagui.c:295: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
spcagui.c:297: error: ‘video_flags’ undeclared (first use in this function)
spcagui.c:297: error: ‘SDL_HWPALETTE’ undeclared (first use in this function)
spcagui.c:297: error: ‘SDL_DOUBLEBUF’ undeclared (first use in this function)
spcagui.c:315: error: too many arguments to function ‘draw_button’
spcagui.c:316: error: too many arguments to function ‘draw_button’
spcagui.c:317: error: too many arguments to function ‘draw_button’
spcagui.c:318: error: too many arguments to function ‘draw_button’
spcagui.c:319: error: too many arguments to function ‘draw_button’
spcagui.c:320: error: too many arguments to function ‘draw_button’
spcagui.c:321: error: too many arguments to function ‘draw_potentiometre’
spcagui.c:322: error: too many arguments to function ‘draw_potentiometre’
spcagui.c:323: error: too many arguments to function ‘draw_potentiometre’
spcagui.c:324: error: too many arguments to function ‘draw_control’
spcagui.c:325: error: too many arguments to function ‘draw_control’
spcagui.c:329: error: ‘event’ undeclared (first use in this function)
spcagui.c:332: error: ‘SDL_MOUSEMOTION’ undeclared (first use in this function)
spcagui.c:343: error: too many arguments to function ‘process_potentiometre’
spcagui.c:352: error: too many arguments to function ‘process_potentiometre’
spcagui.c:360: error: too many arguments to function ‘process_potentiometre’
spcagui.c:368: error: ‘SDL_MOUSEBUTTONUP’ undeclared (first use in this function)
spcagui.c:376: error: ‘SDL_MOUSEBUTTONDOWN’ undeclared (first use in this function)
spcagui.c:404: error: too many arguments to function ‘process_control’
spcagui.c:411: error: too many arguments to function ‘refresh_control’
spcagui.c:414: error: too many arguments to function ‘refresh_control’
spcagui.c:422: error: too many arguments to function ‘process_control’
spcagui.c:431: error: too many arguments to function ‘process_potentiometre’
spcagui.c:439: error: too many arguments to function ‘process_potentiometre’
spcagui.c:446: error: too many arguments to function ‘process_potentiometre’
spcagui.c:461: error: too many arguments to function ‘process_button’
spcagui.c:473: error: too many arguments to function ‘process_button’
spcagui.c:477: error: too many arguments to function ‘process_button’
spcagui.c:482: error: too many arguments to function ‘process_button’
spcagui.c:488: error: too many arguments to function ‘process_button’
spcagui.c: In function ‘processvideo’:
spcagui.c:504: error: ‘SDL_Surface’ undeclared (first use in this function)
spcagui.c:504: error: ‘screen’ undeclared (first use in this function)
spcagui.c:505: error: ‘Uint32’ undeclared (first use in this function)
spcagui.c:505: error: expected ‘;’ before ‘video_flags’
spcagui.c:506: error: ‘SDL_Event’ undeclared (first use in this function)
spcagui.c:506: error: expected ‘;’ before ‘event’
spcagui.c:508: error: ‘lib_flags’ undeclared (first use in this function)
spcagui.c:508: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
spcagui.c:509: error: ‘video_flags’ undeclared (first use in this function)
spcagui.c:509: error: ‘SDL_HWPALETTE’ undeclared (first use in this function)
spcagui.c:509: error: ‘SDL_DOUBLEBUF’ undeclared (first use in this function)
spcagui.c:583: error: too many arguments to function ‘refresh_screen’
make: *** [spcagui.o] Error 1
My o.s. is Ubuntu 8.04
final glitch
On September 21st, 2008 embee (not verified) says:
I followed the tutorial until running ./gspca_build, modules were added properly. I checked the support chart for extra assurance, and it's supported alright (Sonix with *** for support). However, when I run spcagui -d /dev/video0, it spews back an error "wrong device".
Any idea where I messed up?
Thanks for your help & awesome tutorial.
Those URLS
On August 21st, 2008 bobbyratliff says:
Here are the wget commands he used:
wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gzwget http://mxhaard.free.fr/spca50x/Download/spcagui20060127.tar.gz
Sadly this driver has three
On August 7th, 2008 Cláudio da Silveira Pinheiro (not verified) says:
Sadly this driver has three big caveats: The first one is it implements support for V4L version 1, an API that was deprecated by the time of Linux kernel's 2.4.0 release. It doubles a developer's work trying to support a wide range of devices. The second one is about some devices advertising support for pixel formats those devices in fact don't support, a bug that may make your skin look blue (as setting an RGB mode and getting a BGR image without notice). The third one is the fact the driver doesn't handle gracefully device unplugging while in use, making programs freeze instead of recovering from the device disconnection.
These questions were discussed with Michel Xhaard (gspca maintainer) but with less than stellar results.
Mr. Xhaard brought a lot of goodness to Linux for webcam users, and he got a lot of positive karma by doing so, but maybe he could make developers' lives easier. :)
Post new comment