Skip to content

Conversation

@Rainyan
Copy link
Collaborator

@Rainyan Rainyan commented Jul 7, 2025

Description

Fix an erroneous path in the README documentation for building using the Sniper runtime container.

By installing Docker and all the dependencies using a clean Pop!_OS 22.04 LTS Linux distro, and then following the neo README build instructions for Docker, the CMake setup fails at the cmake --preset linux-debug command.

I'm assuming this is because our docs instruct to mount the container into neo/src. But doing so, the relative (unmounted) neo/game content will only contain whatever data got pulled from neoAssets repo by the CMakeLists, and not the game assets still found in the main repo's neo/game dir.

I've modified the instructions to instead mount to the base repo folder, such that from neo/src, a relative ../game in the CMake file will reach the code repo neo/game files, even inside the container. I only tested this with Docker, but I assume the same logic would apply for the other container tools listed (Podman, Toolbx), so I edited their paths the same way in the docs.

(An alternative solution might be to move all (build-pertinent) data like GameMenu.res.in to neoAssets? So that we didn't need to mount the fluff in the repo root dir inside the build container just for the sake of the src/../game relative path traversal.)

I also removed the explicit /neo suffix from the PATH_TO_REPO placeholder value in the docs, because it already is a part the repo path (and repos can be renamed when forking, so the /neo suffix may be inaccurate for users who renamed their repo fork to something else.

The CMake error looks like this (unrelevant lines omitted):

# Also tried with absolute pwd path for the mount volume instead of . but no difference
dev@pop-os:~/code/neo/src$ sudo docker run -v .:/root/neo/src --rm -it --entrypoint /bin/bash registry.gitlab.steamos.cloud/steamrt/sniper/sdk

(steamrt sniper 3.0.20250519.130773)root@7a5601b7ac38:/> cd /root/neo/src
(steamrt sniper 3.0.20250519.130773)root@7a5601b7ac38:~/neo/src> cmake --preset linux-debug

CMake Error: File /root/neo/game/neo/resource/GameMenu.res.in does not exist.
CMake Error at cmake/build_info.cmake:27 (configure_file):
  configure_file Problem configuring file

The offending lines being:

configure_file(
${CMAKE_SOURCE_DIR}/../game/neo/resource/GameMenu.res.in

Probably because:

(steamrt sniper 3.0.20250519.130773)root@7a5601b7ac38:~/neo/src> ls ../game/neo/resource/
KillfeedIcons.sfd  KillfeedIcons.ttf

Note the absense of GameMenu.res.in in the ls printout. Whereas the KillfeedIcons have indeed been correctly pulled from neoAssets/neo/resource, into the otherwise nonexistant folder.


Here's a more detailed fail output:

dev@pop-os:~/code$ pwd
/home/dev/code

dev@pop-os:~/code$ git clone https://github.com/NeotokyoRebuild/neo
Cloning into 'neo'...
remote: Enumerating objects: 23988, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 23988 (delta 7), reused 8 (delta 3), pack-reused 23958 (from 1)
Receiving objects: 100% (23988/23988), 190.71 MiB | 13.37 MiB/s, done.
Resolving deltas: 100% (13755/13755), done.

dev@pop-os:~/code$ cd neo/src
dev@pop-os:~/code/neo/src$ sudo docker run -v .:/root/neo/src --rm -it --entrypoint /bin/bash registry.gitlab.steamos.cloud/steamrt/sniper/sdk

(steamrt sniper 3.0.20250519.130773)root@7a5601b7ac38:/> cd /root/neo/src
(steamrt sniper 3.0.20250519.130773)root@7a5601b7ac38:~/neo/src> cmake --preset linux-debug
Preset CMake variables:

  CMAKE_BUILD_TYPE="Debug"
  CMAKE_CXX_COMPILER="g++"
  CMAKE_C_COMPILER="gcc"

-- The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_VERSION: 3.25.1
-- TIMESTAMP: 2025-07-06T21:41:23Z
-- 64-bit build
-- Found Git: /usr/bin/git (found version "2.30.2") 

CMake Error: File /root/neo/game/neo/resource/GameMenu.res.in does not exist.
CMake Error at cmake/build_info.cmake:27 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:19 (include)

# (unrelevant neoAssets successful download info lines omitted here)

-- Configuring incomplete, errors occurred!
See also "/root/neo/src/build/linux-debug/CMakeFiles/CMakeOutput.log".

Toolchain

  • Linux GCC 10 Sniper 3.0

Rainyan added 2 commits July 7, 2025 01:11
* Formatting
* Add note about Docker transitive dependencies
If we mounted the container into "neo/src", then the relative "neo/game" will only contain the stuff pulled from neoAssets, and not the game assets from the main neo repo.

Instead, mount to the base repo folder such that from "src", a "../game" will reach the "neo/game" files even inside the container.

Also remove the explicit "/neo" from the /PATH_TO_REPO/ placeholder value, because it's a part of it (and repos can be renamed when forking, so the "/neo" suffix may be inaccurate for users who renamed their repo fork to something else.

This fixes a bug with `cmake --preset` commands failing with:
```
CMake Error: File /root/neo/game/neo/resource/GameMenu.res.in does not exist.
CMake Error at cmake/build_info.cmake:27 (configure_file):
  configure_file Problem configuring file
```
@Rainyan
Copy link
Collaborator Author

Rainyan commented Jul 7, 2025

Also probably worthwhile to figure out why our CI (which uses Docker with Sniper) was not failing with this problem.

@Rainyan Rainyan added the Documentation Improvements or additions to documentation label Jul 7, 2025
@Rainyan Rainyan requested a review from a team July 7, 2025 01:17
@Rainyan Rainyan added the Build System CMake and other build-related stuff label Jul 7, 2025
@Rainyan Rainyan requested a review from a team July 10, 2025 22:54
@Rainyan Rainyan merged commit 0b5023e into NeotokyoRebuild:master Jul 15, 2025
7 checks passed
@Rainyan Rainyan deleted the docs/containers branch July 15, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build System CMake and other build-related stuff Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants