[GH-ISSUE #1645] setup.sh has no way of specifying gcc version #663

Closed
opened 2026-11-04 01:44:53 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @xobs on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1645

When using cuda-12, it has very specific requirements for GCC. It will refuse to compile with any GCC greater than 14.

Modern distros package modern GCC versions, however they frequently provide compatibility binaries. As an example, I have gcc-14 installed as a binary.

There doesn't seem to be a way to specify a gcc binary with setup.sh, and the script and cmake don't think to try gcc-14 as a binary.

I tried CXX=g++-14 CUDAHOSTCXX=g++-14 ./setup.sh --cuda 12 which got to the last step before dying.

This patch got it to compile:

diff --git a/setup.py b/setup.py
index 8a3cb96..85d373e 100644
--- a/setup.py
+++ b/setup.py
@@ -3219,6 +3219,7 @@ def build_engine(gpu, vision, yes, llama, toolkit=None) -> Path:
             if local and (eng / EXE).exists() else "  Compiling the Strata engine for your GPU (10-20 minutes, once) ...")
         cmake_build(ROOT, bdir, "strata",
                     ["-DSTRATA_ENABLE_CUDA=ON", "-DSTRATA_BUILD_TESTS=OFF", f"-DCMAKE_CUDA_ARCHITECTURES={cuda_archs}",
+                     "-DCMAKE_CXX_COMPILER=g++-14", "-DCMAKE_CUDA_HOST_COMPILER=g++-14", "-DCMAKE_C_COMPILER=gcc-14",
                      f"-DCMAKE_CUDA_COMPILER={nvcc}", *toolkit_root_defs(nvcc), f"-DSTRATA_GGML_DIR={llama}",
                      *engine_defs(archs, toolkit),
                      *isa_floor_defs(floor, bdir, meta)],
Originally created by @xobs on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1645 When using cuda-12, it has very specific requirements for GCC. It will refuse to compile with any GCC greater than 14. Modern distros package modern GCC versions, however they frequently provide compatibility binaries. As an example, I have `gcc-14` installed as a binary. There doesn't seem to be a way to specify a gcc binary with `setup.sh`, and the script and cmake don't think to try `gcc-14` as a binary. I tried `CXX=g++-14 CUDAHOSTCXX=g++-14 ./setup.sh --cuda 12` which got to the last step before dying. This patch got it to compile: ```patch diff --git a/setup.py b/setup.py index 8a3cb96..85d373e 100644 --- a/setup.py +++ b/setup.py @@ -3219,6 +3219,7 @@ def build_engine(gpu, vision, yes, llama, toolkit=None) -> Path: if local and (eng / EXE).exists() else " Compiling the Strata engine for your GPU (10-20 minutes, once) ...") cmake_build(ROOT, bdir, "strata", ["-DSTRATA_ENABLE_CUDA=ON", "-DSTRATA_BUILD_TESTS=OFF", f"-DCMAKE_CUDA_ARCHITECTURES={cuda_archs}", + "-DCMAKE_CXX_COMPILER=g++-14", "-DCMAKE_CUDA_HOST_COMPILER=g++-14", "-DCMAKE_C_COMPILER=gcc-14", f"-DCMAKE_CUDA_COMPILER={nvcc}", *toolkit_root_defs(nvcc), f"-DSTRATA_GGML_DIR={llama}", *engine_defs(archs, toolkit), *isa_floor_defs(floor, bdir, meta)], ```
Author
Owner

@CC-David-CC commented on GitHub (Oct 9, 2026):

Please confirm my PR fixes this for you

<!-- gh-comment-id:6074258501 --> @CC-David-CC commented on GitHub (Oct 9, 2026): Please confirm my PR fixes this for you
Author
Owner

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

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156172028 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#663
No description provided.