From owner-freebsd-current@FreeBSD.ORG Sun Nov 30 18:57:41 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B30BEFB; Sun, 30 Nov 2014 18:57:41 +0000 (UTC) Received: from smtpout1.timeweb.ru (smtpout1.timeweb.ru [92.53.117.15]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5BD61A; Sun, 30 Nov 2014 18:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=amdmi3.ru; s=dkim; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=JqqPODljyptMY6CPMXAW0CZDEYcwOLXafPU2KpTgIe4=; b=MoJ4GTVa9IM8ppiwT93gCOQLdyEr2NrMw1rVTQu8QGrytE1Mr3BMOOU7kcTWtxny5LfuK+SZQI2GQJI2hO2a/WL07WxK9ggFmjAYGFjH6sJkn8bljVkHh4tx+tkJ39cVGpwW8oRg8cQZMCVEDARUFsVNCXwdzKOg1MJb3Cr0isc=; Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1Xv9gZ-000AKo-Ao; Sun, 30 Nov 2014 21:57:31 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id A129E18A; Sun, 30 Nov 2014 21:57:30 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 625AD97CF; Sun, 30 Nov 2014 21:57:30 +0300 (MSK) Date: Sun, 30 Nov 2014 21:57:30 +0300 From: Dmitry Marakasov To: Dimitry Andric Subject: Re: RFT: Please help testing the llvm/clang 3.5.0 import Message-ID: <20141130185730.GA73028@hades.panopticon> References: <8598B1D4-5485-426F-B6D6-22BF26AC5FE1@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8598B1D4-5485-426F-B6D6-22BF26AC5FE1@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: FreeBSD ARM , FreeBSD-Current , FreeBSD ports 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: Sun, 30 Nov 2014 18:57:41 -0000 * Dimitry Andric (dim@FreeBSD.org) wrote: > We're working on updating llvm, clang and lldb to 3.5.0 in head. > This is quite a big update again, and any help with testing is > appreciated. Well, of 4 error logs from exp-run I've checked (one my port and 3 unmaintained ports) two had basically the same problem and it seems to be libc++ related, so I ask: was new version of libc++ imported along with clang/llvm? Past experience show that libc++ should be updated along with clang, as it may have bugs new clang versions are not tolerable to. I've prepared the minimal test program to demonstrate the problem: --- test.cc begins here --- #include #include class Foo { public: void Const() const { std::cerr << "OK" << std::endl; } }; int main() { Foo foo; auto f = std::bind(&Foo::Const, foo); f(); return 0; } --- test.cc ends here --- Note that the method std::bind is used on is const (non-const methods produce no problems). Here's how it works: --- test.log begins here --- % for CC in c++ g++48 g++49 g++5 clang++33 clang++34 clang++35; do echo "===> ${CC}"; ${CC} -std=c++11 test.cc && ./a.out; done ===> c++ OK ===> g++48 OK ===> g++49 OK ===> g++5 OK ===> clang++33 OK ===> clang++34 OK ===> clang++35 In file included from test.cc:1: In file included from /usr/include/c++/v1/functional:474: /usr/include/c++/v1/type_traits:433:76: error: no matching function for call to '__source' : public integral_constant(__is_function_imp::__source<_Tp>())) == 1> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/v1/type_traits:438:14: note: in instantiation of template class 'std::__1::__libcpp_is_function' requested here : public __libcpp_is_function<_Tp> {}; ^ /usr/include/c++/v1/type_traits:443:97: note: in instantiation of template class 'std::__1::is_function' requested here template struct __libcpp_is_member_function_pointer<_Tp _Up::*> : public is_function<_Tp> {}; ^ /usr/include/c++/v1/type_traits:446:14: note: in instantiation of template class 'std::__1::__libcpp_is_member_function_pointer' requested here : public __libcpp_is_member_function_pointer::type> {}; ^ /usr/include/c++/v1/type_traits:460:38: note: in instantiation of template class 'std::__1::is_member_function_pointer' requested here !is_member_function_pointer<_Tp>::value> {}; ^ /usr/include/c++/v1/type_traits:3093:17: note: in instantiation of template class 'std::__1::is_member_object_pointer' requested here is_member_object_pointer::type>::value && ^ /usr/include/c++/v1/type_traits:3100:1: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) __invoke(_Fp&& __f, _A0&& __a0) ^ /usr/include/c++/v1/type_traits:3126:11: note: in instantiation of template class 'std::__1::__invokable_imp' requested here __invokable_imp<_Fp, _Args...>::value> ^ /usr/include/c++/v1/functional:1973:31: note: in instantiation of template class 'std::__1::__invokable' requested here static const bool value = __invokable<_Fp, ^ /usr/include/c++/v1/functional:1985:18: note: in instantiation of template class 'std::__1::_is_valid_bind_return, std::__1::tuple<> >' requested here bool = _is_valid_bind_return<_Fp, _BoundArgs, _TupleUj>::value> ^ /usr/include/c++/v1/functional:2082:18: note: in instantiation of default argument for '__bind_return, std::__1::tuple<> >' required here typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test.cc:12:3: note: while substituting deduced template arguments into function template 'operator()' [with _Args = <>] f(); ^ /usr/include/c++/v1/type_traits:424:28: note: candidate template ignored: substitution failure [with _Tp = void () const]: reference to function type 'void () const' cannot have 'const' qualifier template _Tp& __source(); ~~~ ^ test.cc:12:2: error: no matching function for call to object of type 'std::__1::__bind' f(); ^ /usr/include/c++/v1/functional:2083:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return, std::__1::tuple<>, false>' operator()(_Args&& ...__args) ^ /usr/include/c++/v1/functional:2092:9: note: candidate template ignored: substitution failure [with _Args = <>]: implicit instantiation of undefined template 'std::__1::__bind_return, std::__1::tuple<>, false>' operator()(_Args&& ...__args) const ^ 2 errors generated. --- test.log ends here --- I think this should be fixed in the first place. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru