Using $ORIGIN as RUNPATH for runtime link
When upgrading from GPDB5 to GPDB6, gpupgrade will need to be able to call
binaries from both major versions. Relying on LD_LIBRARY_PATH is not an option
because this can cause binaries to load libraries from the wrong version.
Instead, we need the libraries to have RPATH/RUNPATH set correctly. Since the
built binaries may be relocated we need to use a relative path.
This commit disables the rpath configure option (which would result in an
absolute path) and exports LD_RUN_PATH to use `$ORIGIN`.
For most ELF files a RUNPATH of `$ORIGIN/../lib` is correct. For pygresql
python module, the RUNPATH needs to be adjusted accordingly.
Authored-by: NShaoqi Bai <sbai@pivotal.io>
Showing
想要评论请 注册 或 登录