From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 111c93,8c1d1ffdb28bdb34 X-Google-Attributes: gid111c93,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!207.225.159.1.MISMATCH!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mail From: Staffan Tjernstrom Subject: Re: g++ optimisations in AlphaLinux User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.os.linux.alpha References: Reply-To: stjernstrom@acm.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 01 Dec 2005 12:01:45 -0600 NNTP-Posting-Host: 71.34.169.72 X-Trace: news.uswest.net 1133460106 71.34.169.72 (Thu, 01 Dec 2005 12:01:46 CST) NNTP-Posting-Date: Thu, 01 Dec 2005 12:01:46 CST Xref: g2news1.google.com comp.os.linux.alpha:591 DiskMan scribbled something like this, on Thu, 01 Dec 2005 17:18:27 +0000: > Switzerland? To work!?!? Are they hiring!?!?! > > I was wondering, what version of GCC did you use to build BOINC? I tried > GCC-4.0.1 [I know, wishful thinking] and GCC-3.2.3 and neither of them work! > > I was getting this LONG error! > make[2]: Entering directory > /usr/include/c++/3.2.3/bits/basic_string.h:974: instantiated from `bool > std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const > std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = > std::char_traits, _Alloc = std::allocator]' > ../lib/util.h:66: instantiated from here > /usr/include/c++/3.2.3/bits/basic_string.h:894: call of overloaded `min( > size_t&, size_t&)' is ambiguous > ../lib/std_fixes.h:35: candidates are: T std::min(const T&, const T&) [with > T = > size_t] > /usr/include/c++/3.2.3/bits/stl_algobase.h:149: const _Tp& > std::min(const _Tp&, const _Tp&) [with _Tp = size_t] (without having played a lot with templates) Looks like the BOINC source is redefining the min algorithm to return a non-const value in ../lib/std_fixes.h:35. Not sure why the compiler can't choose between the 2 in either case, but anything is possible I guess in the mess that's templates. The canonical declarations for min (STL Tutorial & Reference Guide, 2nd Ed, Musser/Serge/Dani) would appear to be: template const T& min( const T& a, const T& b); template const T& min( const T& a, const T& b, Compare comp); Gut guess is to comment out the re-define (as well as it's code), and see if that works.