Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails "cc1: fatal error: src_c/pypm.c: No such file or directory" #4086

Open
jgf-osu opened this issue Nov 8, 2023 · 4 comments · May be fixed by #4126
Open

Build fails "cc1: fatal error: src_c/pypm.c: No such file or directory" #4086

jgf-osu opened this issue Nov 8, 2023 · 4 comments · May be fixed by #4126

Comments

@jgf-osu
Copy link

jgf-osu commented Nov 8, 2023

Environment:

  • Linux Mint 21 (Cinnamon)
  • Python 3.10.12
  • PyGame: just forked and cloned main branch of git repo

Report:

I followed the procedure under PYGAME 2 here. No problems with apt installing the dependencies. The command setup.py -config -auto produced this, which looks OK to me:

Skipping Cython compilation


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


Hunting dependencies...
SDL     : found 2.0.20
FONT    : found
IMAGE   : found
MIXER   : found
PNG     : found
JPEG    : found
SCRAP   : found
PORTMIDI: found
PORTTIME: found
FREETYPE: found 24.1.18

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

However, setup.py install --user fails:

Skipping Cython compilation
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: -VERSION- is an invalid version and will not be supported in a future release
  warnings.warn(
running bdist_egg
running egg_info
creating pygame.egg-info
writing pygame.egg-info/PKG-INFO
writing dependency_links to pygame.egg-info/dependency_links.txt
writing entry points to pygame.egg-info/entry_points.txt
writing top-level names to pygame.egg-info/top_level.txt
writing manifest file 'pygame.egg-info/SOURCES.txt'
package init file 'docs/__init__.py' not found (or not a regular file)
reading manifest file 'pygame.egg-info/SOURCES.txt'
writing manifest file 'pygame.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/pygame
copying src_py/_camera_opencv.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/sndarray.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/cursors.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/sprite.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/ftfont.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/fastevent.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/freetype.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/__init__.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/locals.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/midi.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/colordict.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/camera.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/pkgdata.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/version.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/surfarray.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/draw_py.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/macosx.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/sysfont.py -> build/lib.linux-x86_64-3.10/pygame
copying src_py/_camera_vidcapture.py -> build/lib.linux-x86_64-3.10/pygame
creating build/lib.linux-x86_64-3.10/pygame/threads
copying src_py/threads/__init__.py -> build/lib.linux-x86_64-3.10/pygame/threads
creating build/lib.linux-x86_64-3.10/pygame/_sdl2
copying src_py/_sdl2/__init__.py -> build/lib.linux-x86_64-3.10/pygame/_sdl2
creating build/lib.linux-x86_64-3.10/pygame/tests
copying test/surfarray_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mouse_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/key_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/math_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/imageext_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/rwobject_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/color_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/rect_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/scrap_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/controller_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/font_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/pixelcopy_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/event_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/display_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/scrap_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/threads_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/base_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mixer_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/__main__.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/image__save_gl_surface_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/imageext_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/constants_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/ftfont_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/cursors_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/transform_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/locals_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/image_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/version_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/video_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/camera_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/midi_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/surface_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/pixelarray_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/time_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/blit_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/sprite_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/bufferproxy_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/freetype_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mixer_music_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/ftfont_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/surfarray_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mask_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mixer_music_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/mixer_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/joystick_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/freetype_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/draw_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/touch_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/image_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/sysfont_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/gfxdraw_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/sndarray_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/sndarray_tags.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/surflock_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
copying test/docs_test.py -> build/lib.linux-x86_64-3.10/pygame/tests
creating build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/arrinter.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/test_runner.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/async_sub.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/test_machinery.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/png.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/run_tests.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/endian.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
copying test/test_utils/buftools.py -> build/lib.linux-x86_64-3.10/pygame/tests/test_utils
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests
copying test/run_tests__tests/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests
copying test/run_tests__tests/run_tests__test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_6_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_4_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/no_assertions__ret_code_of_1__test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/fake_5_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
copying test/run_tests__tests/all_ok/zero_tests_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/all_ok
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/failures1
copying test/run_tests__tests/failures1/fake_4_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/failures1
copying test/run_tests__tests/failures1/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/failures1
copying test/run_tests__tests/failures1/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/failures1
copying test/run_tests__tests/failures1/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/failures1
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete
copying test/run_tests__tests/incomplete/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete
copying test/run_tests__tests/incomplete/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete
copying test/run_tests__tests/incomplete/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/infinite_loop
copying test/run_tests__tests/infinite_loop/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/infinite_loop
copying test/run_tests__tests/infinite_loop/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/infinite_loop
copying test/run_tests__tests/infinite_loop/fake_1_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/infinite_loop
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stderr
copying test/run_tests__tests/print_stderr/fake_4_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stderr
copying test/run_tests__tests/print_stderr/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stderr
copying test/run_tests__tests/print_stderr/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stderr
copying test/run_tests__tests/print_stderr/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stderr
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_4_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stdout
copying test/run_tests__tests/print_stdout/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/print_stdout
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/fake_3_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete_todo
copying test/run_tests__tests/incomplete_todo/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/incomplete_todo
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/invisible_tag_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/exclude
copying test/run_tests__tests/exclude/magic_tag_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/exclude
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/sleep_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/timeout
copying test/run_tests__tests/timeout/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/timeout
creating build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/sleep_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/fake_2_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/__init__.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/magic_tag_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
copying test/run_tests__tests/everything/incomplete_todo_test.py -> build/lib.linux-x86_64-3.10/pygame/tests/run_tests__tests/everything
creating build/lib.linux-x86_64-3.10/pygame/docs
copying docs/__main__.py -> build/lib.linux-x86_64-3.10/pygame/docs
creating build/lib.linux-x86_64-3.10/pygame/examples
copying examples/testsprite.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/vgrade.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/setmodescale.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/aliens.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/font_viewer.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/cursors.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/aacircle.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/chimp.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/freetype_misc.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/resizing_new.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/playmus.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/go_over_there.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/video.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/dropevent.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/textinput.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/__init__.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/liquid.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/moveit.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/mask.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/midi.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/blend_fill.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/sound_array_demos.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/grid.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/fonty.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/headless_no_windows_needed.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/camera.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/sprite_texture.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/glcube.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/scaletest.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/scroll.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/scrap_clipboard.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/sound.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/joystick.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/stars.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/blit_blends.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/arraydemo.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/audiocapture.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/eventlist.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/pixelarray.py -> build/lib.linux-x86_64-3.10/pygame/examples
copying examples/music_drop_fade.py -> build/lib.linux-x86_64-3.10/pygame/examples
creating build/lib.linux-x86_64-3.10/pygame/__pyinstaller
copying src_py/__pyinstaller/__init__.py -> build/lib.linux-x86_64-3.10/pygame/__pyinstaller
copying src_py/__pyinstaller/hook-pygame.py -> build/lib.linux-x86_64-3.10/pygame/__pyinstaller
running build_ext
building 'pygame.imageext' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/src_c
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include/SDL2 -I/usr/include -I/usr/include -I/usr/include/python3.10 -c src_c/imageext.c -o build/temp.linux-x86_64-3.10/src_c/imageext.o -Wall -Wno-error=unknown-pragmas
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/src_c/imageext.o -lSDL2 -lSDL2_image -lpng -ljpeg -o build/lib.linux-x86_64-3.10/pygame/imageext.cpython-310-x86_64-linux-gnu.so
building 'pygame.font' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include/SDL2 -I/usr/include/python3.10 -c src_c/font.c -o build/temp.linux-x86_64-3.10/src_c/font.o -Wall -Wno-error=unknown-pragmas
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/src_c/font.o -lSDL2 -lSDL2_ttf -o build/lib.linux-x86_64-3.10/pygame/font.cpython-310-x86_64-linux-gnu.so
building 'pygame.mixer' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include/SDL2 -I/usr/include/python3.10 -c src_c/mixer.c -o build/temp.linux-x86_64-3.10/src_c/mixer.o -Wall -Wno-error=unknown-pragmas
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/src_c/mixer.o -lSDL2 -lSDL2_mixer -o build/lib.linux-x86_64-3.10/pygame/mixer.cpython-310-x86_64-linux-gnu.so
building 'pygame.mixer_music' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include/SDL2 -I/usr/include/python3.10 -c src_c/music.c -o build/temp.linux-x86_64-3.10/src_c/music.o -Wall -Wno-error=unknown-pragmas
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/src_c/music.o -lSDL2 -lSDL2_mixer -o build/lib.linux-x86_64-3.10/pygame/mixer_music.cpython-310-x86_64-linux-gnu.so
building 'pygame.scrap' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include/python3.10 -c src_c/scrap.c -o build/temp.linux-x86_64-3.10/src_c/scrap.o -Wall -Wno-error=unknown-pragmas
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/src_c/scrap.o -lSDL2 -lX11 -o build/lib.linux-x86_64-3.10/pygame/scrap.cpython-310-x86_64-linux-gnu.so
building 'pygame.pypm' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -I/usr/X11R6/include -I/usr/include/SDL2 -I/usr/include -I/usr/include -I/usr/include/python3.10 -c src_c/pypm.c -o build/temp.linux-x86_64-3.10/src_c/pypm.o -Wall -Wno-error=unknown-pragmas
cc1: fatal error: src_c/pypm.c: No such file or directory
compilation terminated.

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

error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
@jgf-osu jgf-osu added the bug label Nov 8, 2023
@0xnedarjercon
Copy link

pypm is cython generated but its skipping cython compilation so the file isn't there, running this command first: python3 setup.py build_ext --inplace fixed it for me

@jgf-osu
Copy link
Author

jgf-osu commented Nov 29, 2023

@0xnedarjercon , you're right, that fixes it. Here are the relevant lines (225-233) in setup.py:

# If there is no generated C code, compile the cython/.pyx files
if any(x in ["build_ext", "build", "sdist", "bdist_wheel"] for x in sys.argv) and (
    not glob.glob(os.path.join("src_c", "_sdl2", "audio.c"))
    or not glob.glob(os.path.join("src_c", "pypm.c"))
):
    compile_cython = True
    print ("Compiling Cython files")
else:
    print ("Skipping Cython compilation")

I wonder if the documentation should say to run setup.py build install --user (which seems to work for me in one line) instead of setup.py install --user.

@jgf-osu
Copy link
Author

jgf-osu commented Dec 6, 2023

I was going to update the documentation myself and close out this ticket, but it seems that pygame.org registration is not working. I click the "New members signup" link which takes me to a registration form here:

https://www.pygame.org/register

When I fill in that form, it doesn't submit as far as I can tell. The email field is highlighted and this error message is displayed:

Spam check... Registration by invite only.

No information is provided as to how one might request an invite.

@jgf-osu jgf-osu linked a pull request Dec 13, 2023 that will close this issue
@illume
Copy link
Member

illume commented Dec 17, 2023

This is a bug. It should still work with the previous instructions, however a while ago I made it compile the Cython files rather than check in the .c files.

The bug? setup.py install --user should compile the Cython files if they aren't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants