问题:
在程序测试中发现报下面的这个错误
soxmix: error while loading shared libraries: libippsc.so: cannot open shared object file: No such file or directory
这个程序是在64位平台下进行的编译,64位平台的库的名字已及路径: /opt/intel/ipp41/em64t/sharedlib/libippscem64t.so
在Makefile编译时的链接环境:
IPPROOT = /opt/intel/ipp41/em64t
LIB_G729 = -L./libg729 -L$(IPPROOT)/sharedlib -L$(IPPROOT)/sharedlib/linuxem64t -lg729 -lippscem64t -lipp
ld.so.conf内容:
include ld.so.conf.d/*.conf
/opt/intel/ipp41/em64t/sharedlib
/opt/intel/ipp41/em64t/sharedlib/linuxem64t
使用readelf -d soxmix 命令查看库的链接情况:
[root@localhost src]# readelf -d soxmix
Dynamic section at offset 0x914f0 contains 33 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libvorbisfile.so.3]
0x0000000000000001 (NEEDED) Shared library: [libvorbisenc.so.2]
0x0000000000000001 (NEEDED) Shared library: [libvorbis.so.0]
0x0000000000000001 (NEEDED) Shared library: [libogg.so.0]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libmad.so.0]
0x0000000000000001 (NEEDED) Shared library: [libmp3lame.so.0]
0x0000000000000001 (NEEDED) Shared library: [libippscem64t.so]
0x0000000000000001 (NEEDED) Shared library: [libippsrem64t.so]
0x0000000000000001 (NEEDED) Shared library: [libippsem64t.so]
0x0000000000000001 (NEEDED) Shared library: [libippcoreem64t.so]
0x0000000000000001 (NEEDED) Shared library: [libguide.so]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x403118
0x000000000000000d (FINI) 0x452c18
0x000000006ffffef5 (GNU_HASH) 0x400240
0x0000000000000005 (STRTAB) 0x4013e0
0x0000000000000006 (SYMTAB) 0x4002a0
0x000000000000000a (STRSZ) 2732 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x691758
0x0000000000000002 (PLTRELSZ) 4104 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x402110
0x0000000000000007 (RELA) 0x402080
0x0000000000000008 (RELASZ) 144 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x402000
0x000000006fffffff (VERNEEDNUM) 3
0x000000006ffffff0 (VERSYM) 0x401e8c
0x0000000000000000 (NULL) 0x0
上述问题已经链接上。
关于动态链接库相关的一些资料的路径:
关于ld.so.conf 内容介绍
需要说明的是/etc/ld.so.conf文件是记录了动态加载库的路径。下面是两篇文章的介绍:
1、 http://blog.csdn.net/yjkwf/article/details/7545002
2、 http://blog.sina.com.cn/s/blog_7137890701013rth.html