Report by Eric Lindblad 30-09-2015
http://www.ericlindblad.blogspot.com
The xapian-core-1.2.21 'ambiguous overload' error on the files
/backends/brass/brass_check.cc and /backends/chert/chert_check.cc appear to be
resultant of a bug reported in gcc-3.3.4, which was fixed for 3.4.2 [Sept. 6,
2004] and 3.5.
Bug 16854 - streams missing "long long" specializations on Tru64
https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=16854
Running 'g++ foo.cc' (from the above link) utilising the gcc-3.3 shipped
with SFU Interix 3.5 was informative.
$ cat > foo.cc
#include <iostream>
using namespace std;
int main() {
long long i;
cout << i << endl;
}
the error output being identical to that appearing in Bug 16854.
SFU shipped with gcc-3.3 but the bug was reported for gcc-3.3.4.
Note gcc-4.2.1 was essentially a bug fix release, the bug not the same as the
one cited in gcc-3.3.4.
http://permalink.gmane.org/gmane.comp.search.xapian.general/9883
http://permalink.gmane.org/gmane.comp.search.xapian.general/9880
http://permalink.gmane.org/gmane.comp.search.xapian.general/9862
Initially I located a message series on an SFU Interix 3.5 'ambiguous
overload' error here:
[LLVMdev] AsmWriter.cpp:255: error: ambiguous overload for
`std::basic_ostream<char,...
http://lists.llvm.org/pipermail/llvm-dev/2004-July/001421.html
If someone has a Vista Ultimate or Windows 7 Ultimate box with network access
and would be inclined to install respectively SUA 6.0 or 6.1, make-3.81,
m4-1.4.9, libuuid-1.0.3 (patched), and a static zlib, and compile
xapian-core-1.2.21 modifying my script to use SUA's gcc-4.2, and deleting
the lines --disable-backend-brass and --disable-backend-chert, it would clear up
whether the 'ambiguous overload' error would be resolved on these two
backends utilising SUA's 6.0 or 6.1 gcc-4.2.
If the error still occurs then the compile might be rerun with those backends
again disabled and the results of 'gmake check' when run on a machine
with network access could be posted.
All of my work on the Interix port has been done on a hacked and modified SFU
Interix 3.5 installation on XP Home.
- - -
Interix and mmap() semantics are mentioned here:
http://lbw.sourceforge.net/broken.html
On Wed, Sep 30, 2015 at V07:28:36AM -0700, Eric Lindblad wrote:> The xapian-core-1.2.21 'ambiguous overload' error on the files > /backends/brass/brass_check.cc and /backends/chert/chert_check.cc > appear to be resultant of a bug reported in gcc-3.3.4, which was fixed > for 3.4.2 [Sept. 6, 2004] and 3.5. > > Bug 16854 - streams missing "long long" specializations on Tru64 > https://gcc.gnu.org/bugzilla/show_bug.cgi?format=multiple&id=16854OK, that's easy to work around in Xapian code we can use the str() function which converts a number to a std::string, and so change: cout << i; to be: cout << str(i); This should work everywhere, and this isn't at all performance critical code, so we can just do it unconditionally. It's also only relevant to 1.2.x - for 1.3.x you now need C++11 support. That definitely needs at least GCC 4.4, and probably realistically something newer. This patch should help: http://trac.xapian.org/changeset/9b0aa7d6f5eaaa7a493821dd936fee80d5eac13e/git?format=diff&new=9b0aa7d6f5eaaa7a493821dd936fee80d5eac13e If you hit more instances, a similar fix should work. Cheers, Olly