[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#232107: linux-kernel-headers: linux/videodev2.h:432 gives syntax errors with gcc-3.2 and 3.3



On Tuesday 10 February 2004 23:44, Daniel Jacobowitz wrote:
> On Tue, Feb 10, 2004 at 11:31:13PM +0100, Achim Bohnet wrote:
> > Package: linux-kernel-headers
> > Version: 2.5.999-test7-bk-15
> > Severity: normal
> > 
> > *** Please type your report below this line ***
> > 
> > I've tried on sarge to build konference app and run during build into
> > the following problem:
> > 
> > In file included from /usr/include/linux/videodev.h:8,
> >                  from /usr/include/ptlib/unix/ptlib/videoio.h:106,
> >                  from /usr/include/ptlib/video.h:83,
> >                  from /usr/include/ptlib/unix/ptlib/video.h:66,
> >                  from /usr/include/ptlib.h:267,
> >                  from ../konference_part.h:8,
> >                  from configdialog.cpp:32:
> > /usr/include/linux/videodev2.h:432: error: syntax error before `;' token
> > /usr/include/linux/videodev2.h:500: error: 'v4l2_std_id' is used as a
> > type, but
> >    is not defined as a type.
> > /usr/include/linux/videodev2.h:518: error: syntax error before `;' token
> > /usr/include/linux/videodev2.h:555: error: syntax error before `;' token
> > 
> > I've tried with gcc-3.2 and gcc-3.3 as well as with libpt-dev  1.4.11
> > and 1.5.2.   Always the same.  Because konference compiles on other distros,
> > according to kde-apps.org comments, I'll assume that it's a problem
> > with debian kernel headers.
> 
> Details:
>  What compiler options?

/bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++
-DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../src/konference_part/dlg 
-I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include  
-I/usr/include/ptlib/unix -I/usr/include/ptlib -I/usr/include/ptlib/../ptclib 
-I/usr/include/openh323 -DSPEEX_CODEC -DH323_AVCODEC -DP_LINUX -D_REENTRANT 
-DP_HAS_SEMAPHORES -DP_PTHREADS  -DPBYTE_ORDER=PLITTLE_ENDIAN -DHAS_OSS -O3 
-fPIC -g -DPHAS_TEMPLATES -Wall -DHAS_IXJ -I/usr/include/SDL -D_REENTRANT 
-DHAS_SDL  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long 
-Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi
              ^^^^^^^^^                                    ^^^^^

Ah, here are both options that you mentioned below.

-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts 
-O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new 
-fno-common  -c -o configdialog.lo `test -f 'configdialog.cpp'||
echo './'`configdialog.cpp
In file included from /usr/include/linux/videodev.h:8,
                 from /usr/include/ptlib/unix/ptlib/videoio.h:106,
                 from /usr/include/ptlib/video.h:83,
                 from /usr/include/ptlib/unix/ptlib/video.h:66,
                 from /usr/include/ptlib.h:267,
                 from ../konference_part.h:8,
                 from configdialog.cpp:32:
/usr/include/linux/videodev2.h:432: error: syntax error before `;' token
/usr/include/linux/videodev2.h:500: error: 'v4l2_std_id' is used as a type, but
   is not defined as a type.
/usr/include/linux/videodev2.h:518: error: syntax error before `;' token
/usr/include/linux/videodev2.h:555: error: syntax error before `;' token

>  What other headers are included?

Pardon?  Is there an easy way to find out?  This is quite a long chain
of include files.
> 
> I bet this is another of those g++ -ansi -pedantic programs.  That
> causes Linux headers not to define u64 - correctly, because in strict
> ANSI mode 64-bit integers are not required to be supported.  I have no
> idea how you expect to use an interface with 64-bit data members in a
> compilation mode which does not support 64-bit numbers without a
> warning.

I've tried:
	o removing only -pedantic:  does not help
	o removing only -ansi	: stuff compiles

Stupid as I am I've no idea if ISO C++ has to define 64 bit data types
or not but at least I know how to fix it ;)

I'll try to figure out the origin of -ansi in CXXFLAGS in
all the auto* tools generated files, remove it remove it and
send the patch to the upstream author of konference.

Thx,
Achim
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
-- 
  To me vi is Zen.  To use vi is to practice zen. Every command is
  a koan. Profound to the user, unintelligible to the uninitiated.
  You discover truth everytime you use it.
                                      -- reddy@lion.austin.ibm.com



Reply to: