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

Compiler dosent see the Python interpreter #1586

Open
Zemogiter opened this issue Jun 18, 2023 · 3 comments · Fixed by colobot/colobot-data#88
Open

Compiler dosent see the Python interpreter #1586

Zemogiter opened this issue Jun 18, 2023 · 3 comments · Fixed by colobot/colobot-data#88

Comments

@Zemogiter
Copy link

Zemogiter commented Jun 18, 2023

Output from the cmake gui:

Building Colobot "Gold" (0.2.0+alpha-git-dev~r4f085406)
Build for Linux system
Detected GCC version 4.7+
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (SDL2main)
  does not match the name of the calling package (SDL2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindSDL2.cmake:318 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:312 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (SDL2main)
  does not match the name of the calling package (SDL2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindSDL2.cmake:318 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/FindSDL2_image.cmake:114 (find_package)
  CMakeLists.txt:313 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (SDL2main)
  does not match the name of the calling package (SDL2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/FindSDL2.cmake:318 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/FindSDL2_ttf.cmake:114 (find_package)
  CMakeLists.txt:314 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at desktop/CMakeLists.txt:8 (message):
  rsvg-convert not found; desktop icons will not be generated


Data directory will install itself.
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at
  least version "2.7")
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindPythonInterp.cmake:169 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  data/CMakeLists.txt:6 (find_package)


Configuring incomplete, errors occurred!
See also "/home/jonasz/sources/colobot-dev/build/CMakeFiles/CMakeOutput.log".

All rependencies are installed.
CMakeOutput.log

@tomangelo2
Copy link
Member

What distro do you have?

@Zemogiter
Copy link
Author

Ubuntu 22.04.2 LTS
Linux 5.19.0-45-generic

@hexagonrecursion
Copy link
Contributor

A workaround (if you do not need the translations)

run cmake -D TRANSLATIONS=OFF instead of cmake before calling make. Alternatively: in the cmake gui there should be an option to "Enable translations of help and level files" - disable it.

The issue

The CMakeLists.txt in the ./data/ folder wants python2 to compile the translations.
https://github.com/colobot/colobot-data/blob/740d40eba624ad755b08fc74b60c721b5f04bc10/CMakeLists.txt#L6

find_package(PythonInterp 2.7 REQUIRED)

Python2 is unsupported since 2020: https://pythonclock.org/

We should migrate to python3. The longer we wait the more people will be unable to build colobot due to missing python2.

@tomangelo2 tomangelo2 linked a pull request Dec 17, 2023 that will close this issue
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