Skip to content

[CI] eui-neo-tray 测试在 linux-llvm 平台编译失败,阻断 CI #526

Closed

Description

@tz12323

现象

mcpp test -p eui-neo-tray 在 linux-llvm 工具链下编译失败,red_members.py 检测到新增失败构件,CI job 失败。

tray ... FAIL (compile, 1.01s)
failed: obj/eui-neo-tray-tests/tests/tray.o
/home/runner/work/mcpp-index/mcpp-index/tests/examples/eui-neo-tray/tests/tray.cpp:81:7: error: missing '#include <stdlib.h>'; 'setenv' must be declared before it is used
 81 | ::setenv(marker, "1", 1);
 | ^
note: declaration here is not visible
extern int setenv (const char *__name, const char *__value, int __replace)
1 error generated.
error: test result: FAILED. 0 passed; 1 failed; finished in 174.03s (build 23.72s + run 0.00s)
failures:
 tray
 eui-neo-tray 174s FAIL

根因

tests/examples/eui-neo-tray/tests/tray.cpp 第 81 行调用 ::setenv(),缺少头文件 #include <stdlib.h>。
LLVM/Clang 严格模式下不会隐式引入 stdlib.h,导致编译报错;部分编译器可能间接引入,所以属于平台 / 编译器敏感的编译错误。

Activity

  1. Sunrisepeak commented on Oct 14, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions