When i try to emerge ffmpeg, i get errors about some headers files from kernel 2.6.8( videodev2.h ) Reproducible: Always Steps to Reproduce: 1. install kernel 2.6.8 ( ln /usr/include/linux -> /usr/src/linux/include/linux ) 2. gcc 3.4.2 3. USE=" mmx sse dvdr audiofile dvd" emerge ffmpeg Actual Results: gcc -Wall -O2 -march=pentium4 -fomit-frame-pointer -pipe -I.. -I/var/tmp/portage/ffmpeg-0.4.9_pre1/work/ffmpeg-0.4.9-pre1 -I/var/tmp/portage/ffmpeg-0.4.9_pre1/work/ffmpeg-0.4.9-pre1/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o grab.o grab.c In file included from /usr/include/linux/videodev.h:8, from grab.c:26: /usr/include/linux/videodev2.h:436: error: parse error before '*' token /usr/include/linux/videodev2.h:438: error: parse error before '*' token /usr/include/linux/videodev2.h:439: error: parse error before '}' token /usr/include/linux/videodev2.h:810: error: field `win' has incomplete type In file included from grab.c:26: /usr/include/linux/videodev.h:225: error: parse error before '*' token /usr/include/linux/videodev.h:226: error: conflicting types for 'clipcount' /usr/include/linux/videodev2.h:437: error: previous declaration of 'clipcount' was here /usr/include/linux/videodev.h:232: error: parse error before '}' token grab.c: In function `grab_read_header': grab.c:138: error: storage size of 'win' isn't known grab.c:149: error: invalid application of `sizeof' to incomplete type `video_window' grab.c:149: error: invalid application of `sizeof' to incomplete type `({anonymous})' grab.c:149: error: invalid application of `sizeof' to incomplete type `video_window' grab.c:149: error: invalid application of `sizeof' to incomplete type `video_window' grab.c:138: warning: unused variable `win' make[1]: *** [grab.o] Ошибка 1 make[1]: Leaving directory `/var/tmp/portage/ffmpeg-0.4.9_pre1/work/ffmpeg-0.4.9-pre1/libavformat' make: *** [lib] Ошибка 2 !!! ERROR: media-video/ffmpeg-0.4.9_pre1 failed. !!! Function src_compile, Line 75, Exitcode 2 !!! make failed. !!! If you need support, post the topmost build error, NOT this status message. Expected Results: if i install kernelheaders26 from ebuild ... problem are gone ... # emerge info Portage 2.0.51_rc1 (default-x86-2004.0, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.8-gentoo-r4 i686) ================================================================= System uname: 2.6.8-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.5.3 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.22,sys-kernel/linux-headers-2.6.7-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirror.gentoo.ru/pub/mirror/gentoo/ ftp://mirror.gentoo.ru/pub/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups encode esd foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 imlib java jpeg kde ldap libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib" #uname -a Linux ai 2.6.8-gentoo-r4 #1 SMP Fri Sep 24 10:58:24 MSD 2004 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux # gcc -v Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/specs Configured with: /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/include/g++-v3 --host=i686-pc-linux-gnu --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --with-gnu-ld --enable-threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++ Thread model: posix gcc version 3.4.2 (Gentoo Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5) # ls -lsa /usr/src/linux 0 lrwxr-xr-x 1 root root 21 Сен 24 10:37 /usr/src/linux -> linux-2.6.8-gentoo-r4 # ls -lsa /usr/include | grep linux 0 lrwxr-xr-x 1 root root 31 Сен 24 10:38 asm -> /usr/src/linux/include/asm-i386 0 lrwxr-xr-x 1 root root 34 Июн 29 20:24 asm-generic -> /usr/src/linux/include/asm-generic 0 lrwxr-xr-x 1 root root 28 Сен 24 10:39 linux -> /usr/src/linux/include/linux
*** Bug 65181 has been marked as a duplicate of this bug. ***
1. install kernel 2.6.8 ( ln /usr/include/linux -> /usr/src/linux/include/linux ) i dont know what possessed you to do that but it's incredibly wrong
why ??? linux, asm and etc dirs... are same as in linux sources ... linux26headers- just have older kernel sources than kernel 2.6.8 with all latest patches ...i doing this links more than 5 year of my work .. and always program worked fine.. videodev2.h are different than in linux26headers because gentoo-dev-sources are applied by patches and others.. ffmpeg - must be modified for fine compilation in future ..when files from gentoo-dev-sources will be in linux26headers..
i just make a symlinks /usr/include/asm -> /usr/src/linux/include/asm-i386 /usr/include/asm-generic -> /usr/src/linux/include/asm-generic /usr/include/linux -> /usr/src/linux/include/linux i this is correct .. in documentation for compilation kernel 2.2, 2.4 - this things are requered. and my kernel are worked find and all portages are compiling fine .. bug in ffmpeg... which can resolve some struct from headers.. because they are changed ...
You should _never_ link userspace programs against Kernel headers in /usr/src/linus/include. Never, never, never! Read http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html for more information about that.
dont screw with the headers or you can fix the bugs yourself