unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix build with binutils-2.22
@ 2011-12-15 19:41 Thomas Jost
  2011-12-16  5:43 ` Tomi Ollila
  2011-12-18 10:34 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Jost @ 2011-12-15 19:41 UTC (permalink / raw)
  To: notmuch

binutils-2.22 changes the behaviour of ld by defaulting to
--no-copy-dt-needed-entries, which means that required objects/libs are not
"indirectly" linked through intermediate objects/libs anymore. As a consequence,
when using binutils-2.22, building symbol-test fails with the following error:

    /usr/bin/ld: test/symbol-test.o: undefined reference to symbol
    'std::basic_string<char, std::char_traits<char>, std::allocator<char>
    >::~basic_string()@@GLIBCXX_3.4'

    /usr/bin/ld: note: 'std::basic_string<char, std::char_traits<char>,
    std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' is defined in DSO
    /usr/lib/libstdc++.so.6 so try adding it to the linker command line

    /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation

An easy fix is to link using CXX instead of CC.
---
Hi there,

This build issue happens on Arch Linux. For more details, the relevant binutils
changelog is here: http://ur1.ca/6px8j, and more explanations are available on
the Fedora wiki: https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
(People who read the arch-general ML may want to read the thread starting at
id:"1323458274-sup-9064@eris".)

Best regards,
Thomas

 test/Makefile.local |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/Makefile.local b/test/Makefile.local
index 6cb6c82..fa2df73 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -17,7 +17,7 @@ $(dir)/smtp-dummy: $(smtp_dummy_modules)
 	$(call quiet,CC) $^ -o $@
 
 $(dir)/symbol-test: $(dir)/symbol-test.o
-	$(call quiet,CC) $^ -o $@ -Llib -lnotmuch -lxapian
+	$(call quiet,CXX) $^ -o $@ -Llib -lnotmuch -lxapian
 
 .PHONY: test check
 
-- 
1.7.8

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-18 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 19:41 [PATCH] Fix build with binutils-2.22 Thomas Jost
2011-12-16  5:43 ` Tomi Ollila
2011-12-18 10:34 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).