运行rknn_yolov5_demo遇到的问题
板子: 3568j 系统: ubutnu18.04linux交叉编译器: https://gitlab.com/firefly-linux/prebuilts/gcc/linux-x86/aarch64/gcc-buildroot-9.3.0-2020.03-x86_64_aarch64-rockchip-linux-gnu
Demo:https://github.com/rockchip-linux/rknpu2/tree/master/examples/rknn_yolov5_demo
运行命令: ./build/build_linux_aarch64/rknn_yolov5_demo ./model/RK356X/yolov5s-640-640.rknn ./model/bus.jpg
PC端交叉编译成功,在板子运行时出现如下错误:
./build/build_linux_aarch64/rknn_yolov5_demo: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./build/build_linux_aarch64/rknn_yolov5_demo)
请问有什么好的解决方案?
你的交叉编译工具使用了 2.29 版本的C库,而板子的ubuntu18最高只有 2.28
将板子的系统换成 ubuntu20 就能解决 本帖最后由 antwhite 于 2022-3-31 10:38 编辑
Liuth 发表于 2022-3-31 10:16
你的交叉编译工具使用了 2.29 版本的C库,而板子的ubuntu18最高只有 2.28
将板子的系统换成 ubuntu20 就能 ...
多谢您的解答. 明白了.
解决方案:就是交叉编译工具用2.29版本的C库, 板子重新烧个ubuntu20.
但我想请问下有和板子ubtun18.04对应的, 交叉编译工具? 这样我只用重新交叉编译下代码就行.
我现在用的编译工具是: gcc-buildroot-9.3.0-2020.03-x86_64_aarch64-rockchip-linux-gnu
有 https://gitlab.com/firefly-linux/prebuilts/gcc/linux-x86/aarch64
用那个 linaro-6.3.1 就可以 本帖最后由 antwhite 于 2022-3-31 18:15 编辑
Liuth 发表于 2022-3-31 14:19
有 https://gitlab.com/firefly-linux/prebuilts/gcc/linux-x86/aarch64
用那个 linaro-6.3.1 就可以
多谢, 用这个交叉编译成功了.
但出现了新的问题.
github上有人遇到了相似了问题,提供的解决方案是删除rga相关代码. 我想是否有更优的解决方案?
https://github.com/rockchip-linux/rknpu2/issues/12
user@firefly:~/work/rknn_yolov5_demo_Linux$ export LD_LIBRARY_PATH=./lib
user@firefly:~/work/rknn_yolov5_demo_Linux$ sudo ./rknn_yolov5_demo model/RK356X/yolov5s-640-640.rknn model/bus.jpg
Rga built version:06fc7c4
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Read model/bus.jpg ...
img width = 640, img height = 640
Loading mode...
sdk version: 1.2.0 (9db21b35d@2022-01-14T15:16:23) driver version: 0.4.2
model input num: 1, output num: 3
index=0, name=images, n_dims=4, dims=, n_elems=1228800, size=1228800, fmt=NHWC, type=UINT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=0, name=output, n_dims=5, dims=, n_elems=1632000, size=1632000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=77, scale=0.080445
index=1, name=371, n_dims=5, dims=, n_elems=408000, size=408000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=56, scale=0.080794
index=2, name=390, n_dims=5, dims=, n_elems=102000, size=102000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=69, scale=0.081305
model is NHWC input fmt
model input height=640, width=640, channel=3
./rknn_yolov5_demo: symbol lookup error: ./rknn_yolov5_demo: undefined symbol: wrapbuffer_virtualaddr_t
注释掉rga相关的代码可以运行成功.运行结果如下:
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Read model/bus.jpg ...
img width = 640, img height = 640
Loading mode...
sdk version: 1.2.0 (9db21b35d@2022-01-14T15:16:23) driver version: 0.4.2
model input num: 1, output num: 3
index=0, name=images, n_dims=4, dims=, n_elems=1228800, size=1228800, fmt=NHWC, type=UINT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=0, name=output, n_dims=5, dims=, n_elems=1632000, size=1632000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=77, scale=0.080445
index=1, name=371, n_dims=5, dims=, n_elems=408000, size=408000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=56, scale=0.080794
index=2, name=390, n_dims=5, dims=, n_elems=102000, size=102000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=69, scale=0.081305
model is NHWC input fmt
model input height=640, width=640, channel=3
once run use 65.124000 ms
loadLabelName ./model/coco_80_labels_list.txt
loop count = 10 , average run78.907700 ms
使用 NPU_SDK 里面 examples/3rdparty/rga 里面的 librga.so 替换掉板子里面的 librga.so.2 试试 我也遇到了这个问题,报错:./rknn_yolov5_demo: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./build/build_linux_aarch64/rknn_yolov5_demo),按照上面的解决方法尝试后问题并没有解决,报错也并未改变
页:
[1]