Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 13:09:05 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Jan Beich <jbeich@tormail.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@FreeBSD.org>, src-committers@freebsd.org
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...
Message-ID:  <50852951.5000809@FreeBSD.org>
In-Reply-To: <1TQC0L-000AZG-Q5@internal.tormail.org>
References:  <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<char, std::__1::char_traits<char> >&)':
> /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios<char, std::__1::char_traits<char> >::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<size_t>(this->egptr() - this->eback() - __unget_sz),
                                  static_cast<size_t>(__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 <class _CharT, bool _International>
@@ -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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50852951.5000809>