[PATCH] Fix build with binutils-2.22
authorThomas Jost <schnouki@schnouki.net>
Thu, 15 Dec 2011 19:41:58 +0000 (20:41 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:53 +0000 (09:40 -0800)
bc/42991e8a12d379e0112612e6c6bab43267dfb7 [new file with mode: 0644]

diff --git a/bc/42991e8a12d379e0112612e6c6bab43267dfb7 b/bc/42991e8a12d379e0112612e6c6bab43267dfb7
new file mode 100644 (file)
index 0000000..ca61e0f
--- /dev/null
@@ -0,0 +1,97 @@
+Return-Path: <schnouki@schnouki.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 5BAF8429E26\r
+       for <notmuch@notmuchmail.org>; Thu, 15 Dec 2011 11:42:40 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.675\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.675 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       URIBL_BLACK=1.775] 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 Vi7BljsbnE-w for <notmuch@notmuchmail.org>;\r
+       Thu, 15 Dec 2011 11:42:39 -0800 (PST)\r
+Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
+       by olra.theworths.org (Postfix) with ESMTP id BC8A8431FD0\r
+       for <notmuch@notmuchmail.org>; Thu, 15 Dec 2011 11:42:39 -0800 (PST)\r
+Received: from odin.local (nancy.schnouki.net [78.238.0.45])\r
+       by ks3536.kimsufi.com (Postfix) with ESMTPSA id 6F6AC6A0026;\r
+       Thu, 15 Dec 2011 20:42:37 +0100 (CET)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
+       s=key-schnouki; t=1323978157;\r
+       bh=2mM3xhUSPMviFZ2Vtg5c1L4zsT7K9ItXmH9t2mZa8/8=;\r
+       h=From:To:Subject:Date:Message-Id;\r
+       b=cdsUXyGj9NMsqsM+B/dKpycdkE/68z5Q9Cd8e00fuKDEjWQMgcRmW8cM3kl7/ir/6\r
+       QGik2vzpeFFEN7vhvPfJbWDN/fvISxD2uSb5kazbGMacAZl5Xjeb7y0xLG4PMP9N9c\r
+       CPh4EQS42FvUC5GLPXQLBgCgMZ7MySxoh9Mv4N7c=\r
+From: Thomas Jost <schnouki@schnouki.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] Fix build with binutils-2.22\r
+Date: Thu, 15 Dec 2011 20:41:58 +0100\r
+Message-Id: <1323978118-23954-1-git-send-email-schnouki@schnouki.net>\r
+X-Mailer: git-send-email 1.7.8\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, 15 Dec 2011 19:42:40 -0000\r
+\r
+binutils-2.22 changes the behaviour of ld by defaulting to\r
+--no-copy-dt-needed-entries, which means that required objects/libs are not\r
+"indirectly" linked through intermediate objects/libs anymore. As a consequence,\r
+when using binutils-2.22, building symbol-test fails with the following error:\r
+\r
+    /usr/bin/ld: test/symbol-test.o: undefined reference to symbol\r
+    'std::basic_string<char, std::char_traits<char>, std::allocator<char>\r
+    >::~basic_string()@@GLIBCXX_3.4'\r
+\r
+    /usr/bin/ld: note: 'std::basic_string<char, std::char_traits<char>,\r
+    std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' is defined in DSO\r
+    /usr/lib/libstdc++.so.6 so try adding it to the linker command line\r
+\r
+    /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation\r
+\r
+An easy fix is to link using CXX instead of CC.\r
+---\r
+Hi there,\r
+\r
+This build issue happens on Arch Linux. For more details, the relevant binutils\r
+changelog is here: http://ur1.ca/6px8j, and more explanations are available on\r
+the Fedora wiki: https://fedoraproject.org/wiki/UnderstandingDSOLinkChange\r
+(People who read the arch-general ML may want to read the thread starting at\r
+id:"1323458274-sup-9064@eris".)\r
+\r
+Best regards,\r
+Thomas\r
+\r
+ test/Makefile.local |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/test/Makefile.local b/test/Makefile.local\r
+index 6cb6c82..fa2df73 100644\r
+--- a/test/Makefile.local\r
++++ b/test/Makefile.local\r
+@@ -17,7 +17,7 @@ $(dir)/smtp-dummy: $(smtp_dummy_modules)\r
+       $(call quiet,CC) $^ -o $@\r
\r
+ $(dir)/symbol-test: $(dir)/symbol-test.o\r
+-      $(call quiet,CC) $^ -o $@ -Llib -lnotmuch -lxapian\r
++      $(call quiet,CXX) $^ -o $@ -Llib -lnotmuch -lxapian\r
\r
+ .PHONY: test check\r
\r
+-- \r
+1.7.8\r
+\r