When I try to emerge mplayer, I get errors when compiling vo_dga.c. There are bad imports from x11_common.h and undeclared symbols in vo_dga.c. It looks similarly to http://bugs.gentoo.org/show_bug.cgi?id=69517 . Reproducible: Always Steps to Reproduce: 1. up-to-date portage tree (done emerge --sync before on 02/05/2005) 2. up-to-date xorg-x11 (v. 6.8.0-r4) 3. emerge mplayer Actual Results: cc -c -I../libvo -I../../libvo -O2 -march=athlon-xp -D_REENTRANT -D_LARGEFILE_S OURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../osdep -DMPG12PLAY -o vo_dga.o vo_dga.c In file included from vo_dga.c:22: x11_common.h:75: error: parse error before "vo_window" x11_common.h:75: warning: data definition has no type or storage class x11_common.h:76: error: parse error before "vo_gc" x11_common.h:76: warning: data definition has no type or storage class x11_common.h:77: error: parse error before "vo_hint" x11_common.h:77: warning: data definition has no type or storage class x11_common.h:89: error: parse error before '*' token x11_common.h:90: error: parse error before '*' token x11_common.h:101: error: parse error before '*' token vo_dga.c: In function `check_events': vo_dga.c:321: error: `mDisplay' undeclared (first use in this function) vo_dga.c:321: error: (Each undeclared identifier is reported only once vo_dga.c:321: error: for each function it appears in.) vo_dga.c: In function `flip_page': vo_dga.c:344: error: `mDisplay' undeclared (first use in this function) vo_dga.c:344: error: `mScreen' undeclared (first use in this function) vo_dga.c: In function `uninit': vo_dga.c:392: error: `mDisplay' undeclared (first use in this function) vo_dga.c:395: error: `mScreen' undeclared (first use in this function) vo_dga.c: In function `config': vo_dga.c:766: error: `mDisplay' undeclared (first use in this function) vo_dga.c:766: error: `mScreen' undeclared (first use in this function) vo_dga.c: In function `preinit': vo_dga.c:897: error: `mDisplay' undeclared (first use in this function) vo_dga.c:897: error: `mScreen' undeclared (first use in this function) make[1]: *** [vo_dga.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/mplayer-1.0_pre5-r5/work/MPlayer-1. 0pre5try2/libvo' make: *** [libvo/libvo.a] Error 2 !!! ERROR: media-video/mplayer-1.0_pre5-r5 failed. !!! Function src_compile, Line 450, Exitcode 2 !!! Failed to build MPlayer! etcat -v xorg-x11 * x11-base/xorg-x11 : [ ] 6.7.0-r3 (0) [ ] 6.8.0-r3 (0) [ I] 6.8.0-r4 (0) [M~ ] 6.8.1.901-r1 (0) [M~ ] 6.8.1.902 (0) [M ] 6.8.1.902-r1 (0) [M ] 6.8.1.903 (0) [M~ ] 6.8.1.904 (0) emerge info Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r12 i686) ================================================================= System uname: 2.6.9-gentoo-r12 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 12:15:55)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.4.21-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow acl acpi alsa avi bzlib cdr cups dbm divx4linux doc dvd dvdr encode exif gdbm gif gmp gphoto2 iconv imap imlib ipv6 java jpeg lirc mad maildir matroska mime mmx mng mpeg oggvorbis pam pcre png postgres readline samba sharedmem slang spell sse svg tiff truetype unicode usb v4l v4l2 wmf xine xml xml2 xsl xvid" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Could you provide the pre-parsed output from gcc? enter the build directory and omit the last gcc command by hand (end apply -E) and post the .o file you get up here?
Created attachment 50457 [details] preparsed vo_dga.c Attached file is vo_dga.o builded with following command: cc -E -c -I../libvo -I../../libvo -O2 -march=athlon-xp -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../osdep -DMPG12PLAY -o vo_dga.o vo_dga.c
Window and GC is not defined yet at that point, but later. MPlayer mainstream bug in that case. Who wants to find the missing #include <X11/Xlib.h>
Same bug in pre6. Reported in MPlayer's Bugzilla as http://bugzilla.mplayerhq.hu/show_bug.cgi?id=227
Problem happens only with USE="-X", so configure runs with --disable-x11. With X11 enabled compiles fine. Workaround is probably disable dga when disabling X11.
not really upstream so...
Ok, I added a new dga USE flag that has a dependancy on virtual/x11, making sure X is installed when using dga. That should fix things properly :P.