[mythtv-users] problem compiling 0.12

Christopher Andersson qriss at home.se
Sat Nov 8 04:09:27 EST 2003


Ok. thanks for your help. 
Since I'm using the pvr-250 I will try the ivtv-ioctl.patch on the myth-devel list.
/Christopher
 
On Fri, 7 Nov 2003 21:30:33 -0500
Chris Morgan <cmorgan at alum.wpi.edu> wrote:

> The patch from 1.4 to 1.5 of ivtv-ext-api.h appears to be the source of the 
> bug, note two of the lines from the change:
> 
> -#define IVTVFB_IOCTL_GET_STATE          _IOR('@', 1, struct 
> ivtvfb_ioctl_state_info)
> ...
> +#define IVTVFB_IOCTL_GET_STATE          _IOR('@', 1, sizeof(struct 
> ivtvfb_ioctl_state_info))
> 
> The addition of sizeof() appears to be the culprit.  This doesn't appear 
> necessary due to this code in the the kernel's include/asm/ioctl.h:
> 
> define _IOC_TYPECHECK(t) \
>         ((sizeof(t) == sizeof(t[1]) && \
>           sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
>           sizeof(t) : __invalid_size_argument_for_IOC)
> ...
> #define _IOR(type,nr,size)      _IOC(_IOC_READ,(type),(nr),
> (_IOC_TYPECHECK(size)))
> 
> Not passing the structure itself appears to be the problem, if these sizeof's 
> are removed things should be fine.
> 
> I'd like to also mention that I can't currently compile mythtv on my debian 
> unstable machine due to a bunch of changes to qt3...bleh...
> 
> Chris
> 
> 
> 
> 
> On Friday 07 November 2003 07:03 pm, Doug Larrick wrote:
> > On 11/07/03 18:31:06, Christopher Andersson wrote:
> > > Hi, I'm having some trouble compiling mythtv 0.12, I'm running debian
> > > unstable and get the following errors, both with 0.12 relase and cvs.
> > >
> > > g++ -c -pipe -Wall -W -O3 -march=pentiumpro -fomit-frame-pointer
> > > `freetype-confi               g --cflags` -D_REENTRANT  -D_GNU_SOURCE
> > > -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/l               ocal\" -DMMX
> > > -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/usr/share/qt3/mksp
> > >            ecs/default -I. -I/usr/local/include -I../libmyth -I..
> > > -I../libavcodec -I../liba               vformat -I../libdvbdev
> > > -I/usr/include/qt3 -o videoout_ivtv.o videoout_ivtv.cpp
> > > videoout_ivtv.cpp: In destructor `virtual
> > > VideoOutputIvtv::~VideoOutputIvtv()':
> > > videoout_ivtv.cpp:57: error: parse error before `[' token
> >
> > [snip]
> >
> > > gcc version 3.3.2 (Debian)
> > > Qmake version: 1.06c (Qt 3.2.1)
> > >
> > > Any ideas, someone ?
> >
> > I saw this too.  Since I don't use IVTV, I commented out the offending
> > ioctl lines in videoout_ivtv -- hardly a long-term solution.
> >
> > I think the problem is not gcc or qmake versions, but Debian's glibc
> > 2.3.2.ds1-10, which redefines the _IOR macro as follows:
> >
> > extern int __invalid_size_argument_for_IOC;
> > #define _IOC_TYPECHECK(t) ((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1
> > << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC)
> > #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK
> > (size)))
> >
> > We get into this from ivtv-ext-api.h, which has:
> > #define IVTVFB_IOCTL_GET_ACTIVE_BUFFER _IOR('@', 5, sizeof(struct
> > ivtv_osd_coords))
> >
> > so it all expands to:
> >  if (ioctl(fbfd, (((2U) << (((0 +8)+8)+14)) | ((('@')) << (0 +8)) |
> > (((1)) << 0) | (((((sizeof(sizeof(struct ivtvfb_ioctl_state_info)) ==
> > sizeof(sizeof(struct ivtvfb_ioctl_state_info)[1]) && sizeof(sizeof
> > (struct ivtvfb_ioctl_state_info)) < (1 << 14)) ? sizeof(sizeof(struct
> > ivtvfb_ioctl_state_info)) : __invalid_size_argument_for_IOC))) << ((0
> > +8)+8))), &fbstate) < 0)
> >
> > Hope somebody familiar with ivtv's ioctls can sort this out.
> >
> > -Doug
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


More information about the mythtv-users mailing list