powerpc64-xtoolchain-gcc (gcc 4.9.1) reports: /usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: error: ambiguous overload
Mark Millard
markmi at dsl-only.net
Mon Mar 16 14:03:53 UTC 2015
Basic context (more is listed later):
# freebsd-version -ku ; uname -ap
11.0-CURRENT
11.0-CURRENT
FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Wed Mar 11 19:23:14 PDT 2015 root at FBSDG4C0:/usr/obj/powerpc.powerpc64/usr/srcC/sys/GENERIC64vtsc-NODEBUG powerpc powerpc64
With my limping-along powerpc64-xtoolchain-gcc being used on a powerpc64 with CROSS_TOOLCHAIN=powerpc64-gcc I recently got it as far as...
The reported ambiguous overload...
In file included from /usr/obj/usr/srcC/tmp/usr/include/atf-c++.hpp:29:0,^M
from /usr/srcC/lib/libnv/tests/dnv_tests.cc:30:^M
/usr/srcC/lib/libnv/tests/dnv_tests.cc: In member function 'virtual void {anonymous}::atfu_tc_dnvlist_take_nvlist__empty::body() const':^M
/usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: error: ambiguous overload for 'operator<<' (operand types are 'std::__1::basic_ostream<char>' and 'std::nullptr_t')^M
ATF_REQUIRE_EQ(actual_val, NULL);^M
^^M
/usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: note: candidates are:^M
In file included from /usr/obj/usr/srcC/tmp/usr/include/c++/v1/sstream:174:0,^M
from /usr/obj/usr/srcC/tmp/usr/include/atf-c++/macros.hpp:29,^M
from /usr/obj/usr/srcC/tmp/usr/include/atf-c++.hpp:29,^M
from /usr/srcC/lib/libnv/tests/dnv_tests.cc:30:^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:320:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(std::__1::basic_ostream<_CharT, _Traits>& (
*)(std::__1::basic_ostream<_CharT, _Traits>&)) [with _CharT = char; _Traits = std::__1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(basic_ostream& (*__pf)(basic_ostream&))^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:328:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(std::__1::basic_ios<_CharT, _Traits>& (*)(s
td::__1::basic_ios<_CharT, _Traits>&)) [with _CharT = char; _Traits = std::__1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(basic_ios<char_type, traits_type>&^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:338:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(std::__1::ios_base& (*)(std::__1::ios_base&
)) [with _CharT = char; _Traits = std::__1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(ios_base& (*__pf)(ios_base&))^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:398:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::_
_1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(bool __n)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:718:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits =
std::__1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(const void* __n)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:346:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::basic_ostream<_CharT, _Traits>::operator<<(std::__1::basic_streambuf<_CharT, _Traits>*
) [with _CharT = char; _Traits = std::__1::char_traits<char>]^M
basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_type>* __sb)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:907:1: note: std::__1::basic_ostream<char, _Traits>& std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const unsigned char*) [with _Traits
= std::__1::char_traits<char>]^M
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:899:1: note: std::__1::basic_ostream<char, _Traits>& std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const signed char*) [with _Traits =
std::__1::char_traits<char>]^M
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:892:1: note: std::__1::basic_ostream<char, _Traits>& std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const char*) [with _Traits = std::__
1::char_traits<char>]^M
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)^M
^^M
/usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:846:1: note: std::__1::basic_ostream<_CharT, _Traits>& std::__1::operator<<(std::__1::basic_ostream<_CharT, _Traits>&, const char*) [with _CharT = char
; _Traits = std::__1::char_traits<char>]^M
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)^M
^^M
Other context details:
make CROSS_TOOLCHAIN=powerpc64-gcc \
WITHOUT_CLANG_BOOTSTRAP= \
WITHOUT_CLANG_IS_CC= WITHOUT_CLANG= WITHOUT_CLANG_EXTRAS= WITHOUT_CLANG_FULL= \
WITHOUT_LLDB= \
WITHOUT_GCC_BOOTSTRAP= WITHOUT_GCC= \
WITHOUT_BINUTILS_BOOTSTRAP= WITHOUT_BINUTILS=
buildworld buildkernel KERNCONF=GENERIC64vtsc-NODEBUG \
TARGET=powerpc TARGET_ARCH=powerpc64
(Yes I was being paranoid about various automatic settings that are based on other ones. Any form of WITH_CLANG= blocks getting as far as I did above.)
This is a clang-not-in-use context (in fact not built at all, not even an old one present), but in order to get by an issue where gcc 4.2.1 is unfortunately used but was being told -std=c++11 based on clang.build.mk during some of my experiments, I have the local/personal hack:
# svnlite diff lib/clang/clang.build.mk
Index: lib/clang/clang.build.mk
===================================================================
--- lib/clang/clang.build.mk (revision 279514)
+++ lib/clang/clang.build.mk (working copy)
@@ -34,8 +34,8 @@
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \
-DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \
-DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\"
-CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti
-CXXFLAGS.clang+= -stdlib=libc++
+CXXFLAGS+= -fno-exceptions -fno-rtti
+CXXFLAGS.clang+= -std=c++11 -stdlib=libc++
.PATH: ${LLVM_SRCS}/${SRCDIR}
As has been pointed out by Dimitry Andric: this hack is not appropriate to the FreeBSD code base since it would only set up -std=c++11 for clang contexts were CXXFLAGS+=${CXXFLAGS.${COMPILER_TYPE}} was also in use.
===
Mark Millard
markmi at dsl-only.net
More information about the freebsd-ppc
mailing list