Issues / #1645

#1645 setup.sh has no way of specifying gcc version

open · @xobs · 1 comentários · No GitHub

Setup & installNVIDIA / CUDA

Descrição

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)],
```

No site

Links install, modelos, releases.