关于"symbol lookup error xxxxx , undefined symbol"问题的解决方式

简介: ​今天在测试基于netlib实现的数据包处理模块时,突然提示symbollookup error gxio_mpipe_init , undefined symbol问题。通过查阅资料对于该问题大部分的问题原因都是动态库的版本过旧,导致应用程序找不到对应的符号而引起的。

今天在测试基于netlib实现的数据包处理模块时,突然提示symbollookup error gxio_mpipe_init , undefined symbol问题。通过查阅资料对于该问题大部分的问题原因都是动态库的版本过旧,导致应用程序找不到对应的符号而引起的。


但是,通过分析Makefile文件和更新tilera平台上的gxio所依赖的动态库并不能解决上述问题。后来通过nm配合ldd终于解决了问题。分析步骤如下:


用ldd测试应用层序所依赖的动态库 使用nm + grep分析gxio相关的动态库下是否包含gxio_mpipe_init符号 经nm检测发现gxio相关的动态库都不包含gxio_mpipe_init,如$nm libgxio.so | grep gxio_mpipe_init。但gxio静态库(libgxio.a)包含gxio_mpipe_init  修改应用程序的 Makefile ,将gxio的静态库连接到应用程序中,编译测试问题解决。

 导致上述问题的愿意就是应用程序依赖的gxio动态库中没有gxio_mpipe_init所对应特定的符号,导致运行时出现问题。 总结:导致该问题的原因一般就是动态库的版本过旧,导致应用程序找不到对应的符号,可以通过更新动态库使之支持确实的符号解决问题,分析过程中可以借助nm和ldd工具。


相关文章
|
3月前
|
小程序 前端开发 API
【微信小程序】TypeError: Cannot read property ‘get‘ of undefined & Error: MiniProgramError
【微信小程序】TypeError: Cannot read property ‘get‘ of undefined & Error: MiniProgramError
|
3月前
|
资源调度 前端开发
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
292 0
|
8月前
Uncaught runtime errors: × ERROR Cannot read properties of undefined (reading ‘ vue2&vue-router兼容性问题
Uncaught runtime errors: × ERROR Cannot read properties of undefined (reading ‘ vue2&vue-router兼容性问题
269 0
|
9月前
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
54 0
|
Ubuntu 计算机视觉 Python
已解决 ImportError:/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so:undefined symbol:PyCobject Type。
已解决 ImportError:/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so:undefined symbol:PyCobject Type。
237 0
已解决 ImportError:/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so:undefined symbol:PyCobject Type。
|
8月前
Error:express-session deprecated undefined resave option; provide resave option app.js:17:10
Error:express-session deprecated undefined resave option; provide resave option app.js:17:10
Error:express-session deprecated undefined resave option; provide resave option app.js:17:10
|
9月前
|
JavaScript
vue报错: ERROR TypeError: Cannot read property 'version' of undefined
vue报错: ERROR TypeError: Cannot read property 'version' of undefined
73 1
|
9月前
|
编译器
error TS2322 Type ‘string null‘ is not assignable to type ‘string undefined‘.
error TS2322 Type ‘string null‘ is not assignable to type ‘string undefined‘.
Error: undefined method `launchd_service_path‘ for xxx
使用brew命令进行启动就报错。
226 0
|
9月前
网易云/opt/netease/netease-cloud-music/netease-cloud-music: symbol lookup error: /lib/x86_64-linux-gnu/
网易云/opt/netease/netease-cloud-music/netease-cloud-music: symbol lookup error: /lib/x86_64-linux-gnu/