#9906 closed defect (fixed)
BUG: py-game 1.7.1
Reported by: | maps@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.2 |
Keywords: | Cc: | ben@…, markd@… | |
Port: | py-game |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
py-game 1.7.1
Fails to build on my system; the error seems to come from a series of #ifdef's, none of which are applicable. I have made it build (and work, in X11) by forcing the X11 option to be selected.
Here is the output of port -d install py-game:
DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-game DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-game DEBUG: Requested variant powerpc is not provided by port py-game. DEBUG: Requested variant darwin is not provided by port py-game. DEBUG: Requested variant macosx is not provided by port py-game. DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl DEBUG: Searching for dependency: libsdl DEBUG: Found Dependency: receipt exists for libsdl DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/audio/libsdl_mixer DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/audio/libsdl_mixer DEBUG: Searching for dependency: libsdl_mixer DEBUG: Found Dependency: receipt exists for libsdl_mixer DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl_image DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl_image DEBUG: Searching for dependency: libsdl_image DEBUG: Found Dependency: receipt exists for libsdl_image DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl_ttf DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/devel/libsdl_ttf DEBUG: Searching for dependency: libsdl_ttf DEBUG: Found Dependency: receipt exists for libsdl_ttf DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/multimedia/smpeg DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/multimedia/smpeg DEBUG: Searching for dependency: smpeg DEBUG: Found Dependency: receipt exists for smpeg DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-numeric DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-numeric DEBUG: Searching for dependency: py-numeric DEBUG: Found Dependency: receipt exists for py-numeric DEBUG: Found port in file:///opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-pyobjc DEBUG: Changing to port directory: /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-pyobjc DEBUG: Searching for dependency: py-pyobjc DEBUG: Found Dependency: receipt exists for py-pyobjc DEBUG: Skipping completed com.apple.main (py-game) DEBUG: Skipping completed com.apple.unarchive (py-game) DEBUG: Skipping completed com.apple.fetch (py-game) DEBUG: Skipping completed com.apple.checksum (py-game) DEBUG: Skipping completed com.apple.extract (py-game) DEBUG: Skipping completed com.apple.patch (py-game) DEBUG: Skipping completed com.apple.configure (py-game) ---> Building py-game with target build DEBUG: Executing com.apple.build (py-game) DEBUG: Assembled command: 'cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_python_py-game/work/pygame-1.7.1release" && /opt/local/bin/python2.4 setup.py build' Using Darwin configuration... running build running build_py running build_ext building 'pygame.display' extension /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Ddarwin -I/opt/local/include/SDL -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -I/opt/local/include/python2.4 -c src/display.c -o build/temp.darwin-8.7.0-Power_Macintosh-2.4/src/display.o src/display.c: In function 'get_wm_info': src/display.c:432: error: 'SDL_SysWMinfo' has no member named 'data' error: command '/usr/bin/gcc-4.0' failed with exit status 1 Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_python_py-game/work/pygame-1.7.1release" && /opt/local/bin/python2.4 setup.py build" returned error 1 Command output: Using Darwin configuration... running build running build_py running build_ext building 'pygame.display' extension /usr/bin/gcc-4.0 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Ddarwin -I/opt/local/include/SDL -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -I/opt/local/include/python2.4 -c src/display.c -o build/temp.darwin-8.7.0-Power_Macintosh-2.4/src/display.o src/display.c: In function 'get_wm_info': src/display.c:432: error: 'SDL_SysWMinfo' has no member named 'data' error: command '/usr/bin/gcc-4.0' failed with exit status 1 Warning: the following items did not execute (for py-game): com.apple.activate com.apple.build com.apple.destroot com.apple.archive com.apple.install Error: /opt/local/bin//port: Status 1 encountered during processing.
Here is other general info:
UNAME -A:
Darwin wlan-docking-rz-1-1017.ethz.ch 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc
PORT VERSION:
Version: 1.211
PORT INFO PY-GAME:
py-game 1.7.1, python/py-game http://www.pygame.org Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system. Library Dependencies: libsdl, libsdl_mixer, libsdl_image, libsdl_ttf, smpeg, py-numeric Runtime Dependencies: py-pyobjc Maintainers: ben@opendarwin.org
Change History (9)
comment:1 Changed 18 years ago by akhenakh (Fabrice Aneche)
comment:2 Changed 18 years ago by ehainry@…
Cc: | ben@… added |
---|
The data member for SDL_SysWMinfo seems only present on qnx/photon.
Changing the line before the one calling this data member by #elif defined(__QNXTO__)
seems to make sense and allows py-game to compile ok.
2nd point: configure checks for pyobjc. So it should belong to depends_lib, not depends_run.
Proposed patch:
--- src/display.c.orig 2006-08-16 13:59:33.000000000 +0200 +++ src/display.c 2006-08-16 14:00:12.000000000 +0200 @@ -428,7 +428,7 @@ PyDict_SetItemString(dict, "window", PyInt_FromLong(info.window)); PyDict_SetItemString(dict, "wimpVersion", PyInt_FromLong(info.wimpVersion)); PyDict_SetItemString(dict, "taskHandle", PyInt_FromLong(info.taskHandle)); -#else +#elif defined(__QNXNTO__) PyDict_SetItemString(dict, "data", PyInt_FromLong(info.data)); #endif
comment:3 Changed 18 years ago by todd.opendarwin@…
I was having the same trouble getting py-game to build on an intel mac. I can confirm that the proposed patch above solves the problem and py-game runs normally after compiling successfully.
comment:4 Changed 18 years ago by dkcrame@…
I have the same problems. However I tried applying the patch above to py-game display.c and setting the py-game PORTFILE to use pyobjc to depends_lib but still couldn't get py-game to build on a macbook, any details I might have missed?
comment:5 Changed 18 years ago by dkcrame@…
Scratch that I got it to work, I stupidly didn't remove the last #else great work ehainry@… much thanks.
The py-game examples worked like a charm... Had to repost, no way to edit a previous post?
comment:6 Changed 18 years ago by sebastien@…
The above patch does not seem correct, as some Python bindings won't be defined. The solution I used is to add a "-Dunix" flag in the "Setup" file, along with the "-Ddarwin" flag.
It worked like a charm.
comment:7 Changed 18 years ago by gjznituv+macports@…
Can you please explain how to apply the change? How do I add a -Dunix flag in the setup file? After I give the port install py-game command everything runs by itself...
comment:8 Changed 18 years ago by markd@…
Cc: | markd@… added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
A patch was commited to fix this on ticket #10642.
comment:9 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Port: | py-game added |
Same error on mac intel.