[GH-ISSUE #3822] [Other] setup/update prefers outdated system CMake over virtualenv CMake #1617

Closed
opened 2026-11-04 01:52:39 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @sato33 on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3822

Problem

On Ubuntu 22.04, ./update.sh selects /usr/bin/cmake (3.22.1), even when a newer CMake is installed in Strata's own .venv.

This causes the engine rebuild to fail because CMakeLists.txt requires CMake 3.24 or newer.

Actual output

The engine's source changed: compiling it again ...
> /usr/bin/cmake -G Ninja -DCMAKE_MAKE_PROGRAM=.../.venv/bin/ninja ...

CMake 3.24 or higher is required.
You are running version 3.22.1.

[X] command failed (exit 1): cmake
[!] could not compile the updated engine: starting the installed one
[ok] Strata is updated (engine 0.1.44.1)

Environment: Ubuntu 22.04, RTX 4090, CUDA 13.4, existing locally compiled engine.

Root cause

setup.sh correctly executes .venv/bin/python setup.py.

However, setup.py's find_tool() calls shutil.which(name) before looking beside sys.executable. It only checks whether cmake --version exits successfully, not whether the CMake version meets the minimum requirement.

Consequently, an outdated but working system CMake takes precedence over the virtualenv's CMake.

Expected behavior

  1. Prefer CMake/Ninja installed next to the active virtualenv Python.
  2. Validate the minimum required CMake version (3.24) before attempting a build.
  3. Fall back to or install the pinned build requirements when the available CMake is too old.
  4. Make it clearer when source update succeeds but the engine rebuild fails.

Workaround

.venv/bin/python -m pip install -r requirements-build.txt
PATH="$PWD/.venv/bin:$PATH" ./update.sh

Related but distinct: #3403.

Originally created by @sato33 on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3822 ## Problem On Ubuntu 22.04, `./update.sh` selects `/usr/bin/cmake` (3.22.1), even when a newer CMake is installed in Strata's own `.venv`. This causes the engine rebuild to fail because `CMakeLists.txt` requires CMake 3.24 or newer. ## Actual output ```text The engine's source changed: compiling it again ... > /usr/bin/cmake -G Ninja -DCMAKE_MAKE_PROGRAM=.../.venv/bin/ninja ... CMake 3.24 or higher is required. You are running version 3.22.1. [X] command failed (exit 1): cmake [!] could not compile the updated engine: starting the installed one [ok] Strata is updated (engine 0.1.44.1) ``` Environment: Ubuntu 22.04, RTX 4090, CUDA 13.4, existing locally compiled engine. ## Root cause `setup.sh` correctly executes `.venv/bin/python setup.py`. However, `setup.py`'s `find_tool()` calls `shutil.which(name)` before looking beside `sys.executable`. It only checks whether `cmake --version` exits successfully, not whether the CMake version meets the minimum requirement. Consequently, an outdated but working system CMake takes precedence over the virtualenv's CMake. ## Expected behavior 1. Prefer CMake/Ninja installed next to the active virtualenv Python. 2. Validate the minimum required CMake version (3.24) before attempting a build. 3. Fall back to or install the pinned build requirements when the available CMake is too old. 4. Make it clearer when source update succeeds but the engine rebuild fails. ## Workaround ```bash .venv/bin/python -m pip install -r requirements-build.txt PATH="$PWD/.venv/bin:$PATH" ./update.sh ``` Related but distinct: #3403.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6363303872 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6363350971 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Thanks. Fixed in 0.2.5: the build tools next to the virtualenv's Python are used first and a cmake older than 3.24 is skipped (5bfce4bea). Closing as done.

<!-- gh-comment-id:6423227283 --> @Niko1221 commented on GitHub (Oct 26, 2026): Thanks. Fixed in 0.2.5: the build tools next to the virtualenv's Python are used first and a cmake older than 3.24 is skipped (5bfce4bea). Closing as done.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1617
No description provided.