From owner-freebsd-current@FreeBSD.ORG Wed Mar 4 21:31:39 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72AA06DD; Wed, 4 Mar 2015 21:31:39 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17D603F7; Wed, 4 Mar 2015 21:31:38 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::ad8c:3fcc:9718:e182] (unknown [IPv6:2001:7b8:3a7:0:ad8c:3fcc:9718:e182]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 914C65C47; Wed, 4 Mar 2015 22:31:35 +0100 (CET) Subject: Re: r279514: buildworld failure: /usr/src/lib/libnv/tests/dnv_tests.cc:453:2: error: use of overloaded operator '<<' is ambiguous Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6D2FEF0D-D0A8-421E-9CBD-FDB0F9CBD540"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b5 From: Dimitry Andric In-Reply-To: <6CB3E761-8EFA-4DB4-8395-E15151F4F547@FreeBSD.org> Date: Wed, 4 Mar 2015 22:31:25 +0100 Message-Id: <05BE1405-E939-46E4-B31B-EA8025C53CEA@FreeBSD.org> References: <20150302115057.62d2c74c@prometheus> <20150304123110.48aa4abb@prometheus> <9DE59FA1-D495-4796-B3F5-F96D1472F66C@andric.com> <20150304181852.7bae1df4.ohartman@zedat.fu-berlin.de> <6CB3E761-8EFA-4DB4-8395-E15151F4F547@FreeBSD.org> To: "O. Hartmann" X-Mailer: Apple Mail (2.2070.6) Cc: Julio Merino , freebsd-current , Ryan Stone X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 21:31:39 -0000 --Apple-Mail=_6D2FEF0D-D0A8-421E-9CBD-FDB0F9CBD540 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 04 Mar 2015, at 21:19, Dimitry Andric wrote: >=20 > On 04 Mar 2015, at 18:18, O. Hartmann = wrote: >>=20 >> Am Wed, 4 Mar 2015 14:10:00 +0100 >> Dimitry Andric schrieb: >>=20 >>> On 04 Mar 2015, at 12:31, O. Hartmann = wrote: >>>> On Mon, 2 Mar 2015 08:58:05 -0500 >>>> Ryan Stone wrote: >>>>=20 >>>>> Can you post the contents of your make.conf and src.conf? I = didn't >>>>> see this in any of my "make tinderbox" runs >>>>> _______________________________________________ >>>>> freebsd-current@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" >>>>=20 >>>> The culprit is the option >>>>=20 >>>> CXXFLAGS+=3D -std=3Dc++11 >>>>=20 >>>> in /etc/src.conf >>>=20 >>> Right, it would be nice to have libnv compiling for C++11 though. = I'll have a look >>> later today. > ... >=20 > It is caused by the following test in lib/libnv/tests/dnv_tests.cc: >=20 > ATF_REQUIRE_EQ(actual_val, NULL); >=20 > In C++ mode, ATF_REQUIRE_EQ will attempt to output the value of NULL > onto a std::ostringstream, but this has become ambiguous in C++11. [1] >=20 > The fix is to cast the NULL value to the specific pointer type ATF is > testing against, 'nvlist_t *' in this case. See the attached diff. Hmm, I've now seen that there many more ATF_REQUIRE_EQ() instance in the tests, which compare against NULL. It is rather cumbersome to fix all those, so maybe it should be fixed in atf-c++ instead. Depending on what may be allowed in the headers, something like this: Index: contrib/atf/atf-c++/macros.hpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/atf/atf-c++/macros.hpp (revision 279564) +++ contrib/atf/atf-c++/macros.hpp (working copy) @@ -111,7 +111,8 @@ std::ostringstream atfu_ss; \ atfu_ss << "Line " << __LINE__ << ": " \ << #expected << " !=3D " << #actual \ - << " (" << (expected) << " !=3D " << (actual) << = ")"; \ + << " (" << (expected) << " !=3D " << \ + static_cast<__typeof(expected)>(actual) << ")"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } while (false) However, that breaks several ATF_REQUIRE_EQ() instances in atf-c++ itself, like this: /usr/src/contrib/atf/atf-c++/detail/process_test.cpp: In member function = 'virtual void {anonymous}::atfu_tc_argv_array_init_varargs::body() = const': /usr/src/contrib/atf/atf-c++/macros.hpp:115:59: error: invalid = static_cast from type 'std::__1::string {aka = std::__1::basic_string, = std::__1::allocator >}' to type 'const char*' static_cast<__typeof(expected)>(actual) << ")"; \ ^ /usr/src/contrib/atf/atf-c++/detail/process_test.cpp:174:9: note: in = expansion of macro 'ATF_REQUIRE_EQ' ATF_REQUIRE_EQ(argv[0], std::string("arg0")); ^ So in these cases, the 'expected' argument's type does not match the 'actual' argument's type. It would be a bit of churn to fix all of them... I guess the easiest option is to forcibly disable C++11 if you are using anything from atf-c++, until it is made C++11 compatible. -Dimitry --Apple-Mail=_6D2FEF0D-D0A8-421E-9CBD-FDB0F9CBD540 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlT3ebYACgkQsF6jCi4glqODtQCggwFhOkBUuWyVYYhyryTz8zML kegAoOdKzuazvFyplv15h3u9NYtbhjSW =Etm/ -----END PGP SIGNATURE----- --Apple-Mail=_6D2FEF0D-D0A8-421E-9CBD-FDB0F9CBD540--