etternagame / etterna

Advanced cross-platform rhythm game focused on keyboard play
https://etternaonline.com/
MIT License
474 stars 132 forks source link

[Build Issue]: Missing python 2 dependency on Steam Deck #1265

Closed felleg closed 10 months ago

felleg commented 11 months ago

Have you read through the build instructions before reading this?

What operating system are you seeing the problem on?

Linux (any distro)

Describe the build issue

When running cmake -G "Unix Makefiles", the error is

-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "/usr/bin/python"

Relevant log output

[...]
Processor: x86_64
Enabling x86 SIMD support.
-- Version: 7.0.3
-- Build type: RelWithDebInfo
-- CXX_STANDARD: 20
-- Required features: cxx_variadic_templates
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
    Reason given by package: 
        Interpreter: Wrong major version for the interpreter "/usr/bin/python"

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindX11.cmake:481 (find_package_handle_standard_args)
  CMake/Helpers/CMakeLinux.cmake:12 (find_package)
  CMakeLists.txt:122 (include)

-- Configuring incomplete, errors occurred!
See also "/home/deck/etterna/CMakeFiles/CMakeOutput.log".
See also "/home/deck/etterna/CMakeFiles/CMakeError.log".


### Anything else?

CMakeErrors: https://pastebin.com/HNd7XwNt

CMakeOutput: https://pastebin.com/2SfQ3SVB
nico-abram commented 11 months ago

@felleg try adding -DWITH_CRASHPAD=OFF to your cmake invocation (I suggest you clear the cmake folder first to avoid cache issues). If I'm not mistaken python 2 is only needed for gn which is the build system used to build crashpad

felleg commented 11 months ago

Hi @nico-abram , thanks for the quick turnaround! My "new" error is the following:

-- Required features: cxx_variadic_templates
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindX11.cmake:481 (find_package_handle_standard_args)
  CMake/Helpers/CMakeLinux.cmake:12 (find_package)
  CMakeLists.txt:122 (include)
poco0317 commented 11 months ago

sudo pacman -S libx11 would typically resolve this but i am seeing evidence that steam has done something that wont let that work as it should

nico-abram commented 11 months ago

From this reddit thread https://www.reddit.com/r/SteamDeck/comments/11m1j9m/problem_with_cmake_when_building_melonds_from/ it seems valve stripped header files for the steam deck libx11 package

felleg commented 10 months ago

Still an issue :'(

poco0317 commented 10 months ago

is there a particular reason you need to build the game on steam deck instead of using the prebuilt linux binary? steam deck seems like it wont allow building the game simply because of the x11-dev dependency

jameskr97 commented 10 months ago

@felleg Please keep in mind, that the steam deck wasn't built to compile code. In order to do build applications, you would have to set your sudo password, download the arch linux repo gpg keys (as the device does not have the by default), and remount the filesystem as read-write, as using pacman won't work to install some packages with it's by-default read-only filesystem. Steam themselves even instructs their developers to use mini-pc's to develop and test their games for steam decks.

Bearing that in mind, the following may help you in your journey to compile Etterna on the steam deck (assuming your sudo password is set):

# Essential to be able to install packages without issue on the steam deck.
sudo pacman-key --init
sudo pacman-key --populate archlinux

# This may fail if you certain directories of your file system are mounted read only.
sudo pacman -S libx11 

I have a Steam Deck, and I tested our linux binary, it works without issue. I would recommended using that for building on the steam deck.

The problem here is not with our build script, but with the platform being used to build the application. @poco0317 I will leave it open in-case you would like to review it more, but I would consider this issue closed.

poco0317 commented 10 months ago

i did not know but i did assume the game was likely functional on steam deck if you figured out how to run it. i think some people would be interested to see a picture of gameplay

jameskr97 commented 10 months ago

Note that I didn't have to "figure out" how to run it on the steam deck. It was as easy you would expect. Download tar.gz, extract Etterna folder, run binary.

As requested: Screenshot_20230808_202747 Screenshot_20230808_202813

poco0317 commented 10 months ago

neat

felleg commented 10 months ago

I confirm that downloading the *.tar.gz just works. My apologies for unnecessarily going into this rabbit hole, and thank you for taking the time to show me the proper way of getting the game to run.