#15123 closed defect (fixed)
py-game tries to use framework version of libsdl
Reported by: | cpettitt@… | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | py-game libsdl-framework | Cc: | simon@… |
Port: |
Description
When install py-game, I get the following error:
sudo port install py-game ---> Building py-game with target build Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-game/work/pygame-1.8.0release" && /opt/local/bin/python2.4 setup.py build " returned error 1 Command output: src/_numericsurfarray.c:982: error: parse error before ')' token src/_numericsurfarray.c:982: error: parse error before ')' token src/_numericsurfarray.c:982: error: parse error before ')' token src/_numericsurfarray.c:985: error: parse error before ')' token src/_numericsurfarray.c:985: error: parse error before ')' token src/_numericsurfarray.c:985: error: parse error before ')' token src/_numericsurfarray.c:985: error: parse error before ')' token src/_numericsurfarray.c:988: error: parse error before ')' token src/_numericsurfarray.c:988: error: parse error before ')' token src/_numericsurfarray.c:988: error: parse error before ')' token src/_numericsurfarray.c:988: error: parse error before ')' token src/_numericsurfarray.c:991: error: parse error before ')' token src/_numericsurfarray.c:991: error: parse error before ')' token src/_numericsurfarray.c:991: error: parse error before ')' token src/_numericsurfarray.c:991: error: parse error before ')' token src/_numericsurfarray.c: In function 'make_surface': src/_numericsurfarray.c:1016: error: 'SDL_Surface' undeclared (first use in this function) src/_numericsurfarray.c:1016: error: 'surf' undeclared (first use in this function) src/_numericsurfarray.c:1019: error: 'Uint32' undeclared (first use in this function) src/_numericsurfarray.c:1019: error: parse error before 'rmask' src/_numericsurfarray.c:1033: error: 'rmask' undeclared (first use in this function) src/_numericsurfarray.c:1033: error: 'gmask' undeclared (first use in this function) src/_numericsurfarray.c:1033: error: 'bmask' undeclared (first use in this function) src/_numericsurfarray.c:1045: warning: implicit declaration of function 'SDL_CreateRGBSurface' src/_numericsurfarray.c:1048: warning: implicit declaration of function 'SDL_GetError' src/_numericsurfarray.c:1048: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast src/_numericsurfarray.c:1049: error: parse error before 'SDL_Surface' src/_numericsurfarray.c:1049: warning: function declaration isn't a prototype src/_numericsurfarray.c:1052: warning: implicit declaration of function 'SDL_FreeSurface' error: command '/usr/bin/gcc-4.0' failed with exit status 1 Error: Status 1 encountered during processing.
I found that the SDL framework was not installed by running the configure script for py-game:
$ sudo python config.py Using Darwin configuration... Backup existing "Setup" file [Y/n]: Remove old build directory (force recompile) [Y/n]: Hunting dependencies... Framework SDL not found Framework SDL_ttf not found Framework SDL_image not found Framework SDL_mixer not found Framework smpeg not found PNG : found JPEG : found SCRAP : not found
Installing the libsdl-framework port fixed the compilation error.
Attachments (2)
Change History (11)
Changed 17 years ago by cpettitt@…
Attachment: | Portfile-py-game.diff added |
---|
comment:1 Changed 17 years ago by cpettitt@…
comment:2 Changed 17 years ago by jmroot (Joshua Root)
Milestone: | → Port Bugs |
---|---|
Owner: | changed from macports-tickets@… to jmr@… |
Status: | new → assigned |
Summary: | py-game port should depend on libsdl-framework? → py-game tries to use framework version of libsdl |
comment:3 Changed 17 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Should be fixed by r36269.
comment:4 Changed 17 years ago by cpettitt@…
Thanks jmr. I was not familiar with the "framework" distinction. Your patch did indeed remove the dependency.
I'm seeing a new error now where py-gaem's display extension is trying to use X11, but X11 is not being included.
---> Building py-game with target build Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-game/work/pygame-1.8.0release" && /opt/local/bin/python2.4 setup.py build " returned error 1 Command output: /opt/local/include/SDL/SDL_syswm.h:86: warning: no semicolon at end of struct or union /opt/local/include/SDL/SDL_syswm.h:87: warning: type defaults to 'int' in declaration of 'window' /opt/local/include/SDL/SDL_syswm.h:87: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:98: error: parse error before 'fswindow' /opt/local/include/SDL/SDL_syswm.h:98: warning: type defaults to 'int' in declaration of 'fswindow' /opt/local/include/SDL/SDL_syswm.h:98: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:99: error: parse error before 'wmwindow' /opt/local/include/SDL/SDL_syswm.h:99: warning: type defaults to 'int' in declaration of 'wmwindow' /opt/local/include/SDL/SDL_syswm.h:99: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:102: error: parse error before '*' token /opt/local/include/SDL/SDL_syswm.h:102: warning: type defaults to 'int' in declaration of 'gfxdisplay' /opt/local/include/SDL/SDL_syswm.h:102: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:103: error: parse error before '}' token /opt/local/include/SDL/SDL_syswm.h:103: warning: type defaults to 'int' in declaration of 'x11' /opt/local/include/SDL/SDL_syswm.h:103: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:104: error: parse error before '}' token /opt/local/include/SDL/SDL_syswm.h:104: warning: type defaults to 'int' in declaration of 'info' /opt/local/include/SDL/SDL_syswm.h:104: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:105: error: parse error before '}' token /opt/local/include/SDL/SDL_syswm.h:105: warning: type defaults to 'int' in declaration of 'SDL_SysWMinfo' /opt/local/include/SDL/SDL_syswm.h:105: warning: data definition has no type or storage class /opt/local/include/SDL/SDL_syswm.h:205: error: parse error before '*' token /opt/local/include/SDL/SDL_syswm.h:205: warning: function declaration isn't a prototype src/display.c: In function 'get_wm_info': src/display.c:310: error: parse error before 'info' src/display.c:314: error: request for member 'version' in something not a structure or union src/display.c:314: error: request for member 'version' in something not a structure or union src/display.c:314: error: request for member 'version' in something not a structure or union src/display.c:309: warning: unused variable 'tmp' error: command '/usr/bin/gcc-4.0' failed with exit status 1 Error: Status 1 encountered during processing.
There is a patch in gentoo to disable X11 (http://bugs.gentoo.org/show_bug.cgi?id=89486), but I'm not familiar enough with py-game to know if that is appropriate for the py-game port.
An alternative, which worked for me, was to modify Setup. I changed:
SDL = -I/opt/local/include/SDL -L/opt/local/lib -Ddarwin -lSDL
to:
SDL = -I/opt/local/include/SDL -I/usr/X11R6/include -L/opt/local/lib -Ddarwin -lSDL
Should I open a new bug for this? Do you have any guidance on the right way to approach this?
Many thanks, Chris
comment:5 Changed 17 years ago by cpettitt@…
FWIW, I found this snippet in config_unix.py (for building the Setup file):
if self.name == 'SDL': inc = '-I' + '/usr/X11R6/include' self.cflags = inc + ' ' + self.cflags
So, I don't feel as bad now. I'll put together a patch. Should that go into a new bug or this one?
Changed 17 years ago by cpettitt@…
Attachment: | patch-config_darwin.py.diff.diff added |
---|
comment:6 Changed 17 years ago by cpettitt@…
Attached patch to patch-config_darwin.diff. Port installed cleanly on Tiger with Python 2.4
comment:7 Changed 17 years ago by jmroot (Joshua Root)
X11 includes shouldn't be needed, and I can't reproduce your build failure on Leopard. It actually looks like something is wrong with SDL_syswm.h. I'm going to open a new ticket for this.
comment:8 Changed 17 years ago by simon@…
Cc: | simon@… added |
---|
Replying to cpettitt@gmail.com:
I'm seeing a new error now where py-gaem's display extension is trying to use X11, but X11 is not being included. Many thanks, Chris
Replying to jmr@macports.org:
X11 includes shouldn't be needed, and I can't reproduce your build failure on Leopard. It actually looks like something is wrong with SDL_syswm.h. I'm going to open a new ticket for this.
I've attached a patched portfile which includes the framework ports for the include SDL ports. This yielded the expected behavior on my system: the port compiled and other libraries were able to take advantage of mixer, etc.