Homebrew/homebrew — pull request #27592 by dmotles (2014-03-16 02:07:21+00:00)
Title: fix clamav 0.98.1 building on OSX 10.9

The build was failing due to the linker not being able to
resolve method std::vector::insert(iterator, iterator, iterator).
According to research, in 10.9 Apple changed what C++ stdlib
was used by clang++ from the Linux libstdc++ to their own
libc++. In addition, I found that adding -lstdc++.6 helped
the linker link the binary correctly.

Reference:
https://mathematica.stackexchange.com/questions/34692/mathlink-linking-error-after-os-x-10-9-mavericks-upgrade

In file included from llvm/lib/Analysis/LoopInfo.cpp:17:
./llvm/include/llvm/Analysis/LoopInfo.h:817:19: error: no matching member function for call to 'insert'
TodoStack.insert(TodoStack.end(), InvBlockTraits::child_begin(X),
~~~~~~~~~~^~~~~~
./llvm/include/llvm/Analysis/LoopInfo.h:755:22: note: in instantiation of member function 'llvm::LoopInfoBase::ConsiderForLoop' requested here
if (LoopT *L = ConsiderForLoop(*NI, DT))
^
llvm/lib/Analysis/LoopInfo.cpp:384:6: note: in instantiation of member function 'llvm::LoopInfoBase::Calculate' requested here
LI.Calculate(getAnalysis().getBase()); // Update
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:718:14: note: candidate function not viable: no known conversion from 'ChildIteratorType' (aka 'PredIterator') to 'size_type' (aka 'unsigned long') for 2nd argument
iterator insert(const_iterator __position, size_type __n, const_reference __x);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:722:14: note: candidate template ignored: disabled by 'enable_if' [with _InputIterator = llvm::PredIterator >]
__is_input_iterator <_InputIterator>::value &&
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:733:13: note: candidate template ignored: disabled by 'enable_if' [with _ForwardIterator = llvm::PredIterator >]
__is_forward_iterator<_ForwardIterator>::value &&
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/vector:710:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
iterator insert(const_iterator __position, const_reference __x);
^
1 error generated.
make[4]: *** [LoopInfo.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [install] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1