Opened 12 months ago

Last modified 12 months ago

#71861 assigned defect

py27-game needs C11

Reported by: barracuda156 Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: Cc:
Port: py27-game

Description (last modified by barracuda156)

First of all, build possibly fails to find some components:

--->  Configuring py27-game
Warning: ccache_dir /opt/local/var/macports/build/.ccache could not be initialized; disabling ccache: couldn't execute "ccache": no such file or directory
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-game/py27-game/work/pygame-2.0.3" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --prefix=/opt/local -config -sdl1 


WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using Darwin configuration...

Hunting dependencies...
SDL     : found 1.2.16
Framework SDL not found
FONT    : found
Framework SDL_ttf not found
IMAGE   : found
Framework SDL_image not found
MIXER   : found
Framework SDL_mixer not found
PNG     : found
JPEG    : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 26.2.20

If you get compiler errors during install, double-check
the compiler flags in the "Setup" file.

But that may be intended.

However, it seems to require C11:

:info:build In file included from /opt/local/include/SDL/SDL_main.h:26,
:info:build                  from /opt/local/include/SDL/SDL.h:30,
:info:build                  from src_c/freetype/../_pygame.h:42,
:info:build                  from src_c/freetype/ft_wrap.h:25,
:info:build                  from src_c/_freetype.c:26:
:info:build /opt/local/include/SDL/SDL_stdinc.h:121: error: redefinition of typedef ‘Uint8’
:info:build src_c/include/pgcompat.h:86: error: previous declaration of ‘Uint8’ was here
:info:build /opt/local/include/SDL/SDL_stdinc.h:125: error: redefinition of typedef ‘Uint32’
:info:build src_c/include/pgcompat.h:85: error: previous declaration of ‘Uint32’ was here
:info:build src_c/_freetype.c: In function ‘_ftfont_setrender_flag’:
:info:build src_c/_freetype.c:1242: warning: reading through null pointer (argument 3)
:info:build src_c/_freetype.c:1242: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘void *’
:info:build ---
:info:build For help with compilation see:
:info:build     https://www.pygame.org/wiki/MacCompile
:info:build To contribute to pygame development see:
:info:build     https://www.pygame.org/contribute.html
:info:build ---
:info:build error: command '/usr/bin/gcc-4.2' failed with exit status 1

With gcc14 it fails differently:

/opt/local/bin/gcc-mp-14 -fno-strict-aliasing -fno-common -dynamic -pipe -I/opt/local/libexec/openssl11/include -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch ppc -isysroot/ -Ddarwin -D_THREAD_SAFE -I/usr/X11R6/include -I/opt/local/include/SDL -I/opt/local/include/SDL -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src_c/imageext.c -o build/temp.macosx-10.6-ppc-2.7/src_c/imageext.o
src_c/imageext.c: In function 'image_load_ext':
src_c/imageext.c:126:13: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  126 |         ext = find_extension(name);
      |             ^
src_c/imageext.c:115:9: warning: variable 'lock_mutex' set but not used [-Wunused-but-set-variable]
  115 |     int lock_mutex = 0;
      |         ^~~~~~~~~~
/opt/local/bin/gcc-mp-14 -bundle -undefined dynamic_lookup -L/opt/local/libexec/openssl11/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -arch ppc -arch ppc -isysroot/ build/temp.macosx-10.6-ppc-2.7/src_c/imageext.o -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lSDLmain -lSDL -lSDL_image -lpng -ljpeg -o build/lib.macosx-10.6-ppc-2.7/pygame/imageext.so -Wl,-framework,Cocoa
building 'pygame.font' extension
/opt/local/bin/gcc-mp-14 -fno-strict-aliasing -fno-common -dynamic -pipe -I/opt/local/libexec/openssl11/include -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch ppc -isysroot/ -Ddarwin -D_THREAD_SAFE -I/usr/X11R6/include -I/opt/local/include/SDL -I/opt/local/include/SDL -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src_c/font.c -o build/temp.macosx-10.6-ppc-2.7/src_c/font.o
src_c/font.c: In function 'font_dealloc':
src_c/font.c:748:29: error: initialization of 'int **' from incompatible pointer type 'TTF_Font *' {aka 'struct _TTF_Font *'} [-Wincompatible-pointer-types]
  748 |             int** face_pp = font;
      |                             ^~~~

---
For help with compilation see:
    https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
    https://www.pygame.org/contribute.html
---

error: command '/opt/local/bin/gcc-mp-14' failed with exit status 1

Change History (2)

comment:1 Changed 12 months ago by barracuda156

Description: modified (diff)

comment:2 Changed 12 months ago by barracuda156

Also, it passes a flag to use non-MacPorts X11:

/opt/local/bin/gcc-mp-14 -bundle -undefined dynamic_lookup -L/opt/local/libexec/openssl11/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -arch ppc -Wno-incompatible-pointer-types build/temp.macosx-10.6-ppc-2.7/src_c/color.o -L/opt/local/lib -lSDLmain -lSDL -o build/lib.macosx-10.6-ppc-2.7/pygame/color.so -Wl,-framework,Cocoa
building 'pygame.constants' extension
/opt/local/bin/gcc-mp-14 -fno-strict-aliasing -fno-common -dynamic -pipe -I/opt/local/libexec/openssl11/include -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-incompatible-pointer-types -Ddarwin -D_THREAD_SAFE -I/usr/X11R6/include -I/opt/local/include/SDL -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src_c/constants.c -o build/temp.macosx-10.6-ppc-2.7/src_c/constants.o
/opt/local/bin/gcc-mp-14 -bundle -undefined dynamic_lookup -L/opt/local/libexec/openssl11/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -arch ppc -Wno-incompatible-pointer-types build/temp.macosx-10.6-ppc-2.7/src_c/constants.o -L/opt/local/lib -lSDLmain -lSDL -o build/lib.macosx-10.6-ppc-2.7/pygame/constants.so -Wl,-framework,Cocoa
building 'pygame.display' extension
/opt/local/bin/gcc-mp-14 -fno-strict-aliasing -fno-common -dynamic -pipe -I/opt/local/libexec/openssl11/include -Os -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Wno-incompatible-pointer-types -Ddarwin -D_THREAD_SAFE -I/usr/X11R6/include -I/opt/local/include/SDL -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src_c/display.c -o build/temp.macosx-10.6-ppc-2.7/src_c/display.o
Note: See TracTickets for help on using tickets.