Re: [PATCH] build: Support Mac OS X 10.6.8

Subject: Re: [PATCH] build: Support Mac OS X 10.6.8

Date: Wed, 01 Jul 2015 08:07:48 +0200

To: Nate Eagleson,


From: David Bremner

Nate Eagleson <> writes:

> OS X 10.6.8 has a built-in library named libutil.dylib and a version
> of ld that picks that up instead of util/libutil.a.
> We now use an absolute path to util/libutil.a, so that notmuch can be
> built successfully on 10.6.8.

I'd like a one line subject that mentions libutil.a and perhaps
"absolute path"

> +# Mac OS X 10.6 has a built-in libutil.dylib that prevents ld from
> +# picking up notmuch's libutil.a. The best way to prefer our local
> +# libutil.a is to specify it via absolute path, which should work on
> +# all supported OSes.
> +LIBUTIL_PATH=${srcdir}/util/libutil.a
> +

This needs to be relative to ${dir}, not ${srcdir} in order not to break
out of tree builds. You can test with

% mkdir -p /tmp/foo-build
% cd /tmp/foo-build
% ~/projects/notmuch/configure && make

Also, one Makefile gotcha is that anything using $(dir) should use :=
rather than = to force immediate expansion.