[GH-ISSUE #1074] Build fails on openEuler 24.03 / GCC 12.3 (sm_70): vmm.hpp uses an unqualified size_t #462

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

Originally created by @BaiQichen2026 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1074

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:
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

-    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.

Originally created by @BaiQichen2026 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1074 *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`.
Author
Owner

@vpulim commented on GitHub (Oct 7, 2026):

Also hit on a different setup, through the one-click installer rather than a manual build:

  • Debian 12, GCC 12.2.0 (Debian 12.2.0-14), CUDA 13.0, RTX 5060 Ti (sm_120), driver 615.71.09
  • ./setup.sh --yes --family coder --model IQ1_M --no-start on 0.1.40

Setup reported No ready-made engine for v0.1.40 (HTTP Error 404: Not Found), fell back to compiling, and stopped on the same error:

include/strata/core/vmm.hpp:36:73: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?

So with no prebuilt engine for 0.1.40 on Linux, setup cannot finish for anyone on GCC 12 until this is fixed. Adding #include <cstddef> to vmm.hpp fixed it; after that the build completed and setup went on.

<!-- gh-comment-id:6029020782 --> @vpulim commented on GitHub (Oct 7, 2026): Also hit on a different setup, through the one-click installer rather than a manual build: - Debian 12, GCC 12.2.0 (Debian 12.2.0-14), CUDA 13.0, RTX 5060 Ti (sm_120), driver 615.71.09 - `./setup.sh --yes --family coder --model IQ1_M --no-start` on 0.1.40 Setup reported `No ready-made engine for v0.1.40 (HTTP Error 404: Not Found)`, fell back to compiling, and stopped on the same error: ``` include/strata/core/vmm.hpp:36:73: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'? ``` So with no prebuilt engine for 0.1.40 on Linux, setup cannot finish for anyone on GCC 12 until this is fixed. Adding `#include <cstddef>` to `vmm.hpp` fixed it; after that the build completed and setup went on.
Author
Owner

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

Fixed in 0.1.40.2: vmm.hpp now says std::size_t (aleesposito85's change from #1081, authorship kept). Thanks for the report.

<!-- gh-comment-id:6037982546 --> @Niko1221 commented on GitHub (Oct 7, 2026): Fixed in 0.1.40.2: vmm.hpp now says std::size_t (aleesposito85's change from #1081, authorship kept). Thanks for the report.
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#462
No description provided.