i tried to compile opencv (http://sf.net/projects/opencvlibrary) by hand and the compile breaks: ################################################################################ ... Making all in highgui make[3]: Entering directory `/home/marcel/uni/studienarbeit/cvs/opencv-cvs-2005223/otherlibs/highgui' source='cvcap_v4l.cpp' object='cvcap_v4l.lo' libtool=yes \ depfile='.deps/cvcap_v4l.Plo' tmpdepfile='.deps/cvcap_v4l.TPlo' \ depmode=gcc3 /bin/sh ../../autotools/depcomp \ /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../../cv/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -fno-rtti -pipe -O3 -DNDEBUG -g -march=i686 -ffast-math -fomit-frame-pointer -c -o cvcap_v4l.lo `test -f 'cvcap_v4l.cpp' || echo './'`cvcap_v4l.cpp g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../cxcore/include -I../../cv/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -fno-rtti -pipe -O3 -DNDEBUG -g -march=i686 -ffast-math -fomit-frame-pointer -c cvcap_v4l.cpp -MT cvcap_v4l.lo -MD -MP -MF .deps/cvcap_v4l.TPlo -fPIC -DPIC -o .libs/cvcap_v4l.o In file included from /usr/include/linux/fs.h:12, from cvcap_v4l.cpp:144: /usr/include/linux/wait.h: In function `int waitqueue_active(wait_queue_head_t*)': /usr/include/linux/wait.h:80: error: `list_empty' undeclared (first use this function) /usr/include/linux/wait.h:80: error: (Each undeclared identifier is reported only once for each function it appears in.) cvcap_v4l.cpp: In function `void yuv420_to_rgb24(int, int, unsigned char*, unsigned char*)': cvcap_v4l.cpp:632: warning: unused variable `const int numpix' cvcap_v4l.cpp: In function `IplImage* icvRetrieveFrameCAM_V4L(CvCaptureCAM_V4L*)': cvcap_v4l.cpp:764: warning: label `defaut' defined but not used cvcap_v4l.cpp: In function `int icvSetVideoSize(CvCaptureCAM_V4L*, int, int)': cvcap_v4l.cpp:789: warning: unused variable `int i' make[3]: *** [cvcap_v4l.lo] Fehler 1 make[3]: Leaving directory `/home/marcel/uni/studienarbeit/cvs/opencv-cvs-2005223/otherlibs/highgui' make[2]: *** [all-recursive] Fehler 1 make[2]: Leaving directory `/home/marcel/uni/studienarbeit/cvs/opencv-cvs-2005223/otherlibs' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/home/marcel/uni/studienarbeit/cvs/opencv-cvs-2005223' make: *** [all] Fehler 2 ################################################################################ /usr/include/linux/wait.h does include <linux/list.h> but list_empty doesnt seems to be declared Reproducible: Always Steps to Reproduce: 1. compiled opencv by hand 2. 3. Actual Results: compile breaks Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r6 i686) ================================================================= System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.2.3-r5,dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 12:16:50)] ccache version 2.3 [enabled] dev-lang/python: 2.2.3-r5, 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r1, 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /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/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://mirror.nutsmaas.nl/gentoo/ http://gentoo.inode.at/ ftp://ftp.du.se/pub/os/gentoo" LANG="de_DE@euro" LC_ALL="de_DE" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aalib acl acpi alsa apm audiofile avi berkdb bitmap-fonts bluetooth bonobo cdparanoia cdr crypt cscope cups curl dga directfb divx4linux doc dts dv dvb dvd dvdr dvdread emboss encode esd evo f77 faad fam fame fbcon flac flash font-server foomaticdb fortran freetype gcj gd gdbm ggi ggz gif gimp gimpprint gnome gpm gps gstreamer gtk gtk2 gtkhtml guile icc imagemagick imlib innodb ipv6 irmc jack java jbig joystick jpeg lcms ldap leim libg++ libwww lirc lzo mad maildir matroska mbox mikmod mjpeg mmx mng motif mozilla mp3 mpeg mule mysql nas ncurses network nls nvidia objc offensive oggvorbis opengl oss pam pdflib perl pic plotutils png python qt quicktime readline real samba scanner sdl slang slp sndfile speex spell sse ssl svga tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb v4l v4l2 vidix vim-with-x wmf x86 xine xml xml2 xosd xprint xv xvid zlib video_cards_nvidia" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS
I've fixed this problem by deleting the line (39): #if defined(__KERNEL__) || defined(__LINUX_KEYBOARD_H) and the corresponding #endif on line(697), and it compiles fine. These lines are not in the headers distributed with the kernel.
Want to try linux-headers-2.6 instead of linux26-headers?
plasmaroo: I'm reopening this, because I'm getting reports that it 2.6.8.1-r[24] are causing problems for some folk. see bug 86968.
Here is a quick patch I cooked up as per the instructions of dfseifer@cs.usc.edu. http://tirpitz.iat.sfu.ca/~robbat2/linux-headers-2.6.8.1-list_h-defines.patch
The patch is no good ideally as lots of other things will break as they include functions named the same as the ones in list.h and hence conflict when they include things... Having a look if there's a better way of fixing this...
*** This bug has been marked as a duplicate of 86968 ***