[PR #1677] [CLOSED] setup: pass CC/CXX/CUDAHOSTCXX to the CUDA build's cmake (#1645) #3603

Closed
opened 2026-11-07 15:29:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1677
Author: @nekomario28
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: fix-1645-host-compilers


📝 Commits (1)

  • 363c024 setup: pass CC/CXX/CUDAHOSTCXX to the CUDA build's cmake (#1645)

📊 Changes

3 files changed (+66 additions, -3 deletions)

View changed files

📝 docs/TROUBLESHOOTING.md (+2 -1)
📝 setup.py (+16 -2)
📝 tools/test_setup_choices.py (+48 -0)

📄 Description

Fixes #1645.

CUDA 12 refuses a GCC newer than 14, and TROUBLESHOOTING.md already tells the user to run CXX=g++-14 ./setup.sh — but the environment reaches CMake only on a build folder's first configure. On a retry, or in the encoder's separate build folder, the env vars never land; the reporter's run died at the last step and had to patch setup.py.

Change

host_compiler_defs() maps CC / CXX / CUDAHOSTCXX onto -DCMAKE_C_COMPILER / -DCMAKE_CXX_COMPILER / -DCMAKE_CUDA_HOST_COMPILER for the engine build and the CUDA image encoder — as -D, so an already-configured folder picks them up. CUDAHOSTCXX defaults to CXX, as CMake's own host compiler does; the CPU encoder build doesn't get the CUDA-only definition. Docs updated to say CXX=g++-14 ./setup.sh suffices.

Test plan

  • tools.test_setup_choices.HostCompilers: env→defs mapping, CUDAHOSTCXX→CXX default, the C++-only project keeps no CUDA flag, unset adds nothing.
  • test_the_defs_reach_cmake drives build_engine with a mocked cmake_build and asserts both the strata and strata-vision configures receive the flags.
  • tools.test_setup_choices: 44 tests pass.

Not tested: a real nvcc compile under gcc-14 (no CUDA toolkit here) — the change only forwards the flags the reporter verified by hand.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1677 **Author:** [@nekomario28](https://github.com/nekomario28) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-1645-host-compilers` --- ### 📝 Commits (1) - [`363c024`](https://github.com/Niko1221/Strata/commit/363c02411a10afddb0ea3716397c705f3ce1e2e6) setup: pass CC/CXX/CUDAHOSTCXX to the CUDA build's cmake (#1645) ### 📊 Changes **3 files changed** (+66 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/TROUBLESHOOTING.md` (+2 -1) 📝 `setup.py` (+16 -2) 📝 `tools/test_setup_choices.py` (+48 -0) </details> ### 📄 Description Fixes #1645. CUDA 12 refuses a GCC newer than 14, and TROUBLESHOOTING.md already tells the user to run `CXX=g++-14 ./setup.sh` — but the environment reaches CMake only on a build folder's **first** configure. On a retry, or in the encoder's separate build folder, the env vars never land; the reporter's run died at the last step and had to patch `setup.py`. ## Change `host_compiler_defs()` maps `CC` / `CXX` / `CUDAHOSTCXX` onto `-DCMAKE_C_COMPILER` / `-DCMAKE_CXX_COMPILER` / `-DCMAKE_CUDA_HOST_COMPILER` for the engine build and the CUDA image encoder — as `-D`, so an already-configured folder picks them up. `CUDAHOSTCXX` defaults to `CXX`, as CMake's own host compiler does; the CPU encoder build doesn't get the CUDA-only definition. Docs updated to say `CXX=g++-14 ./setup.sh` suffices. ## Test plan - `tools.test_setup_choices.HostCompilers`: env→defs mapping, CUDAHOSTCXX→CXX default, the C++-only project keeps no CUDA flag, unset adds nothing. - `test_the_defs_reach_cmake` drives `build_engine` with a mocked `cmake_build` and asserts both the `strata` and `strata-vision` configures receive the flags. - `tools.test_setup_choices`: 44 tests pass. Not tested: a real nvcc compile under `gcc-14` (no CUDA toolkit here) — the change only forwards the flags the reporter verified by hand. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:29:29 +07:00
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#3603
No description provided.