[PATCH] Don't link libnotmuch if libutil isn't linked in properly.
authorTom Prince <tom.prince@ualberta.net>
Sun, 13 Nov 2011 16:34:42 +0000 (11:34 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:07 +0000 (09:40 -0800)
bc/10ec29f22c13ab18ee9b7a29d4a5485d96f9a2 [new file with mode: 0644]

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