pygame does not compile on machines that do not have X installed. Reproducible: Always Steps to Reproduce: 1. install machine without any X 2. emerge pygame 3. Actual Results: ... i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 - march=pentium3 -pipe -fPIC -D_REENTRANT -I/usr/include/SDL - I/usr/include/python2.3 -c src/display.c -o build/temp.linux-i686- 2.3/src/display.o In file included from src/display.c:28: /usr/include/SDL/SDL_syswm.h:56:22: X11/Xlib.h: No such file or directory /usr/include/SDL/SDL_syswm.h:57:23: X11/Xatom.h: No such file or directory In file included from src/display.c:28: /usr/include/SDL/SDL_syswm.h:69: error: parse error before "XEvent" /usr/include/SDL/SDL_syswm.h:69: warning: no semicolon at end of struct or union /usr/include/SDL/SDL_syswm.h:69: warning: no semicolon at end of struct or union /usr/include/SDL/SDL_syswm.h:70: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:71: error: parse error before '}' token /usr/include/SDL/SDL_syswm.h:82: error: parse error before "Display" /usr/include/SDL/SDL_syswm.h:82: warning: no semicolon at end of struct or union /usr/include/SDL/SDL_syswm.h:82: warning: no semicolon at end of struct or union /usr/include/SDL/SDL_syswm.h:82: warning: no semicolon at end of struct or union /usr/include/SDL/SDL_syswm.h:83: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:93: error: parse error before "fswindow" /usr/include/SDL/SDL_syswm.h:93: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:94: error: parse error before "wmwindow" /usr/include/SDL/SDL_syswm.h:94: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:95: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:96: error: parse error before '}' token /usr/include/SDL/SDL_syswm.h:96: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:97: error: parse error before '}' token /usr/include/SDL/SDL_syswm.h:97: warning: data definition has no type or storage class /usr/include/SDL/SDL_syswm.h:197: error: parse error before '*' token src/display.c: In function `get_wm_info': src/display.c:372: error: parse error before "info" src/display.c:379: error: request for member `version' in something not a structure or union src/display.c:379: error: request for member `version' in something not a structure or union src/display.c:379: error: request for member `version' in something not a structure or union src/display.c:388: error: request for member `info' in something not a structure or union src/display.c:389: error: request for member `info' in something not a structure or union src/display.c:390: error: request for member `info' in something not a structure or union src/display.c:391: error: request for member `info' in something not a structure or union src/display.c:392: error: request for member `info' in something not a structure or union src/display.c:393: error: request for member `info' in something not a structure or union error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1 !!! ERROR: dev-python/pygame-1.6.2 failed. !!! Function distutils_src_compile, Line 38, Exitcode 1 !!! compilation failed !!! If you need support, post the topmost build error, NOT this status message. Expected Results: it should compile! SDL does not need X, so pygame shouldn't either. Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc- 2.3.4.20050125-r1, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 VIA Nehemiah Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 16 2005, 13:27:16)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.9.5, 1.8.5-r3, 1.7.9-r1, 1.5, 1.4_p6, 1.6.3 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -pipe" DISTDIR="/usr/gentoo-distfiles" FEATURES="autoaddcvs autoconfig buildpkg cvs digest distlocks sandbox sfperms strict userpriv" GENTOO_MIRRORS="http://gentoo.ccccom.com http://gentoo.seren.com/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/gentoo-packages/x86-c3-2" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="" USE="x86 aalib acpi alsa apm bitmap-fonts crypt curl directfb emboss esd fbcon gd gif joystick libwww mmx mp3 mpeg ncurses pam perl pic png pnp python sdl sse ssl svga truetype-fonts type1-fonts usb userlocales" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LINGUAS
hrmm, more upstream than us. there is no option in pygame to turn off X support, or so it seems.
Same problem here :-( Really annoying when trying to build a media box on framebuffer. I only found one solution for the moment : add >=dev-python/pygame-1.6.1 to /etc/portage/package.mask...
Same here. I also use 1.6 instead (which has some bugs of it own though)
same problem here a solution is to enter #define DISABLE_X11 into /usr/include/SDL/SDL_syswm.h it then compiles withour x11 support
Adding "=x11-themes/gdm-themes-2.0-r2" to /etc/portage/package.mask made it possible to make real "emerge world" upgrades instead of having to run emerge -p world and then cutnpaste all programs except gdm-themes. Could anyone provide any debugging-hints so that i can file a better bug-report?
Have you tried with dev-python/pygame-1.7.1? Good luck!
See above and get back to us, please.
(In reply to comment #6) > Have you tried with dev-python/pygame-1.7.1? No luck, 1.7.1 behaves same as 1.6.1.
I don't know anything about python, but is there a way to define DISABLE_X11 in the config file for pygame somehow?? That, and an 'X' use flag, would seem to make the most sense to me... I've been trying but i can't seem to figgure it out..
Oh yeah -- it still fails, this should probably be reopened..
Created attachment 124726 [details, diff] no-x11.patch This patch changes '!defined(DISABLE_X11)' which isn't used anywhere, to 'defined(SDL_VIDEO_DRIVER_X11)' which is enabled when SDL is built with X11 support. Can be added to the ebuild with a standard epatch line.
Hi, it works for me... Would it be too much of a hassle to include the following lines into pygame-1.7.1.ebuild if ! use X; then cd "${S}" epatch "${FILESDIR}/no-x11.patch" fi This would avoid much confusion.
Created attachment 145782 [details, diff] new epatch line in pygame-1.7.1.ebuild for the no-x11.patch This patch to the ebuild applies the other patch automatically if the X use flag is not set. Other solution could be, too look if libsdl was build with X