On 1/20/19 7:47 PM, Mohammad Akhlaghi wrote: > 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?
The bash link step doesn't do anything with rpath. The readline Makefiles set rpath to the installed location of the library at build time (using $libdir), so if you install it somewhere else that's going to be wrong. It should probably use $(DESTDIR)$(libdir) if that's what you use to install your copy of readline. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/