Get Your Webcam Working with GSPCA
August 6th, 2008 by Elliot Isaacson in
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
- Nov-19-09
- Nov-04-09
Recently Popular
From the Magazine
December 2009, #188
If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.
Delicious
Digg
StumbleUpon
Reddit
Facebook








It doesn't work!!
On August 26th, 2009 Juan p (not verified) says:
i got ubuntu 8.10 and it does work... the pc recognices it in skype when i test it but only shows green stripes...no real image...
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
gspca
On August 12th, 2009 Baires Norte Lug (not verified) says:
Kernel >= 2.6.27
wget http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz
wget http://www.bairesnortelug.com.ar/diff/gspca.diff
tar -zxvf gspcav1-20071224.tar.gz
cd gspcav1-20071224
cat ../gspca.diff | patch -p1
./gspca_build
Happy !!!!
Thz http://www.bairesnortelug.com.ar
Slackware Rulez :P
this parch works to me1!
On October 10th, 2009 Guillermo Aguilar (not verified) says:
after two hours of surfing. finally this patch to gspca works under my linux distro.. ubuntu jaunty with kernel 2.6.28-15-generic !!
Thanks a lot
Got the same thing as that
On November 8th, 2009 Anonymous (not verified) says:
Got the same thing as that guy did above. wtf
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