This the same bug, which was reported in #40438. The compile still fails, if you use "matrox" instead of "nvidia". Was this bug ever solved? Both the original poster and spanky seem to have only succeeded in compiling if they use "nvidia" Reproducible: Always Steps to Reproduce: 1.VIDEO_CARDS=matrox emerge directfb 2. 3. Actual Results: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../src -I/usr/include/libmpeg3 -D_REENTRANT -Wall -O3 -ffast-math -pipe -O3 -march=pentium3 -pipe -fomit-frame-pointer -DFUSION_FAKE -Werror-implicit-function-declaration -c matrox_maven.c -fPIC -DPIC -o .libs/matrox_maven.o In file included from matrox_maven.c:32: /usr/include/linux/i2c-dev.h:37: error: field `__user' has incomplete type /usr/include/linux/i2c-dev.h:37: error: syntax error before '*' token /usr/include/linux/i2c-dev.h:42: error: field `__user' has incomplete type /usr/include/linux/i2c-dev.h:42: error: syntax error before '*' token /usr/include/linux/i2c-dev.h:44: error: syntax error before '}' token matrox_maven.c: In function `maven_write_byte': matrox_maven.c:63: error: implicit declaration of function `i2c_smbus_write_byte_data' matrox_maven.c: In function `maven_write_word': matrox_maven.c:80: error: implicit declaration of function `i2c_smbus_write_word_data' matrox_maven.c: In function `maven_open': matrox_maven.c:311: error: `I2C_SLAVE' undeclared (first use in this function) matrox_maven.c:311: error: (Each undeclared identifier is reported only once matrox_maven.c:311: error: for each function it appears in.) matrox_maven.c: In function `maven_init': matrox_maven.c:450: error: `I2C_SLAVE' undeclared (first use in this function) make[3]: *** [matrox_maven.lo] Error 1 make[3]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/gfxdrivers/matrox' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20/gfxdrivers' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/DirectFB-0.9.20/work/DirectFB-0.9.20' make: *** [all-recursive-am] Error 2 !!! ERROR: dev-libs/DirectFB-0.9.20 failed. !!! Function src_compile, Line 70, Exitcode 2 !!! (no error message) Expected Results: Compiling cleanly Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo-r1) ================================================================= System uname: 2.6.3-gentoo-r1 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /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/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS=" ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.mirror.sdv.fr http://gentoo.tiscali.nl/gentoo/ " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/overlay" SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage" USE="X alsa apache2 apm arts avi cdr crypt cscope cups directfb dvd dvdr encode esd fbcon flac gif gpm icq imagemagick imap imlib java joysticks jpeg kde linguas_de lirc maildir mmx mozilla mpeg ncurses nls nocd nptl oggvorbis opengl pam pdflib perl png python qt quicktime readline samba scanner sdl slang spell sse ssl svga tcpd tetex tiff truetype usb video_cards_matrox videos wmf x86 xml2 xmms xv zlib" This is a newly compiled system from scratch with linux-headers 2.6.3, gentoo-kernel 2.6.3 and the nptl flag set. Spanky, I checked your patch and it made it exactly into the linux-headers file i2c.h, but the compile nevertheless fails. Some more __KERNEL caressing necessary?
oops, i got the kernel headers semi-fixed but forgot to patch DirectFB :) fixed that in cvs but i guess my patch for i2c wasnt 100% ... plasmaroo: the '#include <asm/semaphore.h>' in linux/i2c.h needs to be inside the '#ifdef __KERNEL__' block
Yes, you're right. With your new DirectFB patch it is still necessary to move the asm/semaphore line into the __KERNEL__ environment. With this change the package compiles cleanly. Thanks a lot four your fast help.
Fixed in CVS; should hit Portage within an hour; if you remerge linux-headers-2.6.3-r1 the fix will now be applied for you. Thanks.
as of Mar 31 with emerge sync from Mar 30 bug still present I pulled development sources (2.6.4) and compiled hoping it would fix the problem. Didn't. Earlier was running 2.6.3-gentoo-r1 and that didn't work (though haven't recompiled).
I just tried it, and it still works for me (ie. compiles cleanly) with matrox as video card. Are you missing the correct linux-headers-2.6.3-r1?