From owner-svn-src-head@FreeBSD.ORG Mon Oct 22 11:09:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C419A17; Mon, 22 Oct 2012 11:09:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id E0EDF8FC08; Mon, 22 Oct 2012 11:09:08 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d] (unknown [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6FC4F5C59; Mon, 22 Oct 2012 13:09:07 +0200 (CEST) Message-ID: <50852951.5000809@FreeBSD.org> Date: Mon, 22 Oct 2012 13:09:05 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> In-Reply-To: <1TQC0L-000AZG-Q5@internal.tormail.org> Content-Type: multipart/mixed; boundary="------------050005070806040103060009" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 11:09:09 -0000 This is a multi-part message in MIME format. --------------050005070806040103060009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-10-22 09:00, Jan Beich wrote: ... > atf-run fails to link when using -stdlib=libc++. It works if I remove > `throw' from check_stream(). Any clue? > > test-program.o: In function `(anonymous namespace)::check_stream(std::__1::basic_ostream >&)': > /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' > clang++: error: linker command failed with exit code 1 (use -v to see invocation) Strange, for me it compiles (with a bunch of warnings, which I have fixed locally), and links just fine. However, I always use -std=c++11, which -std= flag are you using, if any? That said, I am planning on importing a new drop of libc++ soon, but I would rather see this fixed sooner than later. So I will cherry-pick a few fixes tonight. Meanwhile, here are the local diffs I have for making atf build. -Dimitry PS: As far as I can see, atf doesn't build at all with clang and libstdc++, because there are many warnings caused by -Wsystem-headers... Is there any incentive to fix these? --------------050005070806040103060009 Content-Type: text/x-diff; name="fix-atf-warns-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-atf-warns-1.diff" Index: contrib/atf/atf-report/atf-report.cpp =================================================================== --- contrib/atf/atf-report/atf-report.cpp (revision 241864) +++ contrib/atf/atf-report/atf-report.cpp (working copy) @@ -381,7 +381,6 @@ class ticker_writer : public writer { class xml_writer : public writer { ostream_ptr m_os; - size_t m_curtp, m_ntps; std::string m_tcname, m_tpname; static Index: contrib/atf/atf-run/io.hpp =================================================================== --- contrib/atf/atf-run/io.hpp (revision 241864) +++ contrib/atf/atf-run/io.hpp (working copy) @@ -378,11 +378,6 @@ class pistream : public std::istream, utils::noncopyable { //! - //! \brief The file handle managed by this stream. - //! - int m_fd; - - //! //! \brief The systembuf object used to manage this stream's data. //! systembuf m_systembuf; --------------050005070806040103060009 Content-Type: text/x-diff; name="fix-libcxx-warns-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-libcxx-warns-1.diff" Index: contrib/libc++/include/fstream =================================================================== --- contrib/libc++/include/fstream (revision 241864) +++ contrib/libc++/include/fstream (working copy) @@ -594,7 +594,6 @@ basic_filebuf<_CharT, _Traits>::underflow() size_t __nmemb = _VSTD::min(static_cast(this->egptr() - this->eback() - __unget_sz), static_cast(__extbufend_ - __extbufnext_)); codecvt_base::result __r; - state_type __svs = __st_; size_t __nr = fread((void*)__extbufnext_, 1, __nmemb, __file_); if (__nr != 0) { Index: contrib/libc++/include/locale =================================================================== --- contrib/libc++/include/locale (revision 241864) +++ contrib/libc++/include/locale (working copy) @@ -2830,9 +2830,9 @@ class _LIBCPP_VISIBLE moneypunct virtual string_type do_negative_sign() const {return string_type(1, '-');} virtual int do_frac_digits() const {return 0;} virtual pattern do_pos_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} virtual pattern do_neg_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} }; template @@ -3146,7 +3146,6 @@ money_get<_CharT, _InputIterator>::__do_get(iter_t bool __sb = __flags & ios_base::showbase; if (__sb || __more_needed) { - ios_base::iostate __et = ios_base::goodbit; typename string_type::const_iterator __sym_space_end = __sym.begin(); if (__p > 0 && (__pat.field[__p - 1] == money_base::none || __pat.field[__p - 1] == money_base::space)) { --------------050005070806040103060009--