SFTtech / SFTtech/openage

Cythonize error when building with nyan

Open
#1,769 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: buildsystem bug lang: cython
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

   13  ./configure --download-nyan
   14  make
   15  make clean
   16  pip3 install cython --break-system-packages
   17  sudo pip3 install cython --break-system-packages
   18  sudo apt install python3-setuptools python3-distutils
   19  pip3 install --user setuptools
   20  sudo apt install python3-stdlib
   21  make
   22  history | tail

When I am building openage in ubuntu 24.10 laptop, the following error message shows up.

urbaner@urbaner-framwork:~/openage$ make cythonize 
make --no-print-directory -C bin cythonize
[  0%] cythonize.py: compiling .pyx files to .cpp
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/urbaner/openage/buildsystem/cythonize.py", line 238, in <module>
    main()
  File "/home/urbaner/openage/buildsystem/cythonize.py", line 210, in main
    cythonize_wrapper(modules, args.force_optimized_lib, **cythonize_args)
  File "/home/urbaner/openage/buildsystem/cythonize.py", line 90, in cythonize_wrapper
    cythonize(src_modules, **kwargs)
  File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", line 1010, in cythonize
    module_list, module_metadata = create_extension_list(
                                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/Cython/Build/Dependencies.py", line 784, in create_extension_list
    from distutils.extension import Extension
ModuleNotFoundError: No module named 'distutils'
make[4]: *** [CMakeFiles/cythonize.dir/build.make:120:py/cythonize_timefile] 錯誤 1
make[3]: *** [CMakeFiles/Makefile2:3523:CMakeFiles/cythonize.dir/all] 錯誤 2
make[2]: *** [CMakeFiles/Makefile2:3529:CMakeFiles/cythonize.dir/rule] 錯誤 2
make[1]: *** [Makefile:602:cythonize] 錯誤 2
make: *** [Makefile:64:cythonize] 錯誤 2
## 錯誤 is error is Chinese.

I tried to install cython with pip for 22.04 distribution has older version.
It's a minor bug on building, and I failed at 86% of finish, almost there.
Any missing info, I'm open to guys, good luck to all issues solving.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with buildsystem/cythonize.py, especially the cythonize_wrapper path shown in the traceback, and reproduce the failure with make cythonize on the reported Ubuntu 24.10 setup. Check the build's Python and Cython dependency handling around the missing distutils import. Done means cythonize completes without ModuleNotFoundError on that setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.