什么场景会让-rpath指定的链接库路径失效
我这边遇到一个现象:
1、动态库是使用“-Wl,-rpath”指定动态库搜索路径,使用readelf -d看是有编译进去
0x0000000f (RPATH) Library rpath: [../other]
0x0000001d (RUNPATH) Library runpath: [../other]
2、linux上环境变量是
ATCAX86_F0S3:/opt/# echo $LD_LIBRARY_PATH
/opt/:
3、动态库在链接的时候反而是先找到/opt去了,请问各位知道什么场景会让-rpath失效?多谢