[PATCH] lib: make notmuch shared library install_name be full path on Mac OS X
Tomi Ollila
tomi.ollila at iki.fi
Thu Feb 26 11:04:26 PST 2015
On Thu, Feb 26 2015, "J. Lewis Muir" <jlmuir at imca-cat.org> wrote:
> On 2/25/15 1:34 AM, David Bremner wrote:
>> Unfortunately we did not receive any feedback from Mac users in the
>> meantime. It would be nice to know that your patch won't break the
>> existing macports and brew packages. I suppose that those work
>> because they install the libraries into a well known location.
>
> Hi, David.
>
> I just tried installing to /usr/local (now on OS X Yosemite 10.10.2),
> and you're right about that; it appears that because it's a standard
> location, it works without my patch. Looking at the dyld(1) man page,
> it says the following for the DYLD_FALLBACK_LIBRARY_PATH environment
> variable (and I think the fact that /usr/local/lib is in the default
> list is the reason why it works without the patch):
>
> This is a colon separated list of directories that contain
> libraries. It is used as the default location for libraries
> not found in their install path. By default, it is set to
> $(HOME)/lib:/usr/local/lib:/lib:/usr/lib.
>
> However, if I install to /opt, it does *not* work without my patch. So,
> I'm still confident that the patch is correct and needed.
It definitely make sense that when loading "dynamically linked" binary,
and the names of the libraries it tries to open do not contain '/':s (or
perhaps is not absolute), the system attempts to find it from pre-defined
location -- and (possibly) otherwise uses the path coded in the name
The commit message is just (IMO) somewhat confusing; what is this
$ otool -L /opt/notmuch-current/lib/libnotmuch.dylib
is there files /opt/notmuch-current/lib/libnotmuch.dylib and
/opt/notmuch-current/lib/libnotmuch.3.dylib in the fs -- and
what does otool -L opt/notmuch-current/bin/notmuch output
As a non-mac user it is hard to review this when full visibility
to the file system is not available...
>
> Regards,
>
> Lewis
Tomi
More information about the notmuch
mailing list