[GH-ISSUE #4038] [Other] Setup --build conflicts with the documented manual CMake build directory #1744

Closed
opened 2026-11-04 01:53:42 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Jackmeson1 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4038

Area

[Other] (anything else, including setup and installation)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

After configuring build/ with the manual CMake command from docs/INSTALL.md, substituting 120 for native as shown below, setup.py --build fails when it reconfigures that directory with Ninja:

CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
  [X]  command failed (exit 1): cmake
Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.

docs/INSTALL.md:187-190 ("Only compile, without the installer") gives cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native. The documented command does not specify -G. In my run, the resulting cache contained CMAKE_GENERATOR:INTERNAL=Unix Makefiles. docs/INSTALL.md:170-173 says to run ./setup.sh again after changing the code, and that "the build folder is an ordinary CMake build". setup.py:5602 uses that same build/ folder, and setup.py:5482 configures it with -G Ninja.

In this run, setup's CUDA 13 source-build path could not reuse the build/ directory previously configured with Unix Makefiles: its configure command selected Ninja and failed before compilation.

Expected: the documented manual-build and setup workflows either use compatible build directories/generators or document the transition between them. CMake already suggests removing CMakeCache.txt and CMakeFiles or choosing another binary directory. A setup-specific explanation could identify the conflicting build/ directory and explain how to continue. Automatically reusing the existing generator is one possible solution, not a requirement.

Smallest steps or command that reproduce it

On Linux with the CUDA toolkit and CMake 3.31.10, the manual configure below produced CMAKE_GENERATOR:INTERNAL=Unix Makefiles in build/CMakeCache.txt; env | grep -c CMAKE_GENERATOR printed 0 in that shell. I made the fresh checkout by cloning a local checkout at the same commit; from GitHub that is:

git clone https://github.com/Niko1221/Strata.git Strata-gen
cd Strata-gen
git checkout 7dd5cf18e68c639a8773e096c5c79f971ea2a9f5

# the manual configure from docs/INSTALL.md (120 instead of native because of #4023); configuring is enough
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=120
grep '^CMAKE_GENERATOR:' build/CMakeCache.txt     # CMAKE_GENERATOR:INTERNAL=Unix Makefiles

python3 setup.py --yes --build --model Q2_0 --vision no --no-start --data-dir /path/to/Strata-data

I ran setup.py directly. setup.sh forwards its arguments to setup.py using its selected Python environment. The recorded failure occurs in Step 4, before the model download and preparation steps.

Reproduction status

Reproduced locally

Strata version

Commit 7dd5cf18e6 (main)

Graphics card, memory and system

NVIDIA RTX PRO 6000 Blackwell Server Edition 97,887 MiB · 176 GiB RAM · Ubuntu 24.04.4 LTS (Linux 6.6.122+, Google Colab), driver 580.82.07, CUDA 13.0.88, GCC 13.3.0, CMake 3.31.10, Python 3.13.16

Model, size and settings

Q2_0 selected, --vision no --no-start; setup stops at the engine step.

Logs

My run, 2026-10-25. The manual configure:

-- Configuring done (22.3s)
-- Generating done (0.1s)
-- Build files have been written to: /content/Strata-gen/build
CMAKE_GENERATOR:INTERNAL=Unix Makefiles

Then setup.py:

  Compiling the Strata engine for your GPU (10-20 minutes, once) ...
  Installing CMake and Ninja build tools ...
  > /usr/bin/python3 -m pip install --quiet --disable-pip-version-check ninja==1.13.2
  [ok] CMake and Ninja build tools installed
  > /usr/local/bin/cmake -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -S /content/Strata-gen -B /content/Strata-gen/build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=OFF -DSTRATA_Q6K_EXPERTS=ON -DSTRATA_MMQ_KQUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=120 -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCUDAToolkit_ROOT=/usr/local/cuda-13.0 -DSTRATA_GGML_DIR=/content/Strata-gen/third_party/llama.cpp
CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
  [X]  command failed (exit 1): cmake
Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.

Not checked: Windows, the HIP folder (build-hip), and whether a second setup run after deleting build/ succeeds.

Originally created by @Jackmeson1 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4038 ### Area [Other] (anything else, including setup and installation) ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### What happened After configuring `build/` with the manual CMake command from `docs/INSTALL.md`, substituting `120` for `native` as shown below, `setup.py --build` fails when it reconfigures that directory with Ninja: ```text CMake Error: Error: generator : Ninja Does not match the generator used previously: Unix Makefiles Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. [X] command failed (exit 1): cmake Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` `docs/INSTALL.md:187-190` ("Only compile, without the installer") gives `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native`. The documented command does not specify `-G`. In my run, the resulting cache contained `CMAKE_GENERATOR:INTERNAL=Unix Makefiles`. `docs/INSTALL.md:170-173` says to run `./setup.sh` again after changing the code, and that "the build folder is an ordinary CMake build". `setup.py:5602` uses that same `build/` folder, and `setup.py:5482` configures it with `-G Ninja`. In this run, setup's CUDA 13 source-build path could not reuse the `build/` directory previously configured with Unix Makefiles: its configure command selected Ninja and failed before compilation. Expected: the documented manual-build and setup workflows either use compatible build directories/generators or document the transition between them. CMake already suggests removing `CMakeCache.txt` and `CMakeFiles` or choosing another binary directory. A setup-specific explanation could identify the conflicting `build/` directory and explain how to continue. Automatically reusing the existing generator is one possible solution, not a requirement. ### Smallest steps or command that reproduce it On Linux with the CUDA toolkit and CMake 3.31.10, the manual configure below produced `CMAKE_GENERATOR:INTERNAL=Unix Makefiles` in `build/CMakeCache.txt`; `env | grep -c CMAKE_GENERATOR` printed `0` in that shell. I made the fresh checkout by cloning a local checkout at the same commit; from GitHub that is: ```bash git clone https://github.com/Niko1221/Strata.git Strata-gen cd Strata-gen git checkout 7dd5cf18e68c639a8773e096c5c79f971ea2a9f5 # the manual configure from docs/INSTALL.md (120 instead of native because of #4023); configuring is enough cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=120 grep '^CMAKE_GENERATOR:' build/CMakeCache.txt # CMAKE_GENERATOR:INTERNAL=Unix Makefiles python3 setup.py --yes --build --model Q2_0 --vision no --no-start --data-dir /path/to/Strata-data ``` I ran `setup.py` directly. `setup.sh` forwards its arguments to `setup.py` using its selected Python environment. The recorded failure occurs in Step 4, before the model download and preparation steps. ### Reproduction status Reproduced locally ### Strata version Commit 7dd5cf18e68c639a8773e096c5c79f971ea2a9f5 (main) ### Graphics card, memory and system NVIDIA RTX PRO 6000 Blackwell Server Edition 97,887 MiB · 176 GiB RAM · Ubuntu 24.04.4 LTS (Linux 6.6.122+, Google Colab), driver 580.82.07, CUDA 13.0.88, GCC 13.3.0, CMake 3.31.10, Python 3.13.16 ### Model, size and settings Q2_0 selected, `--vision no --no-start`; setup stops at the engine step. ### Logs My run, 2026-10-25. The manual configure: ```text -- Configuring done (22.3s) -- Generating done (0.1s) -- Build files have been written to: /content/Strata-gen/build CMAKE_GENERATOR:INTERNAL=Unix Makefiles ``` Then `setup.py`: ```text Compiling the Strata engine for your GPU (10-20 minutes, once) ... Installing CMake and Ninja build tools ... > /usr/bin/python3 -m pip install --quiet --disable-pip-version-check ninja==1.13.2 [ok] CMake and Ninja build tools installed > /usr/local/bin/cmake -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -S /content/Strata-gen -B /content/Strata-gen/build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=OFF -DSTRATA_Q6K_EXPERTS=ON -DSTRATA_MMQ_KQUANTS=ON -DCMAKE_CUDA_ARCHITECTURES=120 -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCUDAToolkit_ROOT=/usr/local/cuda-13.0 -DSTRATA_GGML_DIR=/content/Strata-gen/third_party/llama.cpp CMake Error: Error: generator : Ninja Does not match the generator used previously: Unix Makefiles Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. [X] command failed (exit 1): cmake Setup stopped. Fix the item above and run it again - everything already done is kept and skipped. ``` Not checked: Windows, the HIP folder (`build-hip`), and whether a second setup run after deleting `build/` succeeds.
Author
Owner

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

Thanks, clear reproduction. Setup now notices a build folder made with another generator, says so in one line and configures it afresh. Fixed in 0.2.7.

Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7

<!-- gh-comment-id:6445984386 --> @Niko1221 commented on GitHub (Oct 27, 2026): Thanks, clear reproduction. Setup now notices a build folder made with another generator, says so in one line and configures it afresh. Fixed in 0.2.7. Release: https://github.com/Niko1221/Strata/releases/tag/v0.2.7
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#1744
No description provided.