Toybrick

标题: rk1808M0计算棒,failed to dlopen /usr/lib/libdrm.so Segmentation fault [打印本页]

作者: lfb6054    时间: 2022-11-17 15:51
标题: rk1808M0计算棒,failed to dlopen /usr/lib/libdrm.so Segmentation fault
现在遇到一个问题,rk1808M0计算棒,在主动模式下,编译了官方 rknpu 下rk180x的代码,模型可以读取,但是运行的时候发生了以下报错,

root@debian10:/home/toybrick/rknn_demo/install/rknn_yolov5_demo# ./rknn_yolov5_demo  /home/toybrick/rknn_demo/model/rk180x/yolov5s_relu_rk180x_out_opt.rknn  /home/toybrick/rknn_demo/model/bus.bmp
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Loading mode...
librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131)
sdk version: librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131) driver version: 6.4.6.5.351518
model input num: 1, output num: 3
  index=0, name=images_165, n_dims=4, dims=[1, 3, 640, 640], n_elems=1228800, size=1228800, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=0, scale=0.003922
  index=0, name=Conv_Conv_159/out0_0, n_dims=4, dims=[1, 255, 80, 80], n_elems=1632000, size=1632000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=187, scale=0.127843
  index=1, name=Conv_Conv_160/out0_1, n_dims=4, dims=[1, 255, 40, 40], n_elems=408000, size=408000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=182, scale=0.113217
  index=2, name=Conv_Conv_161/out0_2, n_dims=4, dims=[1, 255, 20, 20], n_elems=102000, size=102000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=172, scale=0.103272
model is NCHW input fmt
model input height=640, width=640, channel=3
failed to dlopen /usr/lib/libdrm.so
Segmentation fault


有么有遇到相同问题的哥哥们??希望得到您的解答,万分感谢。

作者: jefferyzhang    时间: 2022-11-18 09:08
不要用root用户跑程序
作者: lfb6054    时间: 2022-11-18 09:16
jefferyzhang 发表于 2022-11-18 09:08
不要用root用户跑程序

好的我试下,谢谢啦

作者: lfb6054    时间: 2022-11-18 10:05
jefferyzhang 发表于 2022-11-18 09:08
不要用root用户跑程序

您好,我重新编译了一下,发现还是这样,求大佬指点迷津.

toybrick@debian10:~/rknn/rknn_yolov5_demo$ ./run_rk180x.sh
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Loading mode...
librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131)
sdk version: librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131) driver version: 6.4.6.5.351518
model input num: 1, output num: 3
  index=0, name=images_165, n_dims=4, dims=[1, 3, 640, 640], n_elems=1228800, size=1228800, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=0, scale=0.003922
  index=0, name=Conv_Conv_159/out0_0, n_dims=4, dims=[1, 255, 80, 80], n_elems=1632000, size=1632000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=187, scale=0.127843
  index=1, name=Conv_Conv_160/out0_1, n_dims=4, dims=[1, 255, 40, 40], n_elems=408000, size=408000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=182, scale=0.113217
  index=2, name=Conv_Conv_161/out0_2, n_dims=4, dims=[1, 255, 20, 20], n_elems=102000, size=102000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=172, scale=0.103272
model is NCHW input fmt
model input height=640, width=640, channel=3
failed to dlopen /usr/lib/libdrm.so
./run_rk180x.sh: line 4: 25349 Segmentation fault      ./rknn_yolov5_demo model/${chip_dir}/yolov5s_relu_rk180x_out_opt.rknn model/bus.bmp

toybrick@debian10:~/rknn/rknn_yolov5_demo$ ./rknn_yolov5_demo
Usage: ./rknn_yolov5_demo <rknn model> <bmp>
toybrick@debian10:~/rknn/rknn_yolov5_demo$ ./rknn_yolov5_demo model/rk180x/yolov5s_relu_rk180x_out_opt.rknn model/bus.bmp
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Loading mode...
librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131)
sdk version: librknn_runtime version 1.7.1 (97198ce build: 2021-11-24 09:04:55 base: 1131) driver version: 6.4.6.5.351518
model input num: 1, output num: 3
  index=0, name=images_165, n_dims=4, dims=[1, 3, 640, 640], n_elems=1228800, size=1228800, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=0, scale=0.003922
  index=0, name=Conv_Conv_159/out0_0, n_dims=4, dims=[1, 255, 80, 80], n_elems=1632000, size=1632000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=187, scale=0.127843
  index=1, name=Conv_Conv_160/out0_1, n_dims=4, dims=[1, 255, 40, 40], n_elems=408000, size=408000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=182, scale=0.113217
  index=2, name=Conv_Conv_161/out0_2, n_dims=4, dims=[1, 255, 20, 20], n_elems=102000, size=102000, fmt=NCHW, type=UINT8, qnt_type=AFFINE, zp=172, scale=0.103272
model is NCHW input fmt
model input height=640, width=640, channel=3
failed to dlopen /usr/lib/libdrm.so
Segmentation fault
toybrick@debian10:~/rknn/rknn_yolov5_demo$ ls
lib  model  rknn_yolov5_demo  run_rk180x.sh  run_rv1109_rv1126.sh
toybrick@debian10:~/rknn/rknn_yolov5_demo$

作者: jefferyzhang    时间: 2022-11-18 10:15
sudo apt install libdrm
作者: lfb6054    时间: 2022-11-18 10:46
jefferyzhang 发表于 2022-11-18 10:15
sudo apt install libdrm

需要换源么?

root@debian10:/home/toybrick# apt install libdrm2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libdrm2 is already the newest version (2.4.97-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@debian10:/home/toybrick# apt install libdrm
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package libdrm
作者: jefferyzhang    时间: 2022-11-18 11:49
为什么是libdrm2 ?
你可以先apt search下这个包名字再install




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3