Build problems on OS X

Carl Worth cworth at cworth.org
Wed Apr 14 10:37:23 PDT 2010


On Sun, 11 Apr 2010 19:43:27 -0400, Aaron Ecay <aaronecay at gmail.com> wrote:
> In the process of updating to the latest sources, I've discovered that notmuch
> no longer builds on OS X.

Hi Aaron,

Thanks so much for following up here. This transition to
building/installing a shared library (and not using libtool) is the big
one as for as build-system portability goes. So I did expect to see a
patch series here. I'm optimistic that going forward, we won't have
constant breakage.

Though I did have a suggestion to call ldconfig implicitly when doing
"make install". Is that the same command on OS X or is it different?

> As a reply to this email, I'll be sending 4 patches.

I'll follow up to some of these individually.

> The fourth patch I am not sure of.  Even after adding the proper command line
> flags to build the shared binary on OS X, I get symbol not found errors for
> Glib/Gmime symbols.  The shared binary links against the shared lib, which in
> turn links against Glib and Gmime, but it appears that at least on OS X the
> linker won't follow these second-order links, and the notmuch shared binary
> must be linked against Glib/Gmime directly.  This patch fixes the build for
> me, but it may not be correct on Linux/other Unices.

You're correct that it is incorrect on Linux. :-)

Debian's program for checking package correctness (lintian) complains if
a binary is linked directly against a library when the binary doesn't
actually reference any symbols from that library, (but instead
references symbols from other libraries that in turn reference the
library). So we do want to avoid this excess linking.

> I can resubmit this patch to add the extra linker flags only when
> building for OS X.  If anyone knows how to get the OS X linker to
> behave like the Linux one in this regard, that will likely be a better
> solution.

Reworking that patch would be great. I don't have any suggestion for
fixing the linker though. :-P

-Carl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100414/9dac5e4d/attachment.pgp>


More information about the notmuch mailing list