问题分析及记录../sysdeps/x86_64/multiarch/../memcpy.S: 没有那个文件或目录.
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
在Linux的项目开发中,今天运行程序时出现:./sysdeps/x86_64/multiarch/../memcpy.S:没有文件或目录错误。该程序是进行人脸检测的,其有用到gtk、sdl库,因为我虚拟机已经有sdl2版本的库,所以很快就编译过了,但是运行却出错了,段错误。
折腾了一下,先是百度搜索,看到说一般不是因为缺少该文件,而是因为memcpy操作时可能数组溢出、或者空指针问题,然后我用gdb调试跟进去一看似乎并不是这个问题。
(gdb) r pictures/man.jpg
Starting program: /home/qihua/myhome/Facecatch-master/src/facecatch pictures/man.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
__memcpy_sse2 () at ../sysdeps/x86_64/multiarch/../memcpy.S:201
201 ../sysdeps/x86_64/multiarch/../memcpy.S: 没有那个文件或目录.
(gdb) bt
#0 __memcpy_sse2 () at ../sysdeps/x86_64/multiarch/../memcpy.S:201
#1 0x00007ffff70aa323 in __GI__IO_file_xsgetn (fp=0x618010,
data=<optimized out>, n=84) at fileops.c:1387
#2 0x00007ffff709f86f in __GI__IO_fread (buf=<optimized out>, size=1,
count=84, fp=0x618010) at iofread.c:42
#3 0x00007ffff7b55d8e in ?? () from /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#4 0x00007ffff7921415 in ?? ()
from /usr/lib/x86_64-linux-gnu/libSDL2_image-2.0.so.0
#5 0x00007ffff7921141 in IMG_LoadTyped_RW ()
from /usr/lib/x86_64-linux-gnu/libSDL2_image-2.0.so.0
#6 0x0000000000414942 in load_image (path=0x7fffffffe2a7 "pictures/man.jpg")
at sdl_functions.c:49
#7 0x00000000004156eb in facial_recognition (
path=0x7fffffffe2a7 "pictures/man.jpg") at sdl_functions.c:354
#8 0x0000000000400fcc in main (argc=2, argv=0x7fffffffdf18) at facecatch.c:7
然后想到我电脑安装的sdl2以及sdl2-image库,而程序需求的是sdl1版本的库,虽然一开始能够编译过,但是运行时却报错了,于是我把库卸载重新安装了sdl1版本及相关的库文件,后面就成功运行了。
总结:库的版本也可能影响程序的正确运行与否。
附:人脸检测源码下载链接:https://github.com/evadeo/Facecatch
附:SDL相关库的安装介绍blog:https://blog.csdn.net/mleem/article/details/51222156
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献4条内容
所有评论(0)