out of tree build fixes
[notmuch-archives.git] / bc / 10ec29f22c13ab18ee9b7a29d4a5485d96f9a2
1 Return-Path: <tom.prince@ualberta.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 087D9429E21\r
6         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 08:34:46 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id pIBW9sYfjNNo for <notmuch@notmuchmail.org>;\r
16         Sun, 13 Nov 2011 08:34:45 -0800 (PST)\r
17 Received: from socrates.hocat.ca (socrates.hocat.ca [76.10.188.53])\r
18         by olra.theworths.org (Postfix) with ESMTP id 5572E431FB6\r
19         for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 08:34:45 -0800 (PST)\r
20 Received: from hermes.hocat.ca (hermes.hocat.ca [69.165.170.253])\r
21         by socrates.hocat.ca (Postfix) with SMTP id 786A41568;\r
22         Sun, 13 Nov 2011 09:34:43 -0700 (MST)\r
23 Received: (nullmailer pid 30814 invoked by uid 1000);\r
24         Sun, 13 Nov 2011 16:34:42 -0000\r
25 From: Tom Prince <tom.prince@ualberta.net>\r
26 To: David Bremner <david@tethera.net>, Notmuch Mail <notmuch@notmuchmail.org>\r
27 Subject: [PATCH] Don't link libnotmuch if libutil isn't linked in properly.\r
28 In-Reply-To: <87aa805cm5.fsf@zancas.localnet>\r
29 References: <87aa805cm5.fsf@zancas.localnet>\r
30 User-Agent: Notmuch/0.9 (http://notmuchmail.org) Emacs/23.3.3\r
31         (x86_64-pc-linux-gnu)\r
32 Date: Sun, 13 Nov 2011 11:34:42 -0500\r
33 Message-ID: <87bosgasm5.fsf@hermes.hocat.ca>\r
34 MIME-Version: 1.0\r
35 Content-Type: text/plain; charset=us-ascii\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Sun, 13 Nov 2011 16:34:46 -0000\r
49 \r
50 For some reason, on my machine, the link is picking up\r
51 /usr/lib/libutil.so instead of util/libutil.a. This causes there to be\r
52 undefined symbols in libnotmuch, making it unuseable. This patch causes\r
53 the link to fail instead.\r
54 ---\r
55  lib/Makefile.local |    2 +-\r
56  1 files changed, 1 insertions(+), 1 deletions(-)\r
57  \r
58 On Sun, 13 Nov 2011 10:19:14 -0400, David Bremner <david@tethera.net> wrote:\r
59 > According to our sortof-schedule, we should release 0.10 soonish.  I'd\r
60 > like to freeze for a few days first, so that means we have time for\r
61 > maybe one or two more non-trivial patches before the freeze.\r
62 \r
63 libnotmuch isn't linking properly to libutil for me. This seems to be\r
64 due to $(xapian-config --libs) including -L/usr/lib64, which then causes\r
65 -lutil to pick up /usr/lib64/libutil.so (from glibc) instead.\r
66 I noticed this failing because symbol-test fails to compile, causing\r
67 both symbol-hinding test to fail.\r
68 \r
69 The following patch doesn't fix this, but does cuase the build to fail\r
70 earlier.\r
71 \r
72 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
73 index d58552c..cb53781 100644\r
74 --- a/lib/Makefile.local\r
75 +++ b/lib/Makefile.local\r
76 @@ -30,7 +30,7 @@ LIBRARY_SUFFIX = so\r
77  LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)\r
78  SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)\r
79  LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)\r
80 -LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME)\r
81 +LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) -Wl,--no-undefined\r
82  ifeq ($(LIBDIR_IN_LDCONFIG),1)\r
83  ifeq ($(DESTDIR),)\r
84  LIBRARY_INSTALL_POST_COMMAND=ldconfig\r
85 --\r
86 1.7.6.1\r