Why I cannot override search path of dynamic libraries with LD_LIBRARY_PATH?

前端 未结 2 542
甜味超标
甜味超标 2020-12-23 23:04

Edit: I resolved this issue, the solution is below.

I am building a code in a shared computing cluster dedicated for scientific computing, thus I can only control fi

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 23:35

    I see two possible reasons for this.

    First, libfftw3_mpi.so may be linked with /usr/lib64/ as RPATH. In that case, providing LD_LIBRARY_PATH will have no effect. To check if it is your case, run readelf -d libfftw3_mpi.so | grep RPATH and see if it has /usr/lib64/ as a library path. If it does, use chrpath utility to change or remove it.

    Alternatively, you may be running a system that does not support LD_LIBRARY_PATH at all (like HP-UX).

提交回复
热议问题