我的.so如何在不同的Ubuntu版本中找到其依赖的.so?

发布于 2024-09-10 04:40:52 字数 520 浏览 2 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放肆 2024-09-17 04:40:52

提供有关您的问题的更多信息:

  1. 未定义符号的确切名称
  2. 、库 A、B、C 的确切名称、
  3. 您正在调用的 JNI 方法的确切名称、
  4. 有关正在运行的应用程序的一些信息。

解决此类问题的常见建议是在 LSB Navigator

顺便说一句
使用 -Wa 选项来读取 ELF 文件而不是 -a 以避免破坏输出行(分成 80 列):

readelf -Wa libC.so

Provide more information on your question:

  1. exact name of the undefined symbol
  2. exact name of libraries A, B, C,
  3. exact name of JNI method you are calling,
  4. a few words about the application running.

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):

readelf -Wa libC.so
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文