我已经使用arm-linux-gnueabi成功交叉编译了Zynq Zedboard的示例应用程序。我正在运行petalinux。但是,运行应用程序xiSample会出现以下错误:
./xiSample: error while loading shared libraries: /usr/lib/libm3api.so.2: internal error
此外,ls -l on / usr / lib /给出:
root@xiAPI:/usr/lib# ls -l
lrwxrwxrwx 1 root root 42 Mar 13 2018 ld-linux-
armhf.so.3 -> /usr/arm-linux-gnueabihf/lib/sf/ld-2.23.so
-rwxr-xr-x 1 root root 45556 Mar 13 2018 libjbig.so.2
-rwxr-xr-x 1 root root 15284 Mar 13 2018
libjbig85.so.2.0
-rwxr-xr-x 1 root root 222748 Mar 13 2018 libjpeg.so.8
-rwxr-xr-x 1 root root 222748 Mar 13 2018
libjpeg.so.8.1.2
-rwxr-xr-x 1 root root 193248 Mar 13 2018 liblzma.so.5
-rwxr-xr-x 1 root root 193248 Mar 13 2018
liblzma.so.5.2.3
lrwxrwxrwx 1 root root 13 Jan 1 00:54 libm3api.so -
> libm3api.so.2
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.0
-> libm3api.so.0.0.0
-rwxr-xr-x 1 root root 19850208 Jan 1 00:54
libm3api.so.0.0.0
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.2
-> libm3api.so.2.0.0
-rwxr-xr-x 1 root root 23453232 Jan 1 00:54
libm3api.so.2.0.0
-rwxr-xr-x 1 root root 441068 Mar 13 2018 libtiff.so.5
-rwxr-xr-x 1 root root 441068 Mar 13 2018
libtiff.so.5.3.0
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5.3.0
-rwxr-xr-x 1 root root 106100 Mar 13 2018 libz.so.1
-rwxr-xr-x 1 root root 106100 Mar 13 2018
libz.so.1.2.11
lrwxrwxrwx 1 root root 18 Jan 1 00:56 m3api ->
/opt/XIMEA/include
drwxr-xr-x 3 root root 4096 Feb 22 2018 opkg
如何找到我的可执行文件所需的共享库,因为petalinux不包含ldd
或file
。
编辑:我无法进一步隔离错误。关于可能导致这种情况的任何建议?我认为这是一个链接错误。
答案 0 :(得分:0)
在Petalinux环境中,您可以执行以下操作:
readelf -d xiSample |需要grep
这将列出所需的动态依赖项。