Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

setup: STRATA_NVCC picks the CUDA toolkit; CUDA_HOME is looked at; glibc 2.43 + CUDA 12.9 and gcc 15 documented (#601)

Niko122164b8d5dd31b4
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index 2d040b09d..7287409e4 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -25,6 +25,14 @@ Strata is already running. Look for its window. Or another program uses the port
**Python or the build tools could not be installed.**
Install what it names (links are printed), then run it again. Everything already done is kept.
+**Linux: the engine does not compile (`unsupported GNU version`, or `exception specification is incompatible` for
+`cospi`/`sinpi`/`rsqrt`).** Two known mismatches between the CUDA toolkit and a new Linux (#601):
+- gcc newer than 14 (Ubuntu 26.04's default 15): CUDA 12.x and 13.0 refuse it. Install g++-14 and run
+ `CXX=g++-14 CUDAHOSTCXX=g++-14 ./setup.sh`.
+- glibc 2.43 with CUDA 12.9: the toolkit's math headers clash with glibc's, already in CMake's first test compile.
+ Use CUDA 12.8 or 13.x instead. Setup takes the newest toolkit it finds; `STRATA_NVCC=/usr/local/cuda-12.8/bin/nvcc
+ ./setup.sh` makes it use that one (only that one).
+
**The first start takes minutes.**
It is reading 34-55 GB into RAM; the second start is faster while the files are in the OS cache. Started from Task
Scheduler, it can be 24x slower: see [Running it at startup](DETAILS.md#running-it-at-startup-task-scheduler).
diff --git a/setup.py b/setup.py
index d4651fbf3..cb14ac01a 100644
--- a/setup.py
+++ b/setup.py
@@ -700,10 +700,25 @@ def gpu_info(pick=None):
def find_nvcc(below=None):
- """The newest CUDA toolkit's nvcc and its (major, minor); with `below`, the newest older than that version."""
+ """The newest CUDA toolkit's nvcc and its (major, minor); with `below`, the newest older than that version.
+ #601: STRATA_NVCC=<path to nvcc> is the only one considered (a newer toolkit beside it that cannot build on this
+ PC - CUDA 12.9 with glibc 2.43 - is not taken instead)."""
+ pick = os.environ.get("STRATA_NVCC")
+ if pick:
+ if not Path(pick).exists():
+ warn(f"STRATA_NVCC={pick}: no such file; looking for a CUDA toolkit as usual")
+ else:
+ v = re.search(r"release (\d+)\.(\d+)", out([pick, "--version"]))
+ ver = (int(v.group(1)), int(v.group(2))) if v else None
+ if ver and below is not None and ver >= below:
+ warn(f"STRATA_NVCC={pick} is CUDA {ver[0]}.{ver[1]}; this build needs one older than "
+ f"{below[0]}.{below[1]}")
+ return (None, None)
+ return (pick, ver) if ver else (None, None)
cands = [shutil.which("nvcc")]
- if os.environ.get("CUDA_PATH"):
- cands.append(str(Path(os.environ["CUDA_PATH"]) / "bin" / ("nvcc.exe" if WIN else "nvcc")))
+ for var in ("CUDA_PATH", "CUDA_HOME"): # CUDA_HOME: Linux's usual name (#601)
+ if os.environ.get(var):
+ cands.append(str(Path(os.environ[var]) / "bin" / ("nvcc.exe" if WIN else "nvcc")))
if WIN:
base = Path(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA")
if base.exists():
diff --git a/tools/test_setup_choices.py b/tools/test_setup_choices.py
index 8f1fe8175..c55d1b206 100644
--- a/tools/test_setup_choices.py
+++ b/tools/test_setup_choices.py
@@ -189,6 +189,23 @@ class ExperimentalSm60(unittest.TestCase):
mock.patch.object(setup, "out", lambda cmd: versions.get(cmd[0], "")): # #414
self.assertEqual(setup.find_nvcc(), (str(new), (13, 0)))
self.assertEqual(setup.find_nvcc(below=(13, 0)), (str(old), (12, 9)))
+ # #601: STRATA_NVCC is the only one considered; CUDA_HOME is a candidate like CUDA_PATH
+ with mock.patch.dict(os.environ, {"STRATA_NVCC": str(old)}):
+ self.assertEqual(setup.find_nvcc(), (str(old), (12, 9)))
+ with mock.patch.dict(os.environ, {"STRATA_NVCC": str(new)}):
+ got, text = quiet(setup.find_nvcc, below=(13, 0))
+ self.assertEqual(got, (None, None))
+ self.assertIn("needs one older than 13.0", text)
+ with mock.patch.dict(os.environ, {"STRATA_NVCC": str(Path(d) / "missing")}):
+ got, text = quiet(setup.find_nvcc)
+ self.assertEqual(got, (str(new), (13, 0)))
+ self.assertIn("no such file", text)
+ with mock.patch.object(setup, "WIN", False), mock.patch.object(setup.shutil, "which", lambda n: None), \
+ mock.patch.dict(os.environ, {"CUDA_HOME": str(Path(d) / "12")}), \
+ mock.patch.object(setup, "out", lambda cmd: versions.get(cmd[0], "")):
+ os.environ.pop("CUDA_PATH", None)
+ got = setup.find_nvcc(below=(13, 0))
+ self.assertEqual(got, (str(old), (12, 9)))
def tools(self, archs, nvcc):
seen = []