已关闭
[Bug-Report|缺陷反馈]: identity算子aicpu ut编译报错 #289
chenlong360创建于  2025年12月27日关闭于  2025年12月29日
chenlong360
2025年12月27日 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

identity算子aicpu ut编译报错

Environment / 环境信息 (Mandatory / 必填)

910b,cann-8.5.0-beta.1

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

bash build.sh --opkernel_aicpu_test --ops=identity

编译报缺少头文件dlog_pub.h:

In file included from /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log.h:17,
                 from /home/x/ops-nn-master/control/identity/op_kernel_aicpu/identity_aicpu.cpp:14:
/home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log_weak.h:14:10: fatal error: dlog_pub.h: No such file or directory
   14 | #include "dlog_pub.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/build.make:76: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/identity_aicpu.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:505: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2
make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2

手动添加这个头文件之后仍然有链接错误:

/usr/bin/ld: /home/x/Ascend/cann/lib64/libaicpu_context_host.a(device_sharder.cc.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/build.make:103: tests/ut/op_kernel_aicpu/nn_aicpu_op_kernel_ut] Error 1
make[2]: *** [CMakeFiles/Makefile2:613: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2
make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2

Describe the expected behavior / 预期结果 (Mandatory / 必填)

算子的ut正常编译执行

In file included from /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log.h:17,
                 from /home/x/ops-nn-master/control/identity/op_kernel_aicpu/identity_aicpu.cpp:14:
/home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log_weak.h:14:10: fatal error: dlog_pub.h: No such file or directory
   14 | #include "dlog_pub.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/build.make:76: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/identity_aicpu.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:505: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2
make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2



/usr/bin/ld: /home/x/Ascend/cann/lib64/libaicpu_context_host.a(device_sharder.cc.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/build.make:103: tests/ut/op_kernel_aicpu/nn_aicpu_op_kernel_ut] Error 1
make[2]: *** [CMakeFiles/Makefile2:613: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2
make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2

Special notes for this issue/备注 (Optional / 选填)

likedislike
胡一航成员
2025年12月27日 评论:

感谢您的反馈,可以关联上您的PR,在验证后由commiter审视合入。

likedislike
chenlong360
2025年12月27日 评论:

感谢您的反馈,可以关联上您的PR,在验证后由commiter审视合入。

@huyihang1117

已经合入,可以关闭了

likedislike
chenlong360
2025年12月29日 评论:

/close

likedislike
CANN-robotCANN-robot成员
2025年12月29日 关闭了 issue
CANN-robotCANN-robot成员
3月20日 添加了label:resolved