Skip to content

[build] src/utils/regex.cppm: 'size_t' does not name a type under GCC modules (PCRE2 off) — second wall behind #1401 #1406

Closed

Description

@caomengxuan666

现象

winx3-parser 线(PR #1391,分支 fix/winx3-parser)在 #1401 的 GCC 可移植性修复(version.cppm 删 9 处冗余内层 export,commit 367ae14)落地后,mini 构建被第二处源码问题挡住:

  • 构建跑到 [52/93] 后停住(rc=1),mini.exe 未生成,repro.sh 与 REPORT §9 门均未跑。
  • 全量输出 138KB 中 FAILED 边仅此一处:CMakeFiles/mini.dir/.../src/utils/regex.cppm.obj。
  • 首错:src/utils/regex.cppm:22:3: error: 'size_t' does not name a type,随后 227 行 error/note 级联(尾部 capture_count_/capture_count/capture_index 的 "has no member" 只是级联,不是独立病灶)。

根因方向

该文件全局模块片段在 PCRE2 关闭时为空(仅条件式 #include <pcre2.h>),未提供 ::size_t;而 import std 在严格 GCC 模块语义下不提供无限定 size_t。对照:同轮编过的 gnu_float80.cppm 在全局片段显式 #include <cstddef>,故过关——此为文件特异问题。

与本簇无关的证据:git diff b7c3675 HEAD -- src/utils/regex.cppm 为空(文件仍为基线态);此前只看到 version 失败,是因为 version 先失败、构建未及跑到 regex——它是被 version 挡住的潜伏第二堵墙。

建议修复形(接棒者定最小正确形)

往 regex.cppm 全局模块片段补 #include <cstddef>,或把相关声明限定为 std::size_t;仅此一文件,不扩 scope。

Regression seed

mini 构建在 GCC 模块配置下跑过 regex.cppm.obj(且整轮 [93/93] 通过)即为钉;随后 repro.sh(40 余用例)与 REPORT §9 门全过才算交卷。

归宿

winx3-parser 线接棒(与 #1401 同款路径):独立标注 commit(先 Refs 本号、门全过前不用 Fixes),重提构建 → repro.sh → §9 门 → REPORT 回填;PR #1391 在门全过前保持 draft。证据:~/workspace/winuxcmd-fix/clusters/winx3-parser/REPORT.md §9(#1401 修复后接棒验证日志)。

Activity

  1. added
    bug
    noise-platform
    on Oct 26, 2026
  2. caomengxuan666 commented on Oct 27, 2026

    @caomengxuan666
    MemberAuthor

    Status check (2026-10-27 integration sweep): the fix itself is small and well-described (unqualified size_t needs std:: under GCC modules since the global module fragment only imports macros), but no verification path exists right now — the local dev box and CI (build-winuxcmd.yml) are MSVC-only, and MSVC accepts the current code by design. Shipping a blind edit to module code without a GCC compile gate would risk a fourth regression of the same class.

    Recommended path before this gets fixed: stand up a GCC 15+ (mingw-w64 UCRT64, -std=c++23 with import std;) compile job — either a CI matrix entry or a documented local MSYS2 environment — as the verification gate for this whole wall series (#1401 → #1406 → #1407 → #1412). Once the gate exists the code fixes are minutes of work. Keeping open with the blocked-on-toolchain label intent until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugnoise-platform

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions