Open dragonforward opened 1 year ago
WARNING: Mapping to the on chip ram failed (128 > 0), continuing, FATAL: Importing 1228800 bytes of CPU memory has failed (Invalid argument),
原因应该是驱动加载时未设置 on chip ram 的地址和大小。使用 modprobe 加载 vha 时可以追加命令参数:
modprobe vha onchipmem_phys_start=0xffe0000000 onchipmem_size=0x100000 freq_khz=792000
首先,十分感谢大佬的回复,就是这个解决方法在大佬你的那个语雀有看到,尝试过,那个报错但是那个框输出是正常的,然后那个推理过程好像很卡,不知道是不是npu驱动的问题。 我先把驱动卸载后,按照那个解决方法重新进行加载了,但是还是报错下载这个信息: FATAL: Importing 1228800 bytes of CPU memory has failed (Invalid argument) 相比较之前的报错,少了Mapping to the on chip ram failed (128 > 256), continuing... 下面是命令行的输出记录: (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo rmmod vha_info (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo rmmod vha (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ^[[200~sudo rmmod img_mem~^C (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo rmmod img_mem (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# lsmod Module Size Used by snd_usb_audio 1609728 0 uvcvideo 778240 0 snd_hwdep 65536 1 snd_usb_audio snd_usbmidi_lib 204800 1 snd_usb_audio videobuf2_vmalloc 57344 1 uvcvideo snd_rawmidi 241664 1 snd_usbmidi_lib binfmt_misc 81920 1 pvrsrvkm 8572928 17 dwc3 2457600 0 roles 40960 1 dwc3 galcore 3166208 0 dwc3_thead 36864 0 vc8000 618496 0 memalloc 28672 0 hantrodec 888832 0 vidmem 139264 0 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo insmod /lib/modules/5.10.113+/kernel/drivers/nna/img_mem/img_mem.ko (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# modprobe vha onchipmem_phys_start=0xffe0000000 onchipmem_size=0x100000 freq_khz=792000 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo insmod /lib/modules/5.10.113+/kernel/drivers/nna/vha/vha_info.ko (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# sudo chmod a+rw /dev/vha0 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ls coco.names hhb_out image_preprocessed.tensor kite.jpg shl.hhb.bm soccer_result.jpg yolov5n.onnx detect.txt image_preprocessed.bin inference.py kite_result.jpg soccer.jpg yolov5n.c yolov5n_example (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# chmod inference.py chmod: missing operand after 'inference.py' Try 'chmod --help' for more information. (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# chmod 777 inference.py (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ls coco.names hhb_out image_preprocessed.tensor kite.jpg shl.hhb.bm soccer_result.jpg yolov5n.onnx detect.txt image_preprocessed.bin inference.py kite_result.jpg soccer.jpg yolov5n.c yolov5n_example (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# chmod 777 inference.py (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ls coco.names hhb_out image_preprocessed.tensor kite.jpg shl.hhb.bm soccer_result.jpg yolov5n.onnx detect.txt image_preprocessed.bin inference.py kite_result.jpg soccer.jpg yolov5n.c yolov5n_example (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 1228800 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 15.44167ms, FPS=64.76 detect num: 3 id: label score x1 y1 x2 y2 [0]: 0 0.840377 143.673843 124.767212 324.287476 510.595825 [1]: 32 0.793254 190.266235 465.577087 247.116486 514.476807 [2]: 0 0.645619 219.326797 159.139938 537.784119 510.424500 ** draw bbox ** [143.673843, 124.767212, 324.287476, 510.595825, 0.840377, 0] [190.266235, 465.577087, 247.116486, 514.476807, 0.793254, 32] [219.326797, 159.139938, 537.784119, 510.4245, 0.645619, 0]
错误信息看起来还是驱动中报出来的。我这边的环境没复现现象。
你现在执行的时候,有修改 inference.py 和 yolov5n.c 中的源码嘛?将其中的输入预处理换成对应于 640 x 640的
1、单纯修改inference.py文件的输入尺寸为640*640,不修改yolov5n.c 会包那个错误,但是框的标注是准确的 2、修改inference.py和yolov5n.c的384全部都改为640,会报那个错误,然后标注框也是不对的。 这两种我今天都实验过。 然后我还发现 使用解决方法前 INFO: NNA clock:792000 [kHz] INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5)
使用解决方法后是这样 INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) 也就是我之前那条说到的少了一个警告吧 WARNING: Mapping to the on chip ram failed (128 > 256), continuing...
然后我看到那个npu推理的卡住的地方主要是"./yolov5n_example ./hhb_out/hhb.bm image_preprocessed.bin" 虽然推理打印出的时间Run graph execution time: 15.45638ms, FPS=64.70很短,但是实测,板子上其实要好久时间,有20秒多卡住
./yolov5n_example ./hhb_out/hhb.bm image_preprocessed.bin
执行,会触发 npu 驱动的在线编译,在线编译耗时会根据模型复制程度而变。在执行完成后会在目录下保存 shl.hhb.bm 文件,后续使用 shl.hhb.bm 替换 hhb.bm ,就不会触发在线编译了。大佬有哪个参考资料我可以学着去修改吗,因为yolov5模型我一般都是用到640640,我看github官网那个也是输入尺寸为640640
大佬有哪个参考资料我可以学着去修改吗,因为yolov5模型我一般都是用到640_640,我看github官网那个也是输入尺寸为640_640
github 官网的 export.py 导出的时候可以设置输入大小。比如 python3 export.py --weights yolov5n.pt --include onnx --imgsz 384 640
十分感谢大佬的回复,学到了。 1、第一个疑问:那个修改输入尺寸,我训练640*640转384 640对训练的模型效果影响大吗,下面是我百度到的,我刚刚量化以及转换都效果还行,用的官方模型,还没实验自己的 在YOLOv5中使用export.py修改模型输入尺寸可能会对模型的性能和准确性产生影响。模型的输入尺寸通常在训练过程中确定,并且模型对于特定尺寸的输入图像进行了优化。 2、第二个疑问: 当前环境: 20230920 debian镜像 licheepi 4a yolov5n模型按照大佬转换为onnx时候改了尺寸,其他命令都没修改 还是会报之前的下面错误,但是标定框运行正常,这个是不是硬件的问题,还是说我的licheepi 4a有问题, FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument)
ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ./yolov5n_example ./shl.hhb.bm image_preprocessed.bin INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 13.20488ms, FPS=75.73 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 11.86316ms, FPS=84.29 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 ** draw bbox ** [273.492188, 161.245056, 359.559814, 330.644257, 0.895277, 0] [79.860062, 179.181244, 190.755692, 354.304474, 0.887368, 0] [222.054565, 224.4776, 279.828979, 333.717285, 0.815214, 0] [67.62558, 173.948883, 201.687988, 219.065765, 0.563324, 33] (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n#
十分感谢大佬,辛苦大佬了,那个我可以补充问两个个问题吗, 问题一:就是因为我调用摄像头去检测,发现帧率不高,然后我在图像预处理和模型推理进行了对比,发现python的图像预处理生成bin文件,耗时有一定时间,有2s,模型推理时间还可以接受,因为我看到大佬有在 LicheePi4A 上使用 opencv c++ 版本做 mobilenetv2 模型的预处理,那么类比的话,我应该也可以用opencv c++去进行图像预处理,这样应该会快,因为自己也是开始接触这个,我知道使用c++处理速度肯定比python快不少,然后甚至可以全套使用c++代码,因为那个模型推理是调用os.system命令,我如果使用opencv c++版本的话,是不是numpy也要对应c++版本,然后opencv-python会和opencv c++版本冲突吗,opencv c++我是去使用源码编译对吗,这样一个思路,我问chatgpt了解到,sudo apt install libopencv-dev,这样安装可行吗,因为我怕因为是得riscv64架构。 问题二: 然后我刚刚还看到大佬有发布: v2.4.0 Latest 这是 SHL 2.4 的 release note,适用于搭载玄铁 CPU 的各类芯片开发板。 This is the release note of SHL 2.4, which is suitable for all kinds of chip development boards equipped with Xuantie CPU. 当前版本包括了一些功能加强和问题修复的说明。 The release includes some functional enhancements and bug fixes. 文档里面是下面这个2.4-beta,大佬发布2.4版本是比这个新些,会不会速度也会快不少,然后因为这个东西我不敢随便替换,所以询问一下大佬 https://github.com/T-head-Semi/csi-nn2/releases/download/v2.4-beta.1/c920.tar.gz
问题1:
问题2:
大佬我想问一个问题hhb -f的这个-f这个参数是,我在mobilenetv2示例看到的,然后那我用yolov5可以直接使用大佬的预编译opencv吗
大佬,我说一下我细读了代码,mobilenetv2里面图像预处理c代码是crop进行剪裁,而yolov5那个是创建蒙版,就是按照那个比例缩小后,图像缺少的部分是用灰色去填补,就是保证了图像完整性,所以说通过图像剪裁方式和那种蒙版方式都可以,蒙版保存图像的完整会更好是吗
大佬,我说一下我细读了代码,mobilenetv2里面图像预处理c代码是crop进行剪裁,而yolov5那个是创建蒙版,就是按照那个比例缩小后,图像缺少的部分是用灰色去填补,就是保证了图像完整性,所以说通过图像剪裁方式和那种蒙版方式都可以,蒙版保存图像的完整会更好是吗
这个问题我不清楚。。。 不过,如果是为了复现模型的精度数据的话,推荐使用原模型所用的预处理。 另外,HHB 文档中的所有示例目的都是为了演示,如何将模型部署到玄铁硬件平台上。文档中所描述的,模型执行以及模型预处理和后处理等配套操作,都只是为了方便示意,不一定是最优的。
是的,我目前复现了一下大佬的代码,相当于把python那部分预处理用c++写了,我把每个阶段的图片进行对比以及hwc格式转chw格式,然后变成一维数组,终于对比之后bin文件大小和python预处理的代码一模一样,我看tensor不一样,可能是小数位数不同,然后我把bin文件发送到开发板刚刚实验了,可以正确识别并框选 大佬然后我有一个问题就是,再hbb那个docker环境是不是我不用编译opencv,就是拉取大佬你的pre_build opencv,然后就是执行mobilenetv2那个sh命令,我换成这样可行吗 riscv64-unknown-linux-gnu-g++ main.cpp -I../prebuilt_opencv/include/opencv4 -L../prebuilt_opencv/lib -lopencv_imgproc -lopencv_imgcodecs -L../prebuilt_opencv/lib/opencv4/3rdparty/ -llibjpeg-turbo -llibwebp -llibpng -llibtiff -llibopenjp2 -lopencv_core -ldl -lpthread -lrt -lzlib -lcsi_cv -latomic -static -o yolov5n_image_process 好像命令都不需要怎么修改 然后的话,我相当于就再python代码里面有两个os.system,这样可行吗,如果可行,可以先这样实验,后续可以移植纯c,或者苏红把预处理融入到识别那个c里面
嗯。只要能编译,能执行,应该就可行。中间遇到问题解决问题即可。
大佬,编译过了,然后测试速度快了不少,我觉得还有提高的空间,目前就是我用usb摄像头,帧率还行,一秒有2-3帧,比之前摄像头是2-3秒才1帧,然后我这个做的工作有价值吗,如果有价值我可以给大佬仓库提交我目前的实现功能吗 我测了一下所有程序 我是这样测量的 start_time = time.time() counter = 0
counter += 1 # 计算帧数 if (time.time() - start_time) != 0: # 实时显示帧数 cv2.putText(frame, "FPS {0}".format(float('%.1f' % (counter / (time.time() - start_time)))), (30, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
cv2.imshow('frame', frame)
print("FPS: ", counter / (time.time() - start_time))
counter = 0
start_time = time.time()
FPS: 3.1931227222862137
提交肯定欢迎呀
大佬,就是目前我想把那个图像预处理部分以及对detect的标注到图片上直接整合进yolov5n.c,我有一个问题,就是在阅读源码时候,我是不是可以不用写bin过度,直接传参进去,是不是就会少一个文件的写入而提高速度 我看到源码里面get_file_type是获取文件属性,但是大佬里面代码写的是== FILE_TXT,而实际执行时候是通过bin文件,这个我没太明白 if (argc == 3 && get_file_type(argv[2]) == FILE_TXT) { data_path = read_string_from_file(argv[2], &input_group_num); input_group_num /= input_num; }
你好大佬,就是我在我代码上加入了cap,然后编译报错,我加入了百度上说的一些要求,
root@3eb4c58bfd83:/home/example/th1520_npu/yolov5n_hat# riscv64-unknown-linux-gnu-g++ main.cpp -I../prebuilt_opencv/include/opencv4 -L../prebuilt_opencv/lib -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_videoio -lopencv_highgui -L../prebuilt_opencv/lib/opencv4/3rdparty/ -llibjpeg-turbo -llibwebp -llibpng -llibtiff -llibopenjp2 -lopencv_core -ldl -lpthread -lrt -lzlib -lcsi_cv -latomic -static -o mobilenetv2_example
/tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_core.a(filesystem.cpp.o): in function .L0 ': filesystem.cpp:(.text._ZN2cv6plugin4impl10DynamicLib11libraryLoadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x4e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_v4l.cpp.o): in function
.L530':
cap_v4l.cpp:(.text._ZN2cv16CvCaptureCAM_V4L12convertToRgbERKNS_6BufferE+0x7a2): undefined reference to cv::imdecode(cv::_InputArray const&, int, cv::Mat*)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.LEHE3':
cap_images.cpp:(.text._ZN2cv16CvCapture_Images9grabFrameEv+0x36): undefined reference to cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.LEHB11':
cap_images.cpp:(.text._ZN2cv20CvVideoWriter_Images10writeFrameEPK9_IplImage+0xbc): undefined reference to cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.L819':
cap_images.cpp:(.text._ZN2cv20CvVideoWriter_Images4openEPKc+0xc2): undefined reference to cv::haveImageWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.L870':
cap_images.cpp:(.text._ZN2cv20create_Images_writerERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEidRKNS_5Size_IiEERKNS_21VideoWriterParametersE+0xe8): undefined reference to cv::haveImageWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.L0 ':
cap_images.cpp:(.text._ZN2cv16CvCapture_Images4openERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1b2): undefined reference to cv::haveImageReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tools/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-light.1/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_images.cpp.o): in function
.L1019':
cap_images.cpp:(.text._ZN2cv16CvCapture_Images4openERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x1d2): undefined reference to `cv::imread(std::cxx11::basic_string<char, std::char_traits.LEHE0': cap_mjpeg_decoder.cpp:(.text._ZN2cv17MotionJpegCapture13retrieveFrameEiRKNS_12_OutputArrayE+0x56): undefined reference to
cv::imdecode(cv::_InputArray const&, int)'
collect2: error: ld returned 1 exit status
root@3eb4c58bfd83:/home/example/th1520_npu/yolov5n_hat#
我明白了,是不是那个prebuilt那个是不是没加入4l2
大佬,就是目前我想把那个图像预处理部分以及对detect的标注到图片上直接整合进yolov5n.c,我有一个问题,就是在阅读源码时候,我是不是可以不用写bin过度,直接传参进去,是不是就会少一个文件的写入而提高速度 我看到源码里面get_file_type是获取文件属性,但是大佬里面代码写的是== FILE_TXT,而实际执行时候是通过bin文件,这个我没太明白 if (argc == 3 && get_file_type(argv[2]) == FILE_TXT) { data_path = read_string_from_file(argv[2], &input_group_num); input_group_num /= input_num; }
十分感谢大佬的回复,好的,我去尝试一下,我今天自己编译opencv源码怪怪的 问题一:大佬是下面这个类似编译吗 mkdir build cd build mkdir OutLib cd ..
cmake ../ -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/OutLib -D BUILD_SHARED_LIBS=0 -D BUILD_SHARED_LIBS=OFF -D BUILD_SHARED_LIBS=NO -D BUILD_PNG=ON -D BUILD_JASPER=ON -D BUILD_JPEG=ON -D BUILD_TIFF=ON -D BUILD_ZLIB=ON -D WITH_JPEG=ON -D WITH_PNG=ON -D WITH_JASPER=ON -D WITH_TIFF=ON
make
应该不用make install 问题二:rv_debian_build:1.3是这个docker镜像编译吧,我用的是这个,还是说是去使用hhb4tools/hhb:2.4.5这个镜像
十分感谢大佬的回复,好的,我去尝试一下,我今天自己编译opencv源码怪怪的 问题一:大佬是下面这个类似编译吗 mkdir build cd build mkdir OutLib cd ..
cmake ../ -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/OutLib -D BUILD_SHARED_LIBS=0 -D BUILD_SHARED_LIBS=OFF -D BUILD_SHARED_LIBS=NO -D BUILD_PNG=ON -D BUILD_JASPER=ON -D BUILD_JPEG=ON -D BUILD_TIFF=ON -D BUILD_ZLIB=ON -D WITH_JPEG=ON -D WITH_PNG=ON -D WITH_JASPER=ON -D WITH_TIFF=ON
make
应该不用make install 问题二:rv_debian_build:1.3是这个docker镜像编译吧,我用的是这个,还是说是去使用hhb4tools/hhb:2.4.5这个镜像
大概可以吧。。。不过我没试过这种方式编译。 prebuilt_opencv 的编译,与 python wheel 不太一样,是在 x86 服务器上,用交叉编译工具链编的。 当时的编译选项差不多是 cmake .. -DCMAKE_TOOLCHAIN_FILE="../platforms/linux/riscv64-gcc.toolchain.cmake" -DWITH_OPENCL=OFF -DBUILD_opencv_calib3d=ON -DBUILD_ZLIB=ON -DBUILD_PNG=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCMAKE_INSTALL_PREFIX=../install -DBUILD_CSI_CV=ON -DWITH_OPENMP=OFF -DWITH_PTHREADS_PF=OFF -DCORE=C920
照着你问题一的命令的思路的话,要用 rv_debian_build
FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument)
这个错误提示的原因是 NPU 用户态驱动和内核态驱动不匹配。需要等开发板镜像更新后,更新到最新版本来解决。
收到,就是大佬我可以问一下吗 本地环境: wsl ubuntu20.04 就是我在编译opencv源码,然后就是我拉取的opencv4.7.0,交叉编译设置了交叉编译工具,那个cmake文件我也重新写了 set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(CMAKE_C_COMPILER riscv64-unknown-linux-gnu-gcc) set(CMAKE_CXX_COMPILER riscv64-unknown-linux-gnu-g++)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_C_FLAGS "-static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive") set(CMAKE_CXX_FLAGS "-static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive")
set(CMAKE_FIND_ROOT_PATH /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
输出信息 "\n" "General configuration for OpenCV 4.7.0 =====================================\n" " Version control: 4.7.0-dirty\n" "\n" " Platform:\n" " Timestamp: 2023-10-22T12:13:06Z\n" " Host: Linux 5.15.90.1-microsoft-standard-WSL2 x86_64\n" " Target: Linux riscv64\n" " CMake: 3.25.2\n" " CMake generator: Unix Makefiles\n" " CMake build tool: /usr/bin/make\n" " Configuration: Release\n" "\n" " CPU/HW features:\n" " Baseline:\n" " requested: DETECT\n" "\n" " C/C++:\n" " Built as dynamic libs?: NO\n" " C++ standard: 11\n" " C++ Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-g++ (ver 10.4.0)\n" " C++ flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" " C++ flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -DDEBUG -D_DEBUG\n" " C Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-gcc\n" " C flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG\n" " C flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -DDEBUG -D_DEBUG\n" " Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" " Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" " ccache: NO\n" " Precompiled headers: NO\n" " Extra dependencies: dl m pthread rt\n" " 3rdparty dependencies: libprotobuf ade libjpeg-turbo libwebp libpng libtiff libopenjp2 zlib quirc\n" "\n" " OpenCV modules:\n" " To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio\n" " Disabled: world\n" " Disabled by dependency: -\n" " Unavailable: java python2 python3\n" " Applications: tests perf_tests apps\n" " Documentation: NO\n" " Non-free algorithms: NO\n" "\n" " GUI: NONE\n" " GTK+: NO\n" "\n" " Media I/O: \n" " ZLib: build (ver 1.2.13)\n" " JPEG: libjpeg-turbo (ver 2.1.3-62)\n" " WEBP: build (ver encoder: 0x020f)\n" " PNG: build (ver 1.6.37)\n" " TIFF: build (ver 42 - 4.2.0)\n" " JPEG 2000: build (ver 2.4.0)\n" " HDR: YES\n" " SUNRASTER: YES\n" " PXM: YES\n" " PFM: YES\n" "\n" " Video I/O:\n" " DC1394: NO\n" " FFMPEG: NO\n" " avcodec: NO\n" " avformat: NO\n" " avutil: NO\n" " swscale: NO\n" " avresample: NO\n" " GStreamer: NO\n" " v4l/v4l2: YES (linux/videodev2.h)\n" "\n" " Parallel framework: none\n" "\n" " Trace: YES (built-in)\n" "\n" " Other third-party libraries:\n" " Lapack: NO\n" " Custom HAL: NO\n" " Protobuf: build (3.19.1)\n" "\n" " Python (for build): /usr/bin/python2.7\n" "\n" " Install to: /root/opencv_hat/opencv/install\n" "-----------------------------------------------------------------\n" "\n" 就是我本地环境以及安装了gtk2.0,但是执行命令时候检测还是没有,然后编译过了后,我获得那四个文件夹, 执行下面命令,但是还是报错,我main.cpp,就是加入了摄像头和imshow: riscv64-unknown-linux-gnu-g++ main.cpp -I/root/opencv_hat/opencv/install/include/opencv4 -L/root/opencv_hat/opencv/install/lib -lopencv_imgproc -lopencv_imgcodecs -lopencv_videoio -lopencv_highgui -L/root/opencv_hat/opencv/install/lib/opencv4/3rdparty/ -llibjpeg-turbo -llibwebp -llibpng -llibtiff -llibopenjp2 -lopencv_core -ldl -lpthread -lrt -lzlib -latomic -static -o my_example
收到,就是大佬我可以问一下吗 本地环境: wsl ubuntu20.04 就是我在编译opencv源码,然后就是我拉取的opencv4.7.0,交叉编译设置了交叉编译工具,那个cmake文件我也重新写了 set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(CMAKE_C_COMPILER riscv64-unknown-linux-gnu-gcc) set(CMAKE_CXX_COMPILER riscv64-unknown-linux-gnu-g++)
Don't run the linker on compiler check
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_C_FLAGS "-static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive") set(CMAKE_CXX_FLAGS "-static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive")
set(CMAKE_FIND_ROOT_PATH /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
输出信息 "\n" "General configuration for OpenCV 4.7.0 =====================================\n" " Version control: 4.7.0-dirty\n" "\n" " Platform:\n" " Timestamp: 2023-10-22T12:13:06Z\n" " Host: Linux 5.15.90.1-microsoft-standard-WSL2 x86_64\n" " Target: Linux riscv64\n" " CMake: 3.25.2\n" " CMake generator: Unix Makefiles\n" " CMake build tool: /usr/bin/make\n" " Configuration: Release\n" "\n" " CPU/HW features:\n" " Baseline:\n" " requested: DETECT\n" "\n" " C/C++:\n" " Built as dynamic libs?: NO\n" " C++ standard: 11\n" " C++ Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-g++ (ver 10.4.0)\n" " C++ flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" " C++ flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -DDEBUG -D_DEBUG\n" " C Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-gcc\n" " C flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG\n" " C flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -DDEBUG -D_DEBUG\n" " Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" " Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" " ccache: NO\n" " Precompiled headers: NO\n" " Extra dependencies: dl m pthread rt\n" " 3rdparty dependencies: libprotobuf ade libjpeg-turbo libwebp libpng libtiff libopenjp2 zlib quirc\n" "\n" " OpenCV modules:\n" " To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio\n" " Disabled: world\n" " Disabled by dependency: -\n" " Unavailable: java python2 python3\n" " Applications: tests perf_tests apps\n" " Documentation: NO\n" " Non-free algorithms: NO\n" "\n" " GUI: NONE\n" " GTK+: NO\n" "\n" " Media I/O: \n" " ZLib: build (ver 1.2.13)\n" " JPEG: libjpeg-turbo (ver 2.1.3-62)\n" " WEBP: build (ver encoder: 0x020f)\n" " PNG: build (ver 1.6.37)\n" " TIFF: build (ver 42 - 4.2.0)\n" " JPEG 2000: build (ver 2.4.0)\n" " HDR: YES\n" " SUNRASTER: YES\n" " PXM: YES\n" " PFM: YES\n" "\n" " Video I/O:\n" " DC1394: NO\n" " FFMPEG: NO\n" " avcodec: NO\n" " avformat: NO\n" " avutil: NO\n" " swscale: NO\n" " avresample: NO\n" " GStreamer: NO\n" " v4l/v4l2: YES (linux/videodev2.h)\n" "\n" " Parallel framework: none\n" "\n" " Trace: YES (built-in)\n" "\n" " Other third-party libraries:\n" " Lapack: NO\n" " Custom HAL: NO\n" " Protobuf: build (3.19.1)\n" "\n" " Python (for build): /usr/bin/python2.7\n" "\n" " Install to: /root/opencv_hat/opencv/install\n" "-----------------------------------------------------------------\n" "\n" 就是我本地环境以及安装了gtk2.0,但是执行命令时候检测还是没有,然后编译过了后,我获得那四个文件夹, 执行下面命令,但是还是报错,我main.cpp,就是加入了摄像头和imshow: riscv64-unknown-linux-gnu-g++ main.cpp -I/root/opencv_hat/opencv/install/include/opencv4 -L/root/opencv_hat/opencv/install/lib -lopencv_imgproc -lopencv_imgcodecs -lopencv_videoio -lopencv_highgui -L/root/opencv_hat/opencv/install/lib/opencv4/3rdparty/ -llibjpeg-turbo -llibwebp -llibpng -llibtiff -llibopenjp2 -lopencv_core -ldl -lpthread -lrt -lzlib -latomic -static -o my_example
不好意思,opencv 的东西我也不太清楚,给不了建设性意见。。。你可以在 opencv 的社区问问情况。 另外,我感觉可能是我的前面的回复误导你了。我之前用交叉编译是因为 riscv docker 本地环境没建好,被迫选的交叉编译。通常来说,能本地编译总是优先本地编译,交叉编译反而会遇到很多特定问题。
大佬就是我交叉编译还是没有gtk2.0,然后我现在是尝试在riscv docker容器中拉取官方的编译工具链,在编译,如果编译得到的库文件,可以用于开发板那个文件的编译吗,因为编译工具链版本不同,我现在编译的工具链是官方工具链,就是用大佬的那个交叉编译命令可以编译不带gtk2.0的,但是如果opencv c++调用摄像头和imshow操作就编译不过了
大佬就是我交叉编译还是没有gtk2.0,然后我现在是尝试在riscv docker容器中拉取官方的编译工具链,在编译,如果编译得到的库文件,可以用于开发板那个文件的编译吗,因为编译工具链版本不同,我现在编译的工具链是官方工具链,就是用大佬的那个交叉编译命令可以编译不带gtk2.0的,但是如果opencv c++调用摄像头和imshow操作就编译不过了
不同工具链编译出来的动态库 so 是可以混用的。静态库 .a 最好不要混用
大佬,请求help,就是我交叉编译opencv源码,我先交叉编译了opencv的依赖库,我就是想把所有代码都用c++写,所以就是想要调用videocapture和imshow,但是哪个prebuilt_opencv应该没有加入那个,然后我尝试了一个星期,查找资料,然后把依赖库都编译好了,然后但是编译还是报错,下面是报错信息(大佬可以编译一个带可以使用摄像头和imshow的吗,求求大佬了):
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x9e): undefined reference to
av_hwdevice_get_type_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB121': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0xb8): undefined reference to
av_hwdevice_ctx_create'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L1920': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x30e): undefined reference to
av_hwdevice_get_type_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L1873': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x562): undefined reference to
av_hwdevice_get_type_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L1876': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x578): undefined reference to
av_hwdevice_ctx_create_derived'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x58c): undefined reference to
av_buffer_unref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB137': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x62e): undefined reference to
av_buffer_unref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L1884': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x64c): undefined reference to
av_hwdevice_get_type_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB142': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x72c): undefined reference to
av_buffer_unref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB149': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x8f8): undefined reference to
av_buffer_ref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2130': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x3fc): undefined reference to
av_dict_get'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x778): undefined reference to
av_dict_get'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB183': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x80c): undefined reference to
av_dict_get'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0xa04): undefined reference to
av_dict_get'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xa0): undefined reference to av_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3248':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb0): undefined reference to av_log_set_callback' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB221':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x64c): undefined reference to avformat_network_init' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x6aa): undefined reference to av_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB232':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x956): undefined reference to avformat_alloc_context' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB234':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9ae): undefined reference to av_dict_parse_string' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2630':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9c6): undefined reference to av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3261':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9d2): undefined reference to av_find_input_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9e2): undefined reference to
avformat_open_input'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2649': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9f4): undefined reference to
avformat_find_stream_info'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb3a): undefined reference to
av_frame_alloc'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2686': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb6c): undefined reference to
av_stream_get_side_data'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb76): undefined reference to av_display_rotation_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB237':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xc82): undefined reference to av_dict_set' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xda6): undefined reference to av_strerror' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x128c): undefined reference to
av_hwdevice_find_type_by_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2716': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13ca): undefined reference to
av_codec_iterate'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2719': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13d8): undefined reference to
av_codec_is_decoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2722': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13fe): undefined reference to
av_codec_is_encoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x140c): undefined reference to avcodec_get_hw_config' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2729':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1440): undefined reference to avcodec_default_get_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2732':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1452): undefined reference to av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB255':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x14a6): undefined reference to av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHE255':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x14d4): undefined reference to avcodec_open2' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2793':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x16fe): undefined reference to av_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ':
cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1750): undefined reference to av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x17f2): undefined reference to
avcodec_find_decoder_by_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L2825': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x195c): undefined reference to
avcodec_find_decoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN2cv32cvCreateFileCapture_FFMPEG_proxyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_22VideoCaptureParametersE+0xba): undefined reference to
av_init_packet'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN2cv32cvCreateFileCapture_FFMPEG_proxyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_22VideoCaptureParametersE+0x130): undefined reference to av_init_packet' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xbc): undefined reference to
av_log_set_level'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L4095': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcc): undefined reference to
av_log_set_callback'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x3d4): undefined reference to
avformat_network_init'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x432): undefined reference to av_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3458':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x58c): undefined reference to av_guess_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3477':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x5de): undefined reference to av_get_pix_fmt_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB302':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x646): undefined reference to av_codec_get_id' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3520':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x70c): undefined reference to av_codec_get_tag' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x778): undefined reference to avformat_alloc_context' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x7a0): undefined reference to
av_malloc'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB312': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xbd4): undefined reference to
avformat_new_stream'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xc84): undefined reference to
av_dict_parse_string'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xde8): undefined reference to av_hwdevice_find_type_by_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3556':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xdfc): undefined reference to av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB320':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe2a): undefined reference to av_codec_iterate' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe38): undefined reference to
av_codec_is_encoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3563': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe60): undefined reference to
av_codec_is_encoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe6c): undefined reference to avcodec_get_hw_config' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3573':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xeec): undefined reference to avcodec_get_context_defaults3' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3594':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xfae): undefined reference to av_sub_q' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3605':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1052): undefined reference to av_opt_set' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1096): undefined reference to
av_buffer_ref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3613': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x10f2): undefined reference to
avcodec_open2'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3633': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1232): undefined reference to
av_buffer_unref'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1240): undefined reference to av_dict_free' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1262): undefined reference to
av_malloc'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB321': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x128c): undefined reference to
av_frame_alloc'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12b0): undefined reference to
av_image_get_buffer_size'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12da): undefined reference to avio_open' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12ec): undefined reference to
avformat_write_header'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3656': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1426): undefined reference to
av_codec_is_encoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3706': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x146a): undefined reference to
avcodec_find_encoder'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3562': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17a4): undefined reference to
avformat_get_riff_video_tags'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L3561': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17b0): undefined reference to
avformat_get_mov_video_tags'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L4127': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17c2): undefined reference to
av_codec_get_id'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L4128': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1816): undefined reference to
avcodec_descriptor_get_by_name'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .L4102': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1b7e): undefined reference to
av_image_fill_arrays'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function .LEHB330': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1b9e): undefined reference to
av_frame_alloc'
/root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1bc0): undefined reference to av_image_get_buffer_size' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3505':
cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1bd2): undefined reference to av_free' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.L354':
cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0xe8): undefined reference to cv::imdecode(cv::_InputArray const&, int)' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.LEHB28':
cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0x11c): undefined reference to cv::operator*(cv::Mat const&, double)' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.LEHB31':
cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0x180): undefined reference to `cv::operator*(cv::Mat const&, double)'
collect2: error: ld returned 1 exit status
"\n" "General configuration for OpenCV 4.5.4-dev =====================================\n" " Version control: unknown\n" "\n" " Platform:\n" " Timestamp: 2023-10-25T09:37:56Z\n" " Host: Linux 5.15.90.1-microsoft-standard-WSL2 x86_64\n" " Target: Linux riscv64\n" " CMake: 3.25.2\n" " CMake generator: Unix Makefiles\n" " CMake build tool: /usr/bin/make\n" " Configuration: Release\n" "\n" " CPU/HW features:\n" " Baseline:\n" " requested: RVV\n" " Dispatched code generation:\n" " requested: RVV\n" "\n" " C/C++:\n" " Built as dynamic libs?: NO\n" " C++ standard: 11\n" " C++ Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-g++ (ver 10.4.0)\n" " C++ flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" " C++ flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -DDEBUG -D_DEBUG\n" " C Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-gcc\n" " C flags (Release): -Wl,-rpath-link=/root/opencv_hat/riscv64/opencv-depend/lib -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG\n" " C flags (Debug): -Wl,-rpath-link=/root/opencv_hat/riscv64/opencv-depend/lib -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -DDEBUG -D_DEBUG\n" " Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed \n" " Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed \n" " ccache: NO\n" " Precompiled headers: NO\n" " Extra dependencies: /root/opencv_hat/OpenCV/build/3rdparty/lib/libcsi_cv.a dl m pthread rt\n" " 3rdparty dependencies: libprotobuf ade libjpeg-turbo libwebp libpng libtiff libopenjp2 zlib quirc\n" "\n" " OpenCV modules:\n" " To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio\n" " Disabled: world\n" " Disabled by dependency: -\n" " Unavailable: java python2 python3\n" " Applications: tests perf_tests apps\n" " Documentation: NO\n" " Non-free algorithms: NO\n" "\n" " GUI: NONE\n" " GTK+: NO\n" "\n" " Media I/O: \n" " ZLib: zlib (ver 1.2.11)\n" " JPEG: libjpeg-turbo (ver 2.1.0-62)\n" " WEBP: build (ver encoder: 0x020f)\n" " PNG: build (ver 1.6.37)\n" " TIFF: build (ver 42 - 4.2.0)\n" " JPEG 2000: build (ver 2.4.0)\n" " HDR: YES\n" " SUNRASTER: YES\n" " PXM: YES\n" " PFM: YES\n" "\n" " Video I/O:\n" " FFMPEG: YES\n" " avcodec: YES (58.54.100)\n" " avformat: YES (58.29.100)\n" " avutil: YES (56.31.100)\n" " swscale: YES (5.5.100)\n" " avresample: NO\n" " GStreamer: NO\n" " v4l/v4l2: YES (linux/videodev2.h)\n" "\n" " Parallel framework: none\n" "\n" " Trace: YES (built-in)\n" "\n" " Other third-party libraries:\n" " Lapack: NO\n" " Custom HAL: YES (csi-cv (ver 0.0.1))\n" " Protobuf: build (3.19.1)\n" "\n" " Python (for build): /usr/bin/python2.7\n" "\n" " Install to: /root/opencv_hat/OpenCV/install\n" "-----------------------------------------------------------------\n" "\n"
大佬,请求help,就是我交叉编译opencv源码,我先交叉编译了opencv的依赖库,我就是想把所有代码都用c++写,所以就是想要调用videocapture和imshow,但是哪个prebuilt_opencv应该没有加入那个,然后我尝试了一个星期,查找资料,然后把依赖库都编译好了,然后但是编译还是报错,下面是报错信息(大佬可以编译一个带可以使用摄像头和imshow的吗,求求大佬了): /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x9e): undefined reference to
av_hwdevice_get_type_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB121': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0xb8): undefined reference to
av_hwdevice_ctx_create' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L1920': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x30e): undefined reference to
av_hwdevice_get_type_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L1873': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x562): undefined reference to
av_hwdevice_get_type_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L1876': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x578): undefined reference to
av_hwdevice_ctx_create_derived' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x58c): undefined reference to
av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB137': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x62e): undefined reference to
av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L1884': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x64c): undefined reference to
av_hwdevice_get_type_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB142': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x72c): undefined reference to
av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB149': cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb.constprop.0+0x8f8): undefined reference to
av_buffer_ref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2130': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x3fc): undefined reference to
av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x778): undefined reference to
av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB183': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x80c): undefined reference to
av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0xa04): undefined reference to
av_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xa0): undefined reference toav_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3248': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb0): undefined reference toav_log_set_callback' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB221': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x64c): undefined reference toavformat_network_init' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x6aa): undefined reference toav_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB232': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x956): undefined reference toavformat_alloc_context' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB234': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9ae): undefined reference toav_dict_parse_string' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2630': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9c6): undefined reference toav_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3261': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9d2): undefined reference toav_find_input_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9e2): undefined reference to
avformat_open_input' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2649': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x9f4): undefined reference to
avformat_find_stream_info' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb3a): undefined reference to
av_frame_alloc' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2686': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb6c): undefined reference to
av_stream_get_side_data' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xb76): undefined reference toav_display_rotation_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB237': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xc82): undefined reference toav_dict_set' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xda6): undefined reference toav_strerror' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x128c): undefined reference to
av_hwdevice_find_type_by_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2716': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13ca): undefined reference to
av_codec_iterate' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2719': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13d8): undefined reference to
av_codec_is_decoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2722': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x13fe): undefined reference to
av_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x140c): undefined reference toavcodec_get_hw_config' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2729': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1440): undefined reference toavcodec_default_get_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2732': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1452): undefined reference toav_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB255': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x14a6): undefined reference toav_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHE255': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x14d4): undefined reference toavcodec_open2' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L2793': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x16fe): undefined reference toav_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1750): undefined reference toav_dict_get' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x17f2): undefined reference to
avcodec_find_decoder_by_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L2825': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x195c): undefined reference to
avcodec_find_decoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN2cv32cvCreateFileCapture_FFMPEG_proxyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_22VideoCaptureParametersE+0xba): undefined reference to
av_init_packet' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN2cv32cvCreateFileCapture_FFMPEG_proxyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_22VideoCaptureParametersE+0x130): undefined reference toav_init_packet' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xbc): undefined reference to
av_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L4095': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcc): undefined reference to
av_log_set_callback' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x3d4): undefined reference to
avformat_network_init' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x432): undefined reference toav_log_set_level' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3458': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x58c): undefined reference toav_guess_format' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3477': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x5de): undefined reference toav_get_pix_fmt_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB302': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x646): undefined reference toav_codec_get_id' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3520': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x70c): undefined reference toav_codec_get_tag' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x778): undefined reference toavformat_alloc_context' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x7a0): undefined reference to
av_malloc' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB312': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xbd4): undefined reference to
avformat_new_stream' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xc84): undefined reference to
av_dict_parse_string' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xde8): undefined reference toav_hwdevice_find_type_by_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3556': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xdfc): undefined reference toav_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.LEHB320': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe2a): undefined reference toav_codec_iterate' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe38): undefined reference to
av_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3563': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe60): undefined reference to
av_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe6c): undefined reference toavcodec_get_hw_config' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3573': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xeec): undefined reference toavcodec_get_context_defaults3' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3594': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xfae): undefined reference toav_sub_q' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3605': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1052): undefined reference toav_opt_set' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1096): undefined reference to
av_buffer_ref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3613': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x10f2): undefined reference to
avcodec_open2' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3633': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1232): undefined reference to
av_buffer_unref' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1240): undefined reference toav_dict_free' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1262): undefined reference to
av_malloc' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB321': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x128c): undefined reference to
av_frame_alloc' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L0 ': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12b0): undefined reference to
av_image_get_buffer_size' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12da): undefined reference toavio_open' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12ec): undefined reference to
avformat_write_header' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3656': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1426): undefined reference to
av_codec_is_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3706': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x146a): undefined reference to
avcodec_find_encoder' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3562': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17a4): undefined reference to
avformat_get_riff_video_tags' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L3561': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17b0): undefined reference to
avformat_get_mov_video_tags' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L4127': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x17c2): undefined reference to
av_codec_get_id' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L4128': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1816): undefined reference to
avcodec_descriptor_get_by_name' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.L4102': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1b7e): undefined reference to
av_image_fill_arrays' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function.LEHB330': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1b9e): undefined reference to
av_frame_alloc' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1bc0): undefined reference toav_image_get_buffer_size' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
.L3505': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1bd2): undefined reference toav_free' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.L354': cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0xe8): undefined reference tocv::imdecode(cv::_InputArray const&, int)' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.LEHB28': cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0x11c): undefined reference tocv::operator*(cv::Mat const&, double)' /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../prebuilt_opencv/lib/libopencv_videoio.a(cap_obsensor_capture.cpp.o): in function
.LEHB31': cap_obsensor_capture.cpp:(.text._ZN2cv21VideoCapture_obsensor13retrieveFrameEiRKNS_12_OutputArrayE+0x180): undefined reference to `cv::operator*(cv::Mat const&, double)' collect2: error: ld returned 1 exit status"\n" "General configuration for OpenCV 4.5.4-dev =====================================\n" " Version control: unknown\n" "\n" " Platform:\n" " Timestamp: 2023-10-25T09:37:56Z\n" " Host: Linux 5.15.90.1-microsoft-standard-WSL2 x86_64\n" " Target: Linux riscv64\n" " CMake: 3.25.2\n" " CMake generator: Unix Makefiles\n" " CMake build tool: /usr/bin/make\n" " Configuration: Release\n" "\n" " CPU/HW features:\n" " Baseline:\n" " requested: RVV\n" " Dispatched code generation:\n" " requested: RVV\n" "\n" " C/C++:\n" " Built as dynamic libs?: NO\n" " C++ standard: 11\n" " C++ Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-g++ (ver 10.4.0)\n" " C++ flags (Release): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" " C++ flags (Debug): -static -march=rv64imafdcxtheadc -mabi=lp64d -mtune=c920 -O3 -Wl,-whole-archive -lpthread -Wl,-no-whole-archive -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -DDEBUG -D_DEBUG\n" " C Compiler: /root/opencv_hat/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-rc3/bin/riscv64-unknown-linux-gnu-gcc\n" " C flags (Release): -Wl,-rpath-link=/root/opencv_hat/riscv64/opencv-depend/lib -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG\n" " C flags (Debug): -Wl,-rpath-link=/root/opencv_hat/riscv64/opencv-depend/lib -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-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 -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -DDEBUG -D_DEBUG\n" " Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed \n" " Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed \n" " ccache: NO\n" " Precompiled headers: NO\n" " Extra dependencies: /root/opencv_hat/OpenCV/build/3rdparty/lib/libcsi_cv.a dl m pthread rt\n" " 3rdparty dependencies: libprotobuf ade libjpeg-turbo libwebp libpng libtiff libopenjp2 zlib quirc\n" "\n" " OpenCV modules:\n" " To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio\n" " Disabled: world\n" " Disabled by dependency: -\n" " Unavailable: java python2 python3\n" " Applications: tests perf_tests apps\n" " Documentation: NO\n" " Non-free algorithms: NO\n" "\n" " GUI: NONE\n" " GTK+: NO\n" "\n" " Media I/O: \n" " ZLib: zlib (ver 1.2.11)\n" " JPEG: libjpeg-turbo (ver 2.1.0-62)\n" " WEBP: build (ver encoder: 0x020f)\n" " PNG: build (ver 1.6.37)\n" " TIFF: build (ver 42 - 4.2.0)\n" " JPEG 2000: build (ver 2.4.0)\n" " HDR: YES\n" " SUNRASTER: YES\n" " PXM: YES\n" " PFM: YES\n" "\n" " Video I/O:\n" " FFMPEG: YES\n" " avcodec: YES (58.54.100)\n" " avformat: YES (58.29.100)\n" " avutil: YES (56.31.100)\n" " swscale: YES (5.5.100)\n" " avresample: NO\n" " GStreamer: NO\n" " v4l/v4l2: YES (linux/videodev2.h)\n" "\n" " Parallel framework: none\n" "\n" " Trace: YES (built-in)\n" "\n" " Other third-party libraries:\n" " Lapack: NO\n" " Custom HAL: YES (csi-cv (ver 0.0.1))\n" " Protobuf: build (3.19.1)\n" "\n" " Python (for build): /usr/bin/python2.7\n" "\n" " Install to: /root/opencv_hat/OpenCV/install\n" "-----------------------------------------------------------------\n" "\n"
我也不懂 opencv 的东西。。。推荐你去 opencv 社区问问
好的,大佬,我在试试,那个大佬,hhb4tools/hhb2.6比hb2.4有什么提升,npu优化计算速度越来越快吗 我发现确实快好多,我现在用的都是大佬最新更新的2.6,npu驱动匹配后,现在那个检测帧率也上来了,我再摸索一下去编译opencv,纯c++版本应该会快不少
好的,大佬,我在试试,那个大佬,hhb4tools/hhb2.6比hb2.4有什么提升,npu优化计算速度越来越快吗 我发现确实快好多,我现在用的都是大佬最新更新的2.6,npu驱动匹配后,现在那个检测帧率也上来了,我再摸索一下去编译opencv,纯c++版本应该会快不少
额。其实 2.6 没修改 NPU 性能相关的东西。。。2.6 主要是做了新型号 CPU 的适配,以及让 onnxruntime 支持了 npu 执行。
十分感谢大佬的回复,学到了。 1、第一个疑问:那个修改输入尺寸,我训练640*640转384 640对训练的模型效果影响大吗,下面是我百度到的,我刚刚量化以及转换都效果还行,用的官方模型,还没实验自己的 在YOLOv5中使用export.py修改模型输入尺寸可能会对模型的性能和准确性产生影响。模型的输入尺寸通常在训练过程中确定,并且模型对于特定尺寸的输入图像进行了优化。 2、第二个疑问: 当前环境: 20230920 debian镜像 licheepi 4a yolov5n模型按照大佬转换为onnx时候改了尺寸,其他命令都没修改 还是会报之前的下面错误,但是标定框运行正常,这个是不是硬件的问题,还是说我的licheepi 4a有问题, FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument)
ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ./yolov5n_example ./shl.hhb.bm image_preprocessed.bin INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 13.20488ms, FPS=75.73 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 11.86316ms, FPS=84.29 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 ** draw bbox ** [273.492188, 161.245056, 359.559814, 330.644257, 0.895277, 0] [79.860062, 179.181244, 190.755692, 354.304474, 0.887368, 0] [222.054565, 224.4776, 279.828979, 333.717285, 0.815214, 0] [67.62558, 173.948883, 201.687988, 219.065765, 0.563324, 33] (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n#
驱动的问题在1023的镜像中已经解决,新镜像已经上传到百度网盘中,若手上有容量大于 8G emmc 的开发板,可以直接烧录 FULL 压缩包的镜像,默认已配置好AI环境,可直接测试HHB编译出来的可执行文件。
是的,我那天测试用的是1023镜像,速度提升不少,后续我把代码提交到仓库,我现在是图像预处理和图像标签显示都用c++,本来想所以都用c++写,那个编译opencv C++版本加入ffmpeg和gtk2.0还在摸索
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年10月30日 15:24 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [zhangwm-pt/hhb-examples] 询问一个关于模型量化问题 (Issue #1) |
十分感谢大佬的回复,学到了。 1、第一个疑问:那个修改输入尺寸,我训练640*640转384 640对训练的模型效果影响大吗,下面是我百度到的,我刚刚量化以及转换都效果还行,用的官方模型,还没实验自己的 在YOLOv5中使用export.py修改模型输入尺寸可能会对模型的性能和准确性产生影响。模型的输入尺寸通常在训练过程中确定,并且模型对于特定尺寸的输入图像进行了优化。 2、第二个疑问: 当前环境: 20230920 debian镜像 licheepi 4a yolov5n模型按照大佬转换为onnx时候改了尺寸,其他命令都没修改 还是会报之前的下面错误,但是标定框运行正常,这个是不是硬件的问题,还是说我的licheepi 4a有问题, FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument)
ort) @.:/home/sipeed/Desktop/udisk/yolov5n# ./yolov5n_example ./shl.hhb.bm image_preprocessed.bin INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 13.20488ms, FPS=75.73 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 (ort) @.:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:792000 [kHz] INFO: Heap :ocm (0x18) INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) FATAL: Importing 737280 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 11.86316ms, FPS=84.29 detect num: 4 id: label score x1 y1 x2 y2 [0]: 0 0.895277 273.492188 161.245056 359.559814 330.644257 [1]: 0 0.887368 79.860062 179.181244 190.755692 354.304474 [2]: 0 0.815214 222.054565 224.477600 279.828979 333.717285 [3]: 33 0.563324 67.625580 173.948883 201.687988 219.065765 ** draw bbox ** [273.492188, 161.245056, 359.559814, 330.644257, 0.895277, 0] [79.860062, 179.181244, 190.755692, 354.304474, 0.887368, 0] [222.054565, 224.4776, 279.828979, 333.717285, 0.815214, 0] [67.62558, 173.948883, 201.687988, 219.065765, 0.563324, 33] (ort) @.***:/home/sipeed/Desktop/udisk/yolov5n#
驱动的问题在1023的镜像中已经解决,新镜像已经上传到百度网盘中,若手上有容量大于 8G emmc 的开发板,可以直接烧录 FULL 压缩包的镜像,默认已配置好AI环境,可直接测试HHB编译出来的可执行文件。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
我的设备环境: licheepi 4a debian20230920最新镜像 HHB环境:docker的 hhb4tools/hhb:2.4.5 这是那个sipeed文档里面的量化命令: hhb -D --model-file yolov5n.onnx --data-scale-div 255 --board th1520 --input-name "images" --output-name "/model.24/m.0/Conv_output_0;/model.24/m.1/Conv_output_0;/model.24/m.2/Conv_output_0" --input-shape "1 3 384 640" --calibrate-dataset kite.jpg --quantization-scheme "int8_asym" 我先按照文档测试的yolov5n模型,然后执行命令失败,我通过netron查看模型输入尺寸我就把--input-shape "1 3 384 640" 修改为--input-shape "1 3 640640" ,然后量化成功了,然后我将整个文件夹拷贝到开发板,确认npu驱动是挂载成功的。 下面这些是报错信息,但是可以通过,我看是cpu内存报错,是我硬件问题还是我量化的问题,我有点摸不着头脑,量化时候,命令是没有任何报错信息的,然后这个运行可以通过,但是会cpu报错,然后帧率也比文档说明的帧率会低一些,因为我使用cpu去进行模型推理,帧率不太高,甚至比较卡,所以想这npu推理会快一些。 我的问题是:是我硬件问题还是我量化的问题,我有点摸不着头脑,大佬可以提供一个思路吗 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ls coco.names hhb_out image_preprocessed.tensor kite.jpg shl.hhb.bm yolov5n.c yolov5n_example detect.txt image_preprocessed.bin inference.py kite_result.jpg soccer.jpg yolov5n.onnx (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:1001624 [kHz] INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) WARNING: Mapping to the on chip ram failed (128 > 0), continuing... FATAL: Importing 1228800 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 15.32188ms, FPS=65.27 detect num: 3 id: label score x1 y1 x2 y2 [0]: 0 0.840377 143.673843 124.767212 324.287476 510.595825 [1]: 32 0.793254 190.266235 465.577087 247.116486 514.476807 [2]: 0 0.645619 219.326797 159.139938 537.784119 510.424500 ** draw bbox ** [143.673843, 124.767212, 324.287476, 510.595825, 0.840377, 0] [190.266235, 465.577087, 247.116486, 514.476807, 0.793254, 32] [219.326797, 159.139938, 537.784119, 510.4245, 0.645619, 0] (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# lsmod Module Size Used by vha_info 90112 0 vha 811008 1 vha_info img_mem 696320 1 vha snd_usb_audio 1609728 0 uvcvideo 778240 0 snd_hwdep 65536 1 snd_usb_audio snd_usbmidi_lib 204800 1 snd_usb_audio videobuf2_vmalloc 57344 1 uvcvideo snd_rawmidi 241664 1 snd_usbmidi_lib binfmt_misc 81920 1 pvrsrvkm 8572928 17 dwc3 2457600 0 roles 40960 1 dwc3 galcore 3166208 0 dwc3_thead 36864 0 vc8000 618496 0 memalloc 28672 0 hantrodec 888832 0 vidmem 139264 0 (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# python3 inference.py ** preprocess image ** run yolov5 and postprocess INFO: NNA clock:1001624 [kHz] INFO: Heap :anonymous (0x2) INFO: Heap :dmabuf (0x2) INFO: Heap :unified (0x5) WARNING: Mapping to the on chip ram failed (128 > 0), continuing... FATAL: Importing 1228800 bytes of CPU memory has failed (Invalid argument) Run graph execution time: 15.16949ms, FPS=65.92 detect num: 3 id: label score x1 y1 x2 y2 [0]: 0 0.840377 143.673843 124.767212 324.287476 510.595825 [1]: 32 0.793254 190.266235 465.577087 247.116486 514.476807 [2]: 0 0.645619 219.326797 159.139938 537.784119 510.424500 ** draw bbox ** [143.673843, 124.767212, 324.287476, 510.595825, 0.840377, 0] [190.266235, 465.577087, 247.116486, 514.476807, 0.793254, 32] [219.326797, 159.139938, 537.784119, 510.4245, 0.645619, 0] (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n# ^C (ort) root@lpi4a:/home/sipeed/Desktop/udisk/yolov5n#