From: Thomas Jost Date: Thu, 15 Dec 2011 19:41:58 +0000 (+0100) Subject: Fix build with binutils-2.22 X-Git-Tag: 0.11_rc1~24 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=6dcd575d7be806dfaac5facba6fb6908a6ae076b;p=obsolete%2Fnotmuch-old Fix build with binutils-2.22 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, std::allocator >::~basic_string()@@GLIBCXX_3.4' /usr/bin/ld: note: 'std::basic_string, std::allocator >::~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. --- diff --git a/test/Makefile.local b/test/Makefile.local index 6cb6c829..fa2df734 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