已关闭
basic_ring样例在新版 CANN 包上编译失败:找不到 hcomm_res_defs.h #90
chen_xu0513创建于  18 天前关闭于  18 天前
chen_xu0513成员
18 天前 创建

问题描述

asc-comm/examples/aicore/ain/01_basic_ring 在合入了 asc-devkit MR !5572(feat(ccu): CCU 数据面并入 asccomm_ccu 单库交付)之后构建的 CANN 包上编译失败,报 hcomm_res_defs.h file not found。

根因分析

!5572 为去除 CCU DSL 头的重复交付,在 devkit 仓 cmake/third_party/asc-comm.cmake 的 comm_api 安装规则中加入了 PATTERN "hcomm" EXCLUDE。CMake 的 PATTERN 按目录名匹配任意层级,除预期的 ccu/hcomm 外,误将 asc-comm 顶层 include/hcomm/(hcomm_res_entity_defs.h 等平铺公共头)从 asc/include/comm_api/hcomm/ 的交付中一并排除。

样例原 include 配置仅有 $ENV{ASCEND_HOME_PATH}/asc/include/comm_api,其依赖链 ain.h → /ain_impl_def.h → #include "hcomm_res_defs.h" 恰好依赖该副本路径,副本被排除后即断链。

pkg_inc/hcomm/ 中 hcomm 组件仓交付的正件仍然存在,样例补配 -I pkg_inc(以及 <arch>-linux/include、<arch>-linux/include/hcomm)即可恢复编译。

likedislike
Cchen_xu0513成员
18 天前 将 chen_xu0513 设为负责人
Cchen_xu0513成员
18 天前 issue状态由 进行中 改变为 已解决
Cchen_xu0513成员
18 天前 关闭了 issue
CANN-robotCANN-robot成员
18 天前 添加了label:resolved