pwc
[Top] [All Lists]

[pwc] Cannot compile pwc-v4l2-20090629-042701 (undeclared identifiers)

To:
Subject: [pwc] Cannot compile pwc-v4l2-20090629-042701 (undeclared identifiers)
From: arielCo <>
Date: Sun, 25 Oct 2009 16:05:01 -0430
Hello,

I cannot build the latest snapshot from
http://www.saillard.org/linux/pwc/snapshots/.

First I changed asm/semaphore.h into linux/semaphore.h in pwc.h (it's
been moved since 2.6.25 or so). After that, it still complains about
undeclared identifiers and such:

$ make
make -C /lib/modules/2.6.31-14-generic/build
SUBDIRS=/home/ariel/sources/pwc-v4l2-20090629-042701 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.31-14-generic'
  CC [M]  /home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.o
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:163: error:
‘v4l_compat_ioctl32’ undeclared here (not in a function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:167: error:
unknown field ‘owner’ specified in initializer
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:167: warning:
initialization from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:169: error:
unknown field ‘type’ specified in initializer
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:170: error:
unknown field ‘hardware’ specified in initializer
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:170: error:
‘VID_HARDWARE_PWC’ undeclared here (not in a function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:172: warning:
initialization from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1019: warning:
‘struct class_device’ declared inside parameter list
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1019: warning:
its scope is only this definition or declaration, which is probably
not what you want
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function ‘cd_to_pwc’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1021: warning:
initialization from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: At top level:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1025: warning:
‘struct class_device’ declared inside parameter list
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘show_pan_tilt’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1027: warning:
passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1019: note:
expected ‘struct class_device *’ but argument is of type ‘struct
class_device *’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: At top level:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1032: warning:
‘struct class_device’ declared inside parameter list
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘store_pan_tilt’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1034: warning:
passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1019: note:
expected ‘struct class_device *’ but argument is of type ‘struct
class_device *’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: At top level:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1048: error:
expected ‘)’ before ‘(’ token
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1051: warning:
‘struct class_device’ declared inside parameter list
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘show_snapshot_button_status’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1053: warning:
passing argument 1 of ‘cd_to_pwc’ from incompatible pointer type
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1019: note:
expected ‘struct class_device *’ but argument is of type ‘struct
class_device *’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: At top level:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1059: error:
expected ‘)’ before ‘(’ token
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_create_sysfs_files’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1067: error:
implicit declaration of function ‘video_device_create_file’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1067: error:
‘class_device_attr_button’ undeclared (first use in this function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1067: error:
(Each undeclared identifier is reported only once
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1067: error: for
each function it appears in.)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1071: error:
‘class_device_attr_pan_tilt’ undeclared (first use in this function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1078: error:
implicit declaration of function ‘video_device_remove_file’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_remove_sysfs_files’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1087: error:
‘class_device_attr_pan_tilt’ undeclared (first use in this function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1088: error:
‘class_device_attr_button’ undeclared (first use in this function)
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_open’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1132: error:
‘struct video_device’ has no member named ‘priv’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_close’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1245: error:
‘struct video_device’ has no member named ‘priv’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_read’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1306: error:
‘struct video_device’ has no member named ‘priv’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_poll’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1373: error:
‘struct video_device’ has no member named ‘priv’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_ioctl’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1389: error:
implicit declaration of function ‘video_usercopy’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘pwc_video_mmap’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1402: error:
‘struct video_device’ has no member named ‘priv’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c: In function
‘usb_pwc_probe’:
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1752: error:
incompatible types when assigning to type ‘struct device’ from type
‘struct device *’
/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.c:1754: error:
‘struct video_device’ has no member named ‘owner’
make[2]: *** [/home/ariel/sources/pwc-v4l2-20090629-042701/pwc-if.o] Error 1
make[1]: *** [_module_/home/ariel/sources/pwc-v4l2-20090629-042701] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic'
make: *** [all] Error 2

It's similar to what happened in
m("lists.saillard.org/msg00715.html","//www.mail-archive.com/pwc");">http:
("Ubuntu 8.10 vs. PCW vs. SPC900NC/00", Brynjar S. Larssen, 23 Nov
2008). I downloaded the complete kernel sources but the semaphore.h
there is the same file that came with the headers package.

What now? This is beyond my knowledge of the vl4 architecture.

PS: the reason I downloaded the snapshot in the first place is that
v4l2 times out in all applications. My webcam is a Logitech Quickcam
Pro for Notebooks (old model, 046d:08b1). This is an example with
mplayer:

$ mplayer -tv driver=v4l2:fps=15 tv://
MPlayer SVN-r29375-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <>
 comment: first try, more to come ;-)
Selected device: Logitech QuickCam Notebook Pro
 Capabilites:  video capture  read/write  streaming
 supported norms: 0 = webcam;
 inputs: 0 = usb;
 Current input: 0
 Current format: YUV420
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such file or directory.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar I420
Selected video codec: [rawi420] vfm: raw (RAW I420)
==========================================================================
Audio: no sound
Starting playback...
v4l2: select timeout
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0

Best regards,

Ariel Cornejo
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU