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