On 1/21/19 12:25 AM, Chet Ramey wrote:
Isn't there a linker option you can supply, possibly as part of LDFLAGS, to embed that into the bash binary?
I pass `-Wl,-rpath-link=$instdir/lib' to LDFLAGS. It sets RPATH properly on all the programs I install (including libreadline, and many other basic programs), except for Bash and AWK.
In my built programs, Bash and AWK are the only programs that depend on libreadline, but RPATH does get written into libreadline, so I don't know if the linking with libreadline has any affect on this problem or not.
Is there any step in the build or install of Bash that somehow disables using this method of setting RPATH?
So far I found this work-around: to manually write RPATH into the Bash executable after installation using patchelf: https://nixos.org/patchelf.html . But it would be much better/elegant if this manual intervention wouldn't be necessary.
Thanks a lot, Mohammad