[PATCH] Add a configure flag to disable rpaths

Luis Ressel aranea at aixah.de
Sun Mar 10 12:28:01 PDT 2019


On Fri, Mar 01, 2019 at 08:39:25AM -0400, David Bremner wrote:
> Tomi Ollila <tomi.ollila at iki.fi> writes:
> 
> > On Tue, Feb 26 2019, Luis Ressel wrote:
> >
> > although the commit message is a bit terse, this change looks simple and
> > reasonable enough to be pushed (i.e. if i think hard I can see reason
> > for this change even it is not described in commit message ;D)
> >
> 
> For those of us too lazy to think hard, what is the reason? I can add to
> the commit message.
> 

Packagers often disable rpaths wherever possible. They can cause
confusion and, used carelessly, even security issues, and in the vast
majority of cases they're wholly unneccessary. notmuch's usage of rpaths
is rather innocuous, but I would still prefer to disable them when
they're not strictly needed.

Now, notmuch's configure script already tries to detect whether $libdir
is path of the standard library search path and disables -rpath in this
case. However, this detection logic invokes /sbin/ldconfig, which may
not be present on musl-based systems or at least not work as the
configure script expects. On my host, configure thus arrives at the
conclusion it needs to use -rpath even though $libdir is set to
/usr/lib/.

Since it seemed easy and straightforward to just add an option to
explicitly disable rpaths, and I wanted to avoid adding musl-specific
code to the autodetection logic, I decided to go this route.

Cheers,
Luis Ressel

(Resending due to trouble with my new MUA; apologies if you receive this
mail twice.)


More information about the notmuch mailing list