If you're trying to use the Clang C++ compiler on Maverick and you're getting link failures like
undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)you're just going to have to patch it and build it yourself. It's actually pretty easy, it just takes a few minutes.
- Check out the LLVM & Clang source and build it as described on the Clang website.
- Open up ~/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp in your favourite text editor.
- Add the following at line 627, just under the case for
// Ubuntu 10.10 "Maverick Meerkat" -- gcc-4.4.5 AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4", "i686-linux-gnu", "", "64", triple);
- Build again. It'll be much quicker this time around.
- Install - sudo make install
With any luck Clang will be patched up in pretty short order, thus rendering this a historical curiosity.
Ok, this turns out not be a complete fix, but it's probably good enough. I'm still getting link failures -undefined reference to `std::basic_streambufin one of my builds. Other things using wide streams are linking ok, so I'm not entirely sure what I'm doing differently in this one. Wide streams are probably a minority interest though so, in lieu of a proper fix, what I've described above is still worth a go.
>::pbackfail(int)' undefined reference to `std::basic_streambuf >::overflow(int)'
jez, 22nd Dec 2010
[Add a comment]