On Sunday 02 July 2006 14:29, Axel Thimm wrote:
> On Sun, Jul 02, 2006 at 02:11:04PM +0200, Hans Verkuil wrote:
> > On Saturday 01 July 2006 23:24, Axel Thimm wrote:
> > > On Sat, Jul 01, 2006 at 11:03:23PM +0200, Hans Verkuil wrote:
> > > > Axel,
> > > >
> > > > Do you still have this problem with the latest 0.7 branch? It
> > > > should use the kernel's videodev2.h header, not the one from
> > > > /usr/include/linux.
> > >
> > > Yes, the only way I could get 0.7 userland to build was to add
> > > videodev2.h from v4l's hg.
> > >
> > > It's probably best not to rely on any kernel parts when building
> > > userland. I think the only bit missing is this one header.
> >
> > I don't entirely understand it: are you using different Makefiles
> > for utils? I've explicitly added a -I path to the kernel's include
> > directory, just as is done when building the driver itself. So is
> > why is that directory not available when building the utilities?
>
> This is a mapping issue. There is just one userland to build but
> sometimes half a dozen different kernels (and this multiplied with
> all config flavours, up, smp, xen, pae etc). Since the kernels for
> which the userland is built is not unique, it is dengerous to simply
> pick one out - the userland build should be independent of which
> explicit kernel one used (of course some constraints on what kernel
> the userland can operate at all need to be made, but not a 1-1
> mapping)
>
> Consider also what happens when a distribution updates their kernels
> like for FC4, which started at 2.6.11 and is at 2.6.17 now (apart
> from ivtv versions matching kernel versions).
>
> Therefore packaging practice has the userland w/o any kernel or with
> the dumbest kernel. My buildsystem uses the latter but ivtv picks up
> uname -r and doesn't even detect the kernel headers.
>
> So while building ivtv 0.7 for only one kernel on one system is OK,
> if you have to build for 3x6 different kernels (which is typical for
> packaging redistributable bits) you cannot assume one kernel-one
> userland anymore.
>
> In general building userland utils against kernel headers is
> considered bad, even when done in one sweep with the building of the
> kernel module (which in packaging you don't, or you would build a
> userland per kernel).

OK, I understand your problem better. I will add a copy of videodev2.h 
to the utils directory as that's probably the easiest solution.

However, be aware that esp. ivtvctl is still linked to the ivtv driver 
of the same version. For ivtv >= 0.6 that also implies a link to the 
kernel corresponding to the ivtv version. Changes in the kernel 
preparing for full ivtv inclusion mean driver changes which in turn are 
reflected in ivtvctl changes.

Eventually it is likely that ivtvctl and ivtv-tune will disappear and be 
replaced by generic v4l2 utilities (I'm working on that). 2.6.18 in 
particular standardizes the MPEG encoding API.

>
> > The distributions are notoriously out of date when it comes to
> > videodev2.h, especially since it is undergoing changes recently.
>
> Then why not use a videodev2.h you know is good?

The videodev2.h in the kernel is good. Just the user-space header is 
often not updated when a new kernel is installed.

>
> Anyway, if it only affects packagers we can deal with it by patching
> in a copy of videodev2.h. But I think the clean solution is to not
> have userland use any kernel headers.

videodev2.h is the public v4l2 API. It's perfectly normal to use it. But 
as I said, distros often do not update the user-space copy when a new 
kernel is installed. So new additions to the API do not become 
available in the /usr/include/linux/videodev2.h header. Most annoying.

And since new additions relevant to ivtv happen with each kernel 
release, this is quite an important issue for us.

        Hans

PS: I'll notify you when I've added videodev2.h to utils.

>
> >     Hans
> >
> > > > Thanks,
> > > >
> > > >         Hans
> > > >
> > > > On Tuesday 27 June 2006 13:45, Axel Thimm wrote:
> > > > > On Mon, Jun 26, 2006 at 12:24:54AM +0200, Hans Verkuil wrote:
> > > > > > I think I committed everything needed to release a
> > > > > > ivtv-0.7.0 suitable for the 2.6.17 kernel. Nevertheless, I
> > > > > > didn't have time left for actual testing so I would
> > > > > > appreciate it if some of you could do it. So if you want to
> > > > > > upgrade to a 2.6.17 kernel, then now is the time to do it.
> > > > > >
> > > > > > You can download the prerelease here:
> > > > > >
> > > > > > http://ivtvdriver.org/viewcvs/ivtv/branches/0.7.tar.gz?view
> > > > > >=tar
> > > > > >
> > > > > > I haven't yet updated the README and ChangeLog files, but
> > > > > > it is effectively identical to ivtv-0.6 except for being
> > > > > > updated for the 2.6.17 kernel.
> > > > > >
> > > > > > Please note: ivtv-0.7.0 is for the 2.6.17 kernel, not for
> > > > > > earlier kernels. So don't bother downloading this if you
> > > > > > are using older kernels.
> > > > >
> > > > > I tried building on FC4-FC6 (all 2.6.17 kernels). There seems
> > > > > to be some issue in the userland build (ivtvctl):
> > > > >
> > > > > ivtvctl.c: In function 'main':
> > > > > ivtvctl.c:698: error: 'union <anonymous>' has no member named
> > > > > 'sliced' ivtvctl.c:701: error: 'union <anonymous>' has no
> > > > > member named 'sliced' ivtvctl.c:702: error:
> > > > > 'V4L2_SLICED_TELETEXT_B' undeclared (first use in this
> > > > > function) ivtvctl.c:702: error: (Each undeclared identifier
> > > > > is reported only once ivtvctl.c:702: error: for each function
> > > > > it appears in.)
> > > > > ivtvctl.c:704: error: 'union <anonymous>' has no member named
> > > > > 'sliced' ivtvctl.c:705: error: 'V4L2_SLICED_CAPTION_525'
> > > > > undeclared (first use in this function) ivtvctl.c:707: error:
> > > > > 'union <anonymous>' has no member named 'sliced'
> > > > > ivtvctl.c:708: error: 'V4L2_SLICED_WSS_625' undeclared (first
> > > > > use in this function)
> > > > >
> > > > > Looks like it picks up the wrong v4l headers.
> > > >
> > > > _______________________________________________
> > > > ivtv-devel mailing list
> > > > [email protected]
> > > > http://ivtvdriver.org/mailman/listinfo/ivtv-devel
> >
> > _______________________________________________
> > ivtv-devel mailing list
> > [email protected]
> > http://ivtvdriver.org/mailman/listinfo/ivtv-devel

_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to