Repository: opencv
Issue: compile failed on HuaWei_Ascend_NPU with cann5.1.rc.alpha005
Labels: category: build/install,category: dnn

```
### System Information

General configuration for OpenCV 4.6.0-dev =====================================
--   Version control:               4.5.1-2662-ga95b6e4fae
--
--   Platform:
--     Timestamp:                   2023-03-16T04:17:06Z
--     Host:                        Linux 5.4.0-139-generic x86_64
--     CMake:                       3.22.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
--
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (16 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (32 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
--
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/c++  (ver 7.5.0)
--     C++ flags (Release):         -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-ignored-qualifiers -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-ignored-qualifiers -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -Wno-ignored-qualifiers -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -Wno-ignored-qualifiers -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          -Wl,--whole-archive /home/HwHiAiUser/Ascend/ascend-toolkit/latest/acllib/lib64/libascendcl.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp/op_proto/built-in/libopsproto.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/compiler/lib64/libgraph.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/compiler/lib64/libge_compiler.so -Wl,--no-whole-archive /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libtiff.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so /usr/lib/x86_64-linux-gnu/libz.so dl m pthread rt
--     3rdparty dependencies:       ittnotify libprotobuf libwebp libopenjp2 quirc ippiw ippicv
--
--   OpenCV modules:
--     To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc ml objdetect photo python3 stitching ts video videoio
--     Disabled:                    gapi world
--     Disabled by dependency:      -
--     Unavailable:                 java python2
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         NO
--
--   GUI:                           NONE
--     GTK+:                        NO
--     VTK support:                 NO
--
--   Media I/O:
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2_2)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--     DC1394:                      YES (2.2.5)
--     FFMPEG:                      YES
--       avcodec:                   YES (57.107.100)
--       avformat:                  YES (57.83.100)
--       avutil:                    YES (55.78.100)
--       swscale:                   YES (4.8.100)
--       avresample:                YES (3.7.0)
--     GStreamer:                   NO
--     v4l/v4l2:                    YES (linux/videodev2.h)
--
--   Parallel framework:            pthreads
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   /home/HwHiAiUser/twx1218107/cooper/opencv/build/3rdparty/ippicv/ippicv_lnx/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                /home/HwHiAiUser/twx1218107/cooper/opencv/build/3rdparty/ippicv/ippicv_lnx/iw
--     VA:                          NO
--     Lapack:                      NO
--     Eigen:                       NO
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/HwHiAiUser/twx1218107/cooper/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
--
--   CANN:                          YES
--     Include path                 /home/HwHiAiUser/Ascend/ascend-toolkit/latest/include /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp
--     Link libraries:              /home/HwHiAiUser/Ascend/ascend-toolkit/latest/acllib/lib64/libascendcl.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/opp/op_proto/built-in/libopsproto.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/compiler/lib64/libgraph.so /home/HwHiAiUser/Ascend/ascend-toolkit/latest/compiler/lib64/libge_compiler.so
--
--   Python 3:
--     Interpreter:                 /usr/local/python3.7.5/bin/python3.7m (ver 3.7.5)
--     Libraries:                   /usr/local/python3.7.5/lib/libpython3.7m.so (ver 3.7.5)
--     numpy:                       /home/HwHiAiUser/.local/lib/python3.7/site-packages/numpy/core/include (ver 1.21.6)
--     install path:                lib/python3.7/site-packages/cv2/python-3.7
--
--   Python (for build):            /usr/local/python3.7.5/bin/python3.7m
--
--   Java:
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
--
--   Install to:                    /home/HwHiAiUser/twx1218107/cooper/opencv/build/install
```

### Detailed description

I installed opencv-dnn on atlas-310 accord to this link (https://github.com/opencv/opencv/wiki/Huawei-CANN-Backend),Use this command (cmake -D WITH_CANN=ON -D BUILD_opencv_gapi=OFF -D CMAKE_INSTALL_PREFIX=install -D OPENCV_DOWNLOAD_MIRROR_ID=gitcode -D BUILD_LIBPROTOBUF_FROM_SOURCES=ON -D BUILD_opencv_python2=OFF -D BUILD_opencv_python3=ON -D PYTHON3_EXECUTABLE=/usr/local/python3.7.5/bin/python3.7m -D PYTHON3_INCLUDE_DIR=/usr/local/python3.7.5/include/python3.7m -D PYTHON3_LIBRARY=/usr/local/python3.7.5/lib/libpython3.7m.so -D BUILD_SHARED_LIBS=OFF ..).
It failed at last.I don't know what the problem is.

### Steps to reproduce

```
[ 95%] Built target opencv_perf_objdetect
[ 95%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[ 95%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/test_qrcode.cpp.o
[ 95%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2_util.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_perf_video.dir/perf/perf_bgfg_knn.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_camshift.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_ecc.cpp.o
[ 95%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2_numpy.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_perf_video.dir/perf/perf_bgfg_mog2.cpp.o
[ 95%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2_convert.cpp.o
[ 95%] Building CXX object modules/dnn/CMakeFiles/opencv_perf_dnn.dir/perf/perf_recurrent.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_estimaterigid.cpp.o
[ 95%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_kalman.cpp.o
[ 96%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2_highgui.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_main.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_perf_video.dir/perf/perf_disflow.cpp.o
[ 96%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/test_qrcode_encode.cpp.o
[ 96%] Building CXX object modules/dnn/CMakeFiles/opencv_test_dnn.dir/test/test_main.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_optflowpyrlk.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_test_video.dir/test/test_trackers.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_perf_video.dir/perf/perf_ecc.cpp.o
../../lib/libopencv_dnn.a(net_impl_fuse.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#1}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E_EE9_M_invokeERKSt9_Any_dataS4_+0xdc): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(net_impl_fuse.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#19}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E17_EE9_M_invokeERKSt9_Any_dataS4_+0xca): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E17_EE9_M_invokeERKSt9_Any_dataS4_+0x15c): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(net_impl_fuse.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#23}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E21_EE9_M_invokeERKSt9_Any_dataS4_+0xcc): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(net_impl_fuse.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#39}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E37_EE9_M_invokeERKSt9_Any_dataS4_+0x10b): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(net_impl_fuse.cpp.o):net_impl_fuse.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E37_EE9_M_invokeERKSt9_Any_dataS4_+0x1a7): more undefined references to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
...
...
...
...
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E931_EE9_M_invokeERKSt9_Any_dataS4_+0x160): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E931_EE9_M_invokeERKSt9_Any_dataS4_+0x254): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
../../lib/libopencv_dnn.a(op_cann.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#936}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E934_EE9_M_invokeERKSt9_Any_dataS4_+0x161): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E934_EE9_M_invokeERKSt9_Any_dataS4_+0x237): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(op_cann.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#419}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E417_EE9_M_invokeERKSt9_Any_dataS4_+0x201): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E417_EE9_M_invokeERKSt9_Any_dataS4_+0x395): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E417_EE9_M_invokeERKSt9_Any_dataS4_+0x434): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(op_cann.cpp.o):op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E418_EE9_M_invokeERKSt9_Any_dataS4_+0x1cf): more undefined references to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow
../../lib/libopencv_dnn.a(op_cann.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#1051}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E1049_EE9_M_invokeERKSt9_Any_dataS4_+0x206): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E1049_EE9_M_invokeERKSt9_Any_dataS4_+0x319): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(op_cann.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#1053}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E1051_EE9_M_invokeERKSt9_Any_dataS4_+0x1f9): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E1051_EE9_M_invokeERKSt9_Any_dataS4_+0x311): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../../lib/libopencv_dnn.a(op_cann.cpp.o): In function `std::_Function_handler<ge::Operator (ge::AscendString const&), ge::op::{lambda(ge::AscendString const&)#1264}>::_M_invoke(std::_Any_data const&, ge::AscendString const&)':
op_cann.cpp:(.text._ZNSt17_Function_handlerIFN2ge8OperatorERKNS0_12AscendStringEENS0_2opUlS4_E1262_EE9_M_invokeERKSt9_Any_dataS4_+0x278): undefined reference to `ge::Operator::AttrRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
collect2: error: ld returned 1 exit status
modules/dnn/CMakeFiles/opencv_test_dnn.dir/build.make:412: recipe for target 'bin/opencv_test_dnn' failed
make[2]: *** [bin/opencv_test_dnn] Error 1
CMakeFiles/Makefile2:2176: recipe for target 'modules/dnn/CMakeFiles/opencv_test_dnn.dir/all' failed
make[1]: *** [modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
[ 98%] Linking CXX shared module ../../lib/python3/cv2.cpython-37m-x86_64-linux-gnu.so
[ 98%] Built target opencv_python3
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)