【Hackathon 10th Spring No.51】Apply yaml-cpp GCC 15 compatibility patch - part 5#79233
Conversation
There was a problem hiding this comment.
Pull request overview
This PR applies a minimal downstream patch to the vendored yaml-cpp submodule to address GCC 15 compilation issues, by ensuring required fixed-width integer types are available during compilation. The patch is wired into Paddle’s third-party build via ExternalProject_Add() so it is automatically applied during dependency preparation.
Changes:
- Add a
yaml-cpppatch that includes<cstdint>insrc/emitterutils.cpp(GCC 15 compatibility). - Update the
yaml-cppexternal CMake build to apply the patch during thePATCH_COMMANDstep.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| patches/yaml-cpp/emitterutils.cpp.patch | Introduces a small upstream-style patch adding <cstdint> include to fix GCC 15 build issues. |
| cmake/external/yaml.cmake | Adds a PATCH_COMMAND to automatically apply the yaml-cpp patch during the external project build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-03 23:32:24
📋 Review 摘要
PR 概述:为 yaml-cpp 应用 GCC 15 兼容性补丁,在 emitterutils.cpp 中添加 #include <cstdint>
变更范围:cmake/external/、patches/yaml-cpp/
影响面 Tag:Build
问题
未发现阻塞性问题。PR 规范问题在下面章节报,不要在这里重复。
补充说明(可维护性 P2):
YAML_PATCH_COMMAND使用git checkout -- .重置 yaml-cpp 工作目录后再 apply 本补丁。若后续需添加第二个 patch 文件,必须将新 patch 命令追加到同一条指令链(git apply patch1 && git apply patch2),否则git checkout -- .会在第二个 patch 执行前清除第一个 patch 的效果。建议在注释中明确说明此约束,以降低未来维护风险。
📝 PR 规范检查
标题使用了 Hackathon 任务编号前缀,缺少 Paddle 标准 [Tag] 格式,建议修改为如下形式:
标题建议(可直接复制):
[Build] Apply yaml-cpp GCC 15 compatibility patch (Hackathon 10th Spring No.51 - part 5)
PR 描述建议(点击展开,可直接复制)
### PR Category
Environment Adaptation
### PR Types
Devs
### Description
为 yaml-cpp 添加 GCC 15 兼容性补丁:在 `src/emitterutils.cpp` 中补充 `#include <cstdint>` 头文件。
GCC 15 移除了部分隐式传递的标准头文件包含(见 gcc commit 3a817a4),导致 `uint8_t` 等类型不再通过其他头文件间接可用,编译报错。由于 yaml-cpp 上游尚未修复该问题(见 yaml-cpp#1307),暂以补丁方式解决,后续待上游更新后移除。
相关链接:
- https://github.com/jbeder/yaml-cpp/issues/1307
- https://gcc.gnu.org/cgit/gcc/commit/?id=3a817a4a5a6d94da9127af3be9f84a74e3076ee2
- PaddlePaddle/Paddle#79229
### 是否引起精度变化
否总体评价
变更精简正确,#include <cstdint> 修复符合 GCC 15 标准变更预期,CMake patch 机制通过 git checkout -- . 保证幂等性。建议在注释中记录多 patch 场景的维护约束,并修正 PR 标题格式。
|
CI triage 一下(head:
当前还有一个 |
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 76/77 通过
2 失败详情🔴 Coverage test — 环境问题(置信度: 高)失败用例:
关键日志:
修复建议:
关联变更: 未发现关联;本 PR 变更 |
|
/re-run all-failed |
|
@SigureMo 我重新看了这条稳定失败:
我已单独开修复 PR:#79240。它只移除这段过宽的非 XPU |
PR Category
Environment Adaptation
PR Types
Devs
Description
相关链接:
是否引起精度变化
否