Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231250 - dev-python/pygame-1.7.1-r1: patch uses Py_ssize_t, but doesn't define it
Summary: dev-python/pygame-1.7.1-r1: patch uses Py_ssize_t, but doesn't define it
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 01:33 UTC by Randall Wald
Modified: 2008-07-14 21:34 UTC (History)
10 users (show)

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


Attachments
Simple fix (pygame-1.7.1-r1-check2.5.patch,751 bytes, patch)
2008-07-14 16:48 UTC, Marcus Schwartz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Wald 2008-07-09 01:33:42 UTC
pygame-1.7.1-r1 differs from pygame-1.7.1 in the the former patches src/image.c in a few places to use the Py_ssize_t type rather than the int type. However, it seems that at least on my system, Py_ssize_t is not defined; when compiling, I get the following error:

src/image.c: In function ‘image_tostring’:
src/image.c:295: error: ‘Py_ssize_t’ undeclared (first use in this function)
src/image.c:295: error: (Each undeclared identifier is reported only once
src/image.c:295: error: for each function it appears in.)
src/image.c:295: error: expected ‘;’ before ‘len’
src/image.c:325: error: ‘len’ undeclared (first use in this function)
src/image.c:335: error: expected ‘)’ before ‘surf’
src/image.c:411: error: expected ‘)’ before ‘surf’
src/image.c: In function ‘image_fromstring’:
src/image.c:610: error: ‘Py_ssize_t’ undeclared (first use in this function)
src/image.c:610: error: expected ‘;’ before ‘len’
src/image.c:619: error: ‘len’ undeclared (first use in this function)
src/image.c: In function ‘image_frombuffer’:
src/image.c:735: error: ‘Py_ssize_t’ undeclared (first use in this function)
src/image.c:735: error: expected ‘;’ before ‘len’
src/image.c:745: error: ‘len’ undeclared (first use in this function)
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

Since this change was quite deliberate, I'm sure Py_ssize_t exists on some peoples' systems; which package (or possibly, which version of a package) am I missing? Also, the fact that I installed and then later uninstalled python-2.5 might not be helping. (I ran python-updater both after install and after uninstall; I also deleted /usr/lib64/python-2.5 after the final run of python-updater.)
Comment 1 pat 2008-07-09 12:54:00 UTC
Same error here, I don't (and did not) use python 2.5.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-09 17:36:14 UTC
I'm not quite sure, does python-updater support downgrading at all? But you're right, the unconditional use of Py_ssize_t renders pygame incompatible to Python 2.4. 

Raising severity, given that it just went stable on amd64.


@Santiago: Why did you mark it stable? You obviously didn't test with Python 2.4 and also violated the double pair of eyes principle, by not letting an independent arch maintainer go for it.
Comment 3 kavol 2008-07-10 21:24:39 UTC
I've just run into this too ... :-(
Comment 4 Javier Tarifa 2008-07-12 12:44:53 UTC
Same problem here. I don't understand how it was marked stable.
Comment 5 quazgar 2008-07-13 12:51:20 UTC
Since the patch is called pygame-1.7.1-python2.5.patch, wouldn't it be a nice and logical idea to apply it only if python's version is 2.5?  Question: Is there a way for revdep-rebuild to detect this kind of dependency?
Comment 6 Marcus Schwartz 2008-07-14 16:48:08 UTC
Created attachment 160367 [details, diff]
Simple fix
Comment 7 Santiago M. Mola (RETIRED) gentoo-dev 2008-07-14 21:34:57 UTC
I've just removed 1.7.1-r1 from the tree. Sorry for the inconvenience.

amd64 users: pygame-1.7 will work mostly fine with Python 2.5. pygame-1.8 doesn't present any problem at all.

rest of arches are not affected.