Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89486 - dev-python/pygame fails to compile on machines without X
Summary: dev-python/pygame fails to compile on machines without X
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-17 22:17 UTC by Robin Johnson
Modified: 2008-03-11 00:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
no-x11.patch (no-x11.patch,626 bytes, patch)
2007-07-12 23:37 UTC, Ian Stakenvicius
Details | Diff
new epatch line in pygame-1.7.1.ebuild for the no-x11.patch (no-x.patch,477 bytes, patch)
2008-03-11 00:25 UTC, Ilja R
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-04-17 22:17:00 UTC
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
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2005-04-20 08:01:55 UTC
hrmm, more upstream than us. there is no option in pygame to turn off X support, or so it seems.
Comment 2 Hubert Mercier (RETIRED) gentoo-dev 2005-07-24 06:47:07 UTC
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...
Comment 3 moonlite 2005-10-17 17:03:47 UTC
Same here. I also use 1.6 instead (which has some bugs of it own though)
Comment 4 Fritz Praus 2005-10-27 06:33:31 UTC
same problem here
a solution is to enter
#define DISABLE_X11
into /usr/include/SDL/SDL_syswm.h

it then compiles withour x11 support
Comment 5 moonlite 2005-11-11 08:57:12 UTC
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?
Comment 6 Pacho Ramos gentoo-dev 2007-02-11 20:45:06 UTC
Have you tried with dev-python/pygame-1.7.1?

Good luck!
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-04-09 20:52:39 UTC
See above and get back to us, please.
Comment 8 Scott Serr 2007-06-01 04:51:23 UTC
(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.
Comment 9 Ian Stakenvicius 2007-07-12 23:13:58 UTC
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..
Comment 10 Ian Stakenvicius 2007-07-12 23:14:42 UTC
Oh yeah -- it still fails, this should probably be reopened.. 
Comment 11 Ian Stakenvicius 2007-07-12 23:37:46 UTC
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.
Comment 12 Ilja R 2008-03-11 00:19:54 UTC
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.
Comment 13 Ilja R 2008-03-11 00:25:39 UTC
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