我的.so如何在不同的Ubuntu版本中找到其依赖的.so?
我有一个 libA.so。它是通过JNI方法使用的。
我有两个不同版本的 Ubuntu。一个是 Ubuntu 8.04,另一个是 Ubuntu 9.10。
libA.so 有依赖项。 libA.so 依赖于 libB.so,libB.so 依赖于 libC.so。
即。 libA.so ->; libB.so ->; libC.so(实际上libB.so和libC.so与GTK有关)
libA.so是在Ubuntu 8.04中编译的。 JNI方法在Ubuntu 9.10中运行良好。 (很奇怪)
但它有时在 Ubuntu 8.04 中不起作用。它返回“未定义符号 GTK_SET_BULA”错误。
所以我使用 readelf -a libC.so 检查它,我可以找到该符号。
我使用 ldd libA.so 和 ldd libB.so 进行了检查。链接信息也很好。
我对这个问题有任何想法。请让我知道您的宝贵意见。谢谢。
I have one libA.so. It is used by JNI method.
And I have two different version of Ubuntu. One is Ubuntu 8.04 and the other is Ubuntu 9.10.
libA.so has a dependency. libA.so depends on libB.so and libB.so depends on libC.so.
ie. libA.so -> libB.so -> libC.so (Actually libB.so and libC.so are related with GTK)
The libA.so is compiled in Ubuntu 8.04. And JNI method works fine in Ubuntu 9.10. (very strange)
But It does not work sometimes in Ubuntu 8.04. It returns "undefined symbol GTK_SET_BULA" error.
So I checked it using readelf -a libC.so
and I could find the symbol.
I checked it using ldd libA.so
and ldd libB.so
. The link information is fine also.
I have any idea about this problem. Please let me know your excellent opinion. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提供有关您的问题的更多信息:
解决此类问题的常见建议是在 LSB Navigator。
顺便说一句
使用 -Wa 选项来读取 ELF 文件而不是 -a 以避免破坏输出行(分成 80 列):
Provide more information on your question:
The common recommendation for solving such problems is to search information about missed symbol in the LSB Navigator.
BTW
Use -Wa option to read ELF files instead of -a to avoid breaking of output lines (into 80 columns):