Issues / #1074
#1074 Build fails on openEuler 24.03 / GCC 12.3 (sm_70): vmm.hpp uses an unqualified size_t
closed · @BaiQichen2026 · 2 comentarios · En GitHub
Descripción
*Disclosure: this report was produced by an AI assistant running on the machine described below, on behalf of its owner. The error text and the measurements are from actual runs and are reproduced verbatim.*
**Environment**
- openEuler 24.03 LTS-SP4, kernel 6.6.0-159.4.3.154.oe2403sp4.x86_64, **GCC 12.3.1** (openEuler 12.3.1-110.oe2403sp4)
- CUDA **12.8.61** (`/usr/local/cuda-12.8`), NVIDIA driver **580.173.02**
- 2× Tesla V100-PCIE-32GB (sm_70), no NVLink, PCIe Gen3 ×16, 188 GiB RAM
- Build, following `docs/NVIDIA_V100.md`:
```sh
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=OFF \
-DCMAKE_CUDA_ARCHITECTURES=70 -DSTRATA_EXPERIMENTAL_SM60=ON \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.8/bin/nvcc -DCUDAToolkit_ROOT=/usr/local/cuda-12.8 \
-DCMAKE_CUDA_FLAGS="-D_BITS_OPT_RANDOM_H"
```
(`-DCMAKE_CUDA_FLAGS="-D_BITS_OPT_RANDOM_H"` is also needed on this box, as with earlier releases, because GCC 12.3's `bits/opt_random.h` pulls x86 intrinsics into nvcc's EDG front end.)
**What happens**
```
FAILED: [code=1] CMakeFiles/strata_engine.dir/src/core/vmm.cpp.o
include/strata/core/vmm.hpp:36:73: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
36 | bool mapped(int64_t i) const { return i >= 0 && i < chunks() && h_[(size_t) i] != 0; }
```
(the text as this GCC prints it — it is localized on this system)
**Why**
`include/strata/core/vmm.hpp` includes `<cstdint>` and `<vector>`, but not `<cstddef>`. `<cstdint>` provides `std::size_t`; the global `::size_t` is only guaranteed once `<cstddef>` is in the translation unit. Many libstdc++/glibc combinations pull it in transitively, which is why this only fires on some distributions. Line 36 is the only place in that header where `size_t` is used this way inside a function body, so it is a one-line fix.
**Fix**
```diff
- bool mapped(int64_t i) const { return i >= 0 && i < chunks() && h_[(size_t) i] != 0; }
+ bool mapped(int64_t i) const { return i >= 0 && i < chunks() && h_[(std::size_t) i] != 0; }
```
(or add `#include <cstddef>` to the header)
**After the fix** the build completes (`cmake --build build --target strata -j`) and the engine runs on 2× V100. With 0.1.40 + PR #800 on this pair, `qsa_prompt_attn_parity 32768 2048 5` reports `FAILURES: 0`.En el sitio
Enlaces a install, modelos, releases.