https://bugs.openldap.org/show_bug.cgi?id=9296
--- Comment #1 from noloader@gmail.com noloader@gmail.com --- And it looks like OpenLDAP is fix-resistant. I fix the rpath and runpath twice, but OpenLDAP builds new libraries at 'make install'.
Here's the procedure I follow. fix-makefiles.sh and fix-rpaths.sh are my scripts.
./configure ./fix-makefiles.sh # escape dollar signs: $ORIGIN -> $$ORIGIN make ./fix-rpaths.sh # use patchelf or editelf to fix rpath and runpath make check ./fix-rpaths.sh # use patchelf or editelf to fix rpath and runpath make install
You are not supposed to build anything during 'make install'.