繁体   English   中英

python 3.6.4中的pygame_sdl2构建错误

[英]pygame_sdl2 build error in python 3.6.4

我无法在Mac OS 10.12.6 Sierra Machine上构建pygame_sdl2。我在Python 3.6.4上完成了https://github.com/renpy/p​​ygame_sdl2/上的所有步骤,直到“ build setup.py install”为止。是完整的登录终端

AvendeMacBook-Pro:pygame_sdl2-master aven$ ./bin/python3 setup.py install
running install
running bdist_egg
running egg_info
writing pygame_sdl2.egg-info/PKG-INFO
writing dependency_links to pygame_sdl2.egg-info/dependency_links.txt
writing top-level names to pygame_sdl2.egg-info/top_level.txt
reading manifest file 'pygame_sdl2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pygame_sdl2.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.12-x86_64/egg
running install_lib
running build_py
running build_ext
building 'pygame_sdl2.mixer' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.mixer.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.mixer.o -D_THREAD_SAFE
gen3/pygame_sdl2.mixer.c:2392:46: error: use of undeclared identifier
      'MIX_INIT_MODPLUG'; did you mean 'MIX_INIT_MOD'?
  __pyx_t_3 = __Pyx_PyInt_From_MIX_InitFlags(MIX_INIT_MODPLUG); if (unli...
                                             ^~~~~~~~~~~~~~~~
                                             MIX_INIT_MOD
/usr/local/include/SDL2/SDL_mixer.h:80:5: note: 'MIX_INIT_MOD' declared here
    MIX_INIT_MOD    = 0x00000002,
    ^
gen3/pygame_sdl2.mixer.c:2406:46: error: use of undeclared identifier
      'MIX_INIT_FLUIDSYNTH'
  __pyx_t_8 = __Pyx_PyInt_From_MIX_InitFlags(MIX_INIT_FLUIDSYNTH); if (u...
                                             ^
2 errors generated.
error: command 'clang' failed with exit status 1
AvendeMacBook-Pro:pygame_sdl2-master aven$ git clone https://github.com/renpy/pygame_sdl2
Cloning into 'pygame_sdl2'...
remote: Counting objects: 2022, done.
remote: Total 2022 (delta 1), reused 1 (delta 1), pack-reused 2020
Receiving objects: 100% (2022/2022), 1.24 MiB | 344.00 KiB/s, done.
Resolving deltas: 100% (1253/1253), done.
AvendeMacBook-Pro:pygame_sdl2-master aven$ ls
COPYING.LGPL21      gen         run_pygame_test.py
COPYING.ZLIB        gen3            scripts
MANIFEST.in     include         sdl2.c
README.rst      lib         setup.py
__pycache__     old-tests       setuplib.py
bin         pip-selfcheck.json  setuplib.pyc
build           pygame_sdl2     src
docs            pygame_sdl2.egg-info    test
fix_virtualenv.py   run.sh
AvendeMacBook-Pro:pygame_sdl2-master aven$ 
AvendeMacBook-Pro:pygame_sdl2-master aven$ git clone https://github.com/renpy/pygame_sdl2
fatal: destination path 'pygame_sdl2' already exists and is not an empty directory.
AvendeMacBook-Pro:pygame_sdl2-master aven$ ls
COPYING.LGPL21      gen         run_pygame_test.py
COPYING.ZLIB        gen3            scripts
MANIFEST.in     include         sdl2.c
README.rst      lib         setup.py
__pycache__     old-tests       setuplib.py
bin         pip-selfcheck.json  setuplib.pyc
build           pygame_sdl2     src
docs            pygame_sdl2.egg-info    test
fix_virtualenv.py   run.sh
AvendeMacBook-Pro:pygame_sdl2-master aven$ cd ..
AvendeMacBook-Pro:.Trash aven$ cd..
-bash: cd..: command not found
AvendeMacBook-Pro:.Trash aven$ cd ..
AvendeMacBook-Pro:~ aven$ cd pygame_sdl2
-bash: cd: pygame_sdl2: No such file or directory
AvendeMacBook-Pro:~ aven$ which git
/usr/bin/git
AvendeMacBook-Pro:~ aven$ git init help
Initialized empty Git repository in /Users/aven/help/.git/
AvendeMacBook-Pro:~ aven$ git init
Initialized empty Git repository in /Users/aven/.git/
AvendeMacBook-Pro:~ aven$ git clone https://github.com/renpy/pygame_sdl2
Cloning into 'pygame_sdl2'...
remote: Counting objects: 2022, done.
remote: Total 2022 (delta 1), reused 1 (delta 1), pack-reused 2020
Receiving objects: 100% (2022/2022), 1.24 MiB | 933.00 KiB/s, done.
Resolving deltas: 100% (1253/1253), done.
AvendeMacBook-Pro:~ aven$ mkvirtualenv pygame_sdl2
Using base prefix '/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/aven/.virtualenvs/pygame_sdl2/bin/python3.6
Not overwriting existing python script /Users/aven/.virtualenvs/pygame_sdl2/bin/python (you must use /Users/aven/.virtualenvs/pygame_sdl2/bin/python3.6)
Installing setuptools, pip, wheel...done.
/usr/bin/python: No module named virtualenvwrapper
AvendeMacBook-Pro:~ aven$ mkvirtualenv /users/aven/pygame_sdl2
Using base prefix '/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6'
New python executable in /users/aven/pygame_sdl2/bin/python3.6
Also creating executable in /users/aven/pygame_sdl2/bin/python
Installing setuptools, pip, wheel...done.
AvendeMacBook-Pro:~ aven$ cd pygame_sdl2
AvendeMacBook-Pro:pygame_sdl2 aven$ ./bin/pip3 install cython
Collecting cython
  Using cached Cython-0.27.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: cython
Successfully installed cython-0.27.3
AvendeMacBook-Pro:pygame_sdl2 aven$ ./bin/python fix_virtualenv.py
AvendeMacBook-Pro:pygame_sdl2 aven$ ./bin/python setup.py install
pygame_sdl2.error is out of date.
pygame_sdl2.color is out of date.
pygame_sdl2.controller is out of date.
pygame_sdl2.rect is out of date.
pygame_sdl2.rwobject is out of date.
pygame_sdl2.surface is out of date.
pygame_sdl2.display is out of date.
pygame_sdl2.event is out of date.
pygame_sdl2.locals is out of date.
pygame_sdl2.key is out of date.
pygame_sdl2.mouse is out of date.
pygame_sdl2.joystick is out of date.
pygame_sdl2.power is out of date.
pygame_sdl2.pygame_time is out of date.
pygame_sdl2.image is out of date.
pygame_sdl2.transform is out of date.
pygame_sdl2.gfxdraw is out of date.
pygame_sdl2.draw is out of date.
pygame_sdl2.font is out of date.
pygame_sdl2.mixer is out of date.
pygame_sdl2.mixer_music is out of date.
warning: src/pygame_sdl2/mixer_music.pyx:58:0: Overriding cdef method with def method.
pygame_sdl2.scrap is out of date.
pygame_sdl2.render is out of date.
running install
running bdist_egg
running egg_info
creating pygame_sdl2.egg-info
writing pygame_sdl2.egg-info/PKG-INFO
writing dependency_links to pygame_sdl2.egg-info/dependency_links.txt
writing top-level names to pygame_sdl2.egg-info/top_level.txt
writing manifest file 'pygame_sdl2.egg-info/SOURCES.txt'
reading manifest file 'pygame_sdl2.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'gen/*.c'
writing manifest file 'pygame_sdl2.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.12-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.12-x86_64-3.6
creating build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/compat.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
creating build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/threads
copying src/pygame_sdl2/threads/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/threads
copying src/pygame_sdl2/threads/Py25Queue.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/threads
copying src/pygame_sdl2/sprite.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/sysfont.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/time.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/version.py -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/DejaVuSans.ttf -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
copying src/pygame_sdl2/DejaVuSans.txt -> build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2
running build_ext
building 'pygame_sdl2.error' extension
creating build/temp.macosx-10.12-x86_64-3.6
creating build/temp.macosx-10.12-x86_64-3.6/gen3
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.error.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.error.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.error.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/error.cpython-36m-darwin.so
building 'pygame_sdl2.color' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.color.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.color.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.color.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/color.cpython-36m-darwin.so
building 'pygame_sdl2.controller' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.controller.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.controller.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.controller.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/controller.cpython-36m-darwin.so
building 'pygame_sdl2.rect' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.rect.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.rect.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.rect.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/rect.cpython-36m-darwin.so
building 'pygame_sdl2.rwobject' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.rwobject.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.rwobject.o -D_THREAD_SAFE
gen3/pygame_sdl2.rwobject.c:3012:49: warning: comparison of integers of
      different signs: 'unsigned long' and 'Sint64' (aka 'long long')
      [-Wsign-compare]
  __pyx_t_1 = (((__pyx_v_size * __pyx_v_maxnum) > __pyx_v_left) != 0);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^ ~~~~~~~~~~~~
1 warning generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.rwobject.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/rwobject.cpython-36m-darwin.so
building 'pygame_sdl2.surface' extension
creating build/temp.macosx-10.12-x86_64-3.6/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.surface.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.surface.o -D_THREAD_SAFE
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/alphablit.c -o build/temp.macosx-10.12-x86_64-3.6/src/alphablit.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.surface.o build/temp.macosx-10.12-x86_64-3.6/src/alphablit.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/surface.cpython-36m-darwin.so
building 'pygame_sdl2.display' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.display.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.display.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.display.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/display.cpython-36m-darwin.so
building 'pygame_sdl2.event' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.event.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.event.o -D_THREAD_SAFE
gen3/pygame_sdl2.event.c:5863:33: warning: comparison of integers of different
      signs: 'Uint32' (aka 'unsigned int') and 'int' [-Wsign-compare]
  ...= ((__pyx_v_e->type == __pyx_v_11pygame_sdl2_5event_POSTEDEVENT) != 0);
         ~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gen3/pygame_sdl2.event.c:3972:18: warning: unused function
      '__pyx_f_11pygame_sdl2_5event_make_mousewheel_event_sdl2'
      [-Wunused-function]
static PyObject *__pyx_f_11pygame_sdl2_5event_make_mousewheel_event_sdl2...
                 ^
2 warnings generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.event.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/event.cpython-36m-darwin.so
building 'pygame_sdl2.locals' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.locals.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.locals.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.locals.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/locals.cpython-36m-darwin.so
building 'pygame_sdl2.key' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.key.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.key.o -D_THREAD_SAFE
gen3/pygame_sdl2.key.c:1445:17: warning: assigning to 'uint8_t *'
      (aka 'unsigned char *') from 'const Uint8 *' (aka 'const unsigned char *')
      discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  __pyx_v_state = SDL_GetKeyboardState((&__pyx_v_self->numkeys));
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.key.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/key.cpython-36m-darwin.so
building 'pygame_sdl2.mouse' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.mouse.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.mouse.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.mouse.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/mouse.cpython-36m-darwin.so
building 'pygame_sdl2.joystick' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.joystick.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.joystick.o -D_THREAD_SAFE
gen3/pygame_sdl2.joystick.c:2039:14: warning: assigning to 'char *' from
      'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  __pyx_v_rv = SDL_JoystickName(__pyx_v_self->joystick);
             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.joystick.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/joystick.cpython-36m-darwin.so
building 'pygame_sdl2.power' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.power.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.power.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.power.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/power.cpython-36m-darwin.so
building 'pygame_sdl2.pygame_time' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.pygame_time.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.pygame_time.o -D_THREAD_SAFE
gen3/pygame_sdl2.pygame_time.c:2047:122: warning: cast to 'void *' from smaller
      integer type 'int' [-Wint-to-void-pointer-cast]
  ...((void *)((int)__pyx_t_2)));
      ^
1 warning generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.pygame_time.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/pygame_time.cpython-36m-darwin.so
building 'pygame_sdl2.image' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.image.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.image.o -D_THREAD_SAFE
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/write_jpeg.c -o build/temp.macosx-10.12-x86_64-3.6/src/write_jpeg.o -D_THREAD_SAFE
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/write_png.c -o build/temp.macosx-10.12-x86_64-3.6/src/write_png.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.image.o build/temp.macosx-10.12-x86_64-3.6/src/write_jpeg.o build/temp.macosx-10.12-x86_64-3.6/src/write_png.o -L/usr/local/lib -lSDL2_image -ljpeg -lpng -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/image.cpython-36m-darwin.so
building 'pygame_sdl2.transform' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.transform.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.transform.o -D_THREAD_SAFE
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/SDL2_rotozoom.c -o build/temp.macosx-10.12-x86_64-3.6/src/SDL2_rotozoom.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.transform.o build/temp.macosx-10.12-x86_64-3.6/src/SDL2_rotozoom.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/transform.cpython-36m-darwin.so
building 'pygame_sdl2.gfxdraw' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.gfxdraw.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.gfxdraw.o -D_THREAD_SAFE
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/SDL_gfxPrimitives.c -o build/temp.macosx-10.12-x86_64-3.6/src/SDL_gfxPrimitives.o -D_THREAD_SAFE
src/SDL_gfxPrimitives.c:6529:25: warning: passing 'Uint16 [4]' to parameter of
      type 'const Sint16 *' (aka 'const short *') converts between pointers to
      integer types with different sign [-Wpointer-sign]
                        polygonColor(m->dst, px, py, 4, m->color);
                                             ^~
src/SDL_gfxPrimitives.c:4917:52: note: passing argument to parameter 'vx' here
int polygonColor(SDL_Surface * dst, const Sint16 * vx, const Sint16 * vy...
                                                   ^
src/SDL_gfxPrimitives.c:6529:29: warning: passing 'Uint16 [4]' to parameter of
      type 'const Sint16 *' (aka 'const short *') converts between pointers to
      integer types with different sign [-Wpointer-sign]
                        polygonColor(m->dst, px, py, 4, m->color);
                                                 ^~
src/SDL_gfxPrimitives.c:4917:71: note: passing argument to parameter 'vy' here
  ...* dst, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color)
                                              ^
2 warnings generated.
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.gfxdraw.o build/temp.macosx-10.12-x86_64-3.6/src/SDL_gfxPrimitives.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/gfxdraw.cpython-36m-darwin.so
building 'pygame_sdl2.draw' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.draw.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.draw.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.draw.o -L/usr/local/lib -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/draw.cpython-36m-darwin.so
building 'pygame_sdl2.font' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.font.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.font.o -D_THREAD_SAFE
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.font.o -L/usr/local/lib -lSDL2_ttf -lSDL2 -o build/lib.macosx-10.12-x86_64-3.6/pygame_sdl2/font.cpython-36m-darwin.so
building 'pygame_sdl2.mixer' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -Isrc -I/usr/local/include/SDL2 -I/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c gen3/pygame_sdl2.mixer.c -o build/temp.macosx-10.12-x86_64-3.6/gen3/pygame_sdl2.mixer.o -D_THREAD_SAFE
gen3/pygame_sdl2.mixer.c:2392:46: error: use of undeclared identifier
      'MIX_INIT_MODPLUG'; did you mean 'MIX_INIT_MOD'?
  __pyx_t_3 = __Pyx_PyInt_From_MIX_InitFlags(MIX_INIT_MODPLUG); if (unli...
                                             ^~~~~~~~~~~~~~~~
                                             MIX_INIT_MOD
/usr/local/include/SDL2/SDL_mixer.h:80:5: note: 'MIX_INIT_MOD' declared here
    MIX_INIT_MOD    = 0x00000002,
    ^
gen3/pygame_sdl2.mixer.c:2406:46: error: use of undeclared identifier
      'MIX_INIT_FLUIDSYNTH'
  __pyx_t_8 = __Pyx_PyInt_From_MIX_InitFlags(MIX_INIT_FLUIDSYNTH); if (u...
                                             ^
2 errors generated.
error: command 'clang' failed with exit status 1

我想知道pygame_sdl2是否不支持最新的python和macOS系统。 有人遇到这个错误吗?

找到gen3 / pygame_sdl2.mixer.c并用MIX_INIT_MID执行MIX_INIT_FLUIDSYNTH的替换(我使用了上面引用的更改),并删除名称中包含MODPLUG的所有常量,这导致安装成功。 没有任何保证可以破坏任何东西,但是MODPLUG在更改中似乎已被弃用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM