GNOME Bugzilla – Bug 595340
gst-plugins-good-0.10.16 and libv4l-0.6.1
Last modified: 2009-09-18 11:04:24 UTC
With libv4l installed, gst-plugins-good fails the make on; Making all in v4l2 CC gstv4l2.o CC gstv4l2colorbalance.o CC gstv4l2object.o gstv4l2object.c: In function 'gst_v4l2_object_fill_format_list': gstv4l2object.c:842: warning: implicit declaration of function '_IOWR' gstv4l2object.c:842: error: expected expression before 'struct' gstv4l2object.c: In function 'gst_v4l2_object_probe_caps_for_format_and_size': gstv4l2object.c:1304: error: expected expression before 'struct' gstv4l2object.c:1331: error: expected expression before 'struct' gstv4l2object.c: In function 'gst_v4l2_object_probe_caps_for_format': gstv4l2object.c:1519: error: expected expression before 'struct' gstv4l2object.c:1540: error: expected expression before 'struct' gstv4l2object.c: In function 'gst_v4l2_object_get_nearest_size': gstv4l2object.c:1737: error: expected expression before 'struct' gstv4l2object.c:1744: error: expected expression before 'struct' gstv4l2object.c:1764: error: expected expression before 'struct' gstv4l2object.c:1771: error: expected expression before 'struct' gstv4l2object.c: In function 'gst_v4l2_object_set_format': gstv4l2object.c:1804: error: expected expression before 'struct' gstv4l2object.c:1816: error: expected expression before 'struct' gstv4l2object.c:1827: error: expected expression before 'struct' gstv4l2object.c: In function 'gst_v4l2_object_start_streaming': gstv4l2object.c:1882: warning: implicit declaration of function '_IOW' gstv4l2object.c:1882: error: expected expression before 'int' gstv4l2object.c: In function 'gst_v4l2_object_stop_streaming': gstv4l2object.c:1895: error: expected expression before 'int' make[3]: *** [libgstvideo4linux2_la-gstv4l2object.lo] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Just to make sure I removed libv4l and tried again and gst-plugins-good installed without issue.
I tried to reproduce, but it compiles for me. Grabbed libv4l from Debian unstable (sid) since it's quite new version. $ aptitude show libv4l-0 |grep Version Version: 0.6.1-1 Downloaded gst-plugins-good-0.10.16.tar.gz Making all in v4l2 CC gstv4l2.o CC gstv4l2colorbalance.o CC gstv4l2bufferpool.o CC gstv4l2object.o CC gstv4l2src.o CC gstv4l2sink.o CC gstv4l2tuner.o CC gstv4l2vidorient.o CC v4l2_calls.o CC v4l2src_calls.o LINK libgstvideo4linux2.la Git HEAD works also. Maybe something is wrong with your distribution's package or installation of libv4l?
Hm. I cannot find anything wrong with my build tools, gstreamer, or the install of libv4l. kdenetwork-4.3.1, which can use libv4l had no issues compiling with the version I used. The tarball I used is from here; http://people.atrpms.net/~hdegoede/, so it seems you did not using the same source. Would you point me to the source tarball you used?
(In reply to comment #2) > Hm. I cannot find anything wrong with my build tools, gstreamer, or the install > of libv4l. kdenetwork-4.3.1, which can use libv4l had no issues compiling with > the version I used. The tarball I used is from here; > http://people.atrpms.net/~hdegoede/, so it seems you did not using the same > source. Would you point me to the source tarball you used? I took the binary package from: http://packages.debian.org/sid/libv4l-0 I also compiled from the tarball in your link and installed in /usr/local/. Recompiling gst-plugins-good seems to be fine (I run ldconfig to make sure to link against new libs). Making sure that I'm using those libraries: $ ldd ./sys/v4l2/.libs/libgstvideo4linux2.so |grep libv4l libv4l2.so.0 => /usr/local/lib/libv4l2.so.0 (0x00110000) libv4lconvert.so.0 => /usr/local/lib/libv4lconvert.so.0 (0x0036d000) I suppose you run "make clean && make distclean && ./configure && make" when adding or removing dependencies?
I could find no differences between the tarball from hdegoede and http://ftp.de.debian.org/debian/pool/main/libv/libv4l/libv4l_0.6.1.orig.tar.gz. And the libv4l_0.6.1-1.diff.gz does me no good, not using debian. But at this point I am beginning to wonder if it is kernel related since line 842 is calling out IOWR. What kernel version are you running? Using 2.6.31 here.
I have also kernel version 2.6.31. Yeah, it seems to be related to the kernel. Looking at the the first warning: gstv4l2object.c:842: warning: implicit declaration of function '_IOWR' line:842: if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUM_FMT, format) < 0) { A bit investigation for the second parameter: $ cat /usr/include/linux/videodev2.h |grep VIDIOC_ENUM_FMT #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) Following a few headers, I find /usr/include/asm-generic/ioctl.h: #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) That stuff is coming from linux-kernel-headers package (provided by linux-libc-dev in Ubuntu 9.10). You could mention your distribution and someone else with the same one might try it out.
Ah ha!. That was the problem, outdated/oldish kernel-headers circa 2.6.23. Problem solved. Thanks for your patience and sorry for the noise. This can be closed.