[PATCH] Fix linker error from insufficient LDFLAGS
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 22 Apr 2010 22:20:27 +0000 (18:20 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:48 +0000 (09:36 -0800)
90/23a51cc506b0f68a7235cfe7e1787e579787ec [new file with mode: 0644]

diff --git a/90/23a51cc506b0f68a7235cfe7e1787e579787ec b/90/23a51cc506b0f68a7235cfe7e1787e579787ec
new file mode 100644 (file)
index 0000000..a8a4d6f
--- /dev/null
@@ -0,0 +1,95 @@
+Return-Path: <bgamari.foss@gmail.com>\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 DE2064196F4\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 15:20:39 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.999\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+       DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham\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 Dln5+rk4J6t7 for <notmuch@notmuchmail.org>;\r
+       Thu, 22 Apr 2010 15:20:39 -0700 (PDT)\r
+Received: from mail-pv0-f181.google.com (mail-pv0-f181.google.com\r
+       [74.125.83.181])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1BC5A4196F2\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 15:20:39 -0700 (PDT)\r
+Received: by pvg3 with SMTP id 3so1488936pvg.26\r
+       for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 15:20:38 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:from:to:cc:subject:date\r
+       :message-id:x-mailer:in-reply-to:references;\r
+       bh=31btXKdpal0D3bhBnoterT6SR+qvDZK5f/Np1JDJADY=;\r
+       b=Jd4FaELBZ3wNCyhXrrL2PHtaoSUEzam3WPq9yFGBtY4Jvg8/mYgHduk1w2Yl0MzyHz\r
+       Qv+uY3XhSSgU+VOfpiO9YJsnB2HuzU42lFSyL3vEKbNcao0FCciOllyY7JdDhcpA7lo/\r
+       yJv7xgRtIvkkqJ0hvAKIXKOMOSd4QqLjpQqj0=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       b=MnCIdFQbRMfQvepmt6i3niWhAtKM7D0rQnr3hW578/FF5I9L++0fxrZhxUTe4Zec93\r
+       cKOGjgONzL4UHwKqwQW0XSQACY5lxvqHtnuSpTevh6BeOk0BL0V0ic5Sf+MRiJgoZPmC\r
+       WC3INHeLlspDKsfzfU8bngE+yq28UYTeIWVlA=\r
+Received: by 10.142.149.39 with SMTP id w39mr332424wfd.61.1271974838231;\r
+       Thu, 22 Apr 2010 15:20:38 -0700 (PDT)\r
+Received: from localhost.localdomain (physnat56.physics.umass.edu\r
+       [128.119.50.56])\r
+       by mx.google.com with ESMTPS id v41sm182194wfh.21.2010.04.22.15.20.36\r
+       (version=SSLv3 cipher=RC4-MD5); Thu, 22 Apr 2010 15:20:37 -0700 (PDT)\r
+From: Ben Gamari <bgamari.foss@gmail.com>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+Subject: [PATCH] Fix linker error from insufficient LDFLAGS\r
+Date: Thu, 22 Apr 2010 18:20:27 -0400\r
+Message-Id: <1271974827-10978-2-git-send-email-bgamari.foss@gmail.com>\r
+X-Mailer: git-send-email 1.7.0.5\r
+In-Reply-To: <1271974827-10978-1-git-send-email-bgamari.foss@gmail.com>\r
+References: <1271974827-10978-1-git-send-email-bgamari.foss@gmail.com>\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: Thu, 22 Apr 2010 22:20:40 -0000\r
+\r
+It seems that LDFLAGS have recently been reorganized, along with the\r
+introduction of a notmuch-shared rule. Unfortunately, the LDFLAGS used\r
+in notmuch-shared don't include CONFIGURE_LDFLAGS. This caused linking\r
+to fail with the following,\r
+\r
+$ make V=1\r
+gcc debugger.o gmime-filter-reply.o gmime-filter-headers.o notmuch.o notmuch-config.o notmuch-count.o notmuch-dump.o notmuch-new.o notmuch-reply.o notmuch-restore.o notmuch-search.o notmuch-search-tags.o notmuch-setup.o notmuch-show.o notmuch-tag.o notmuch-time.o query-string.o show-message.o json.o  -Llib -lnotmuch -o notmuch-shared\r
+/usr/bin/ld: gmime-filter-reply.o: undefined reference to symbol 'g_mime_filter_set_size'\r
+/usr/bin/ld: note: 'g_mime_filter_set_size' is defined in DSO //usr/lib64/libgmime-2.4.so.2 so try adding it to the linker command line\r
+//usr/lib64/libgmime-2.4.so.2: could not read symbols: Invalid operation\r
+collect2: ld returned 1 exit status\r
+make: *** [notmuch-shared] Error 1\r
+---\r
+ Makefile.local |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/Makefile.local b/Makefile.local\r
+index 5bb570b..33b8213 100644\r
+--- a/Makefile.local\r
++++ b/Makefile.local\r
+@@ -31,7 +31,7 @@ GPG_FILE=$(SHA1_FILE).asc\r
+ # Smash together user's values with our extra values\r
+ FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)\r
+ FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)\r
+-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch\r
++FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch $(CONFIGURE_LDFLAGS)\r
+ FINAL_NOTMUCH_LINKER = CC\r
+ ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)\r
+ FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)\r
+-- \r
+1.7.0.5\r
+\r