Bug 215016 - devel/libc++: Fix std::is_function<void() const> failed
Summary: devel/libc++: Fix std::is_function<void() const> failed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Carlos J. Puga Medina
URL: https://reviews.llvm.org/D7573
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-12-02 21:44 UTC by Carlos J. Puga Medina
Modified: 2016-12-09 14:46 UTC (History)
4 users (show)

See Also:
dim: maintainer-feedback+
cpm: merge-quarterly+


Attachments
patch (4.47 KB, patch)
2016-12-02 21:44 UTC, Carlos J. Puga Medina
cpm: maintainer-approval? (dim)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-12-02 21:44:40 UTC
Created attachment 177620 [details]
patch

The following patch fixes chromium 54.0.2840.100 build on 10.1-RELEASE

[4200/22400] clang++39 -MMD -MF obj/third_party/flatbuffers/flatc/flatc.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_F
 ORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../third_party/flatbuffers/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/wrkdirs/usr/ports/www/chromium/work/chromium-54.0.2840.100=. -pthread -m32 -msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/flatbuffers/src/src/flatc.cpp -o obj/third_party/flatb
 uffers/flatc/flatc.o
FAILED: obj/third_party/flatbuffers/flatc/flatc.o 
clang++39 -MMD -MF obj/third_party/flatbuffers/flatc/flatc.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_MDNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=278861-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE
 =2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -I../../third_party/flatbuffers/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -fcolor-diagnostics -fdebug-prefix-map=/wrkdirs/usr/ports/www/chromium/work/chromium-54.0.2840.100=. -pthread -m32 -msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/flatbuffers/src/src/flatc.cpp -o obj/third_party/flatbuffers/flatc/
 flatc.o
In file included from ../../third_party/flatbuffers/src/src/flatc.cpp:17:
In file included from ../../third_party/flatbuffers/src/include/flatbuffers/flatbuffers.h:26:
In file included from /usr/include/c++/v1/string:439:
In file included from /usr/include/c++/v1/algorithm:624:
/usr/include/c++/v1/type_traits:433:76: error: no matching function for call to '__source'
    : public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__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<void (unsigned char *) const, false>' 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<void (unsigned char *) const>' requested here
template <class _Tp, class _Up> 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<void (flatbuffers::simple_allocator::*)(unsigned char *) const>' requested here
    : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
             ^
/usr/include/c++/v1/type_traits:3065:17: note: in instantiation of template class 'std::__1::is_member_function_pointer<void (flatbuffers::simple_allocator::*)(unsigned char *) const>' requested here
                is_member_function_pointer<typename remove_reference<_Fp>::type>::value &&
                ^
/usr/include/c++/v1/type_traits:3072:1: note: in instantiation of default argument for '__invoke<void (flatbuffers::simple_allocator::*)(unsigned char *) const, flatbuffers::simple_allocator &, unsigned char *&>' required here
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
^~~~~~~~
/usr/include/c++/v1/type_traits:3118:13: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
            __invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)
            ^
/usr/include/c++/v1/type_traits:3118:13: note: while substituting deduced template arguments into function template '__invoke' [with _Fp = std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&> &, _Args = <unsigned char *>]
/usr/include/c++/v1/type_traits:3126:11: note: in instantiation of template class 'std::__1::__invokable_imp<std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&> &, unsigned char *>' requested here
          __invokable_imp<_Fp, _Args...>::value>
          ^
/usr/include/c++/v1/functional:1427:33: note: in instantiation of template class 'std::__1::__invokable<std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&> &, unsigned char *>' requested here
                                __invokable<_Fp&, _ArgTypes...>::value>
                                ^
/usr/include/c++/v1/functional:1454:41: note: in instantiation of default argument for '__callable<std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&> >' required here
                                        __callable<_Fp>::value &&
                                        ^~~~~~~~~~~~~~~
./../third_party/flatbuffers/src/include/flatbuffers/flatbuffers.h:467:7: note: while substituting deduced template arguments into function template 'function' [with _Fp = std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&>]
      std::bind(&simple_allocator::deallocate, allocator_, buf_));
      ^
/usr/include/c++/v1/type_traits:424:28: note: candidate template ignored: substitution failure [with _Tp = void (unsigned char *) const]: reference to function type 'void (unsigned char *) const' cannot have 'const' qualifier
template <class _Tp> _Tp&  __source();
                     ~~~   ^
In file included from ../../third_party/flatbuffers/src/src/flatc.cpp:17:
./../third_party/flatbuffers/src/include/flatbuffers/flatbuffers.h:466:36: error: no matching constructor for initialization of 'std::function<void (uint8_t *)>' (aka 'function<void (unsigned char *)>')
    std::function<void(uint8_t *)> deleter(
                                   ^
/usr/include/c++/v1/functional:1448:5: note: candidate constructor not viable: no known conversion from '__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&>' to 'nullptr_t' for 1st argument
    function(nullptr_t) _NOEXCEPT : __f_(0) {}
    ^
/usr/include/c++/v1/functional:1449:5: note: candidate constructor not viable: no known conversion from '__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&>' to 'const std::__1::function<void (unsigned char *)>' for 1st argument
    function(const function&);
    ^
/usr/include/c++/v1/functional:1450:5: note: candidate constructor not viable: no known conversion from '__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&>' to 'std::__1::function<void (unsigned char *)>' for 1st argument
    function(function&&) _NOEXCEPT;
    ^
/usr/include/c++/v1/functional:1454:41: note: candidate template ignored: disabled by 'enable_if' [with _Fp = std::__1::__bind<void (flatbuffers::simple_allocator::*)(unsigned char *) const, const flatbuffers::simple_allocator &, unsigned char *&>]
                                        __callable<_Fp>::value &&
                                        ^
/usr/include/c++/v1/functional:1460:7: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
      function(allocator_arg_t, const _Alloc&) _NOEXCEPT : __f_(0) {}
      ^
/usr/include/c++/v1/functional:1463:7: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
      function(allocator_arg_t, const _Alloc&, nullptr_t) _NOEXCEPT : __f_(0) {}
      ^
/usr/include/c++/v1/functional:1465:7: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
      function(allocator_arg_t, const _Alloc&, const function&);
      ^
/usr/include/c++/v1/functional:1467:7: note: candidate constructor template not viable: requires 3 arguments, but 1 was provided
      function(allocator_arg_t, const _Alloc&, function&&);
      ^
/usr/include/c++/v1/functional:1469:7: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
      function(allocator_arg_t, const _Alloc& __a, _Fp __f,
      ^
/usr/include/c++/v1/functional:1446:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    function() _NOEXCEPT : __f_(0) {}
    ^
2 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/chromium


See the reference URL associated with this bug for further details.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2016-12-03 13:19:14 UTC
LGTM. This port is in dire need of a major upgrade, but this fix is fine to apply for now. :)
Comment 2 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-12-03 14:12:14 UTC
(In reply to Dimitry Andric from comment #1)

I have taken into account the expected EoL of 10.1-RELEASE within about 4 weeks.

Thanks for you quick reply :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-12-07 09:49:21 UTC
A commit references this bug:

Author: cpm
Date: Wed Dec  7 09:48:39 UTC 2016
New revision: 428042
URL: https://svnweb.freebsd.org/changeset/ports/428042

Log:
  devel/libc++: Fix std::is_function<void() const> failed

  In file included from /usr/include/c++/v1/string:439:
  In file included from /usr/include/c++/v1/algorithm:624:
  /usr/include/c++/v1/type_traits:433:76: error: no matching function for call to '__source'
      : public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__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<void (unsigned char *) const, false>' 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<void (unsigned char *) const>' requested here
  template <class _Tp, class _Up> 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<void (flatbuffers::simple_allocator::*)(unsigned char *) const>' requested here
      : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
               ^

  PR:		215016
  Submitted by:	cpm
  Reviewed by:	dim (maintainer)
  Approved by:	dim (maintainer), feld (mentor, implicit)
  Obtained from:	https://reviews.llvm.org/D7573
  MFH:		2016Q4

Changes:
  head/devel/libc++/files/patch-include_type__traits
  head/devel/libc++/files/patch-test_utilities_meta_meta.unary_meta.unary.cat_function.pass.cpp
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-12-09 14:42:18 UTC
A commit references this bug:

Author: cpm
Date: Fri Dec  9 14:41:58 UTC 2016
New revision: 428209
URL: https://svnweb.freebsd.org/changeset/ports/428209

Log:
  MFH: r428042

  devel/libc++: Fix std::is_function<void() const> failed

  In file included from /usr/include/c++/v1/string:439:
  In file included from /usr/include/c++/v1/algorithm:624:
  /usr/include/c++/v1/type_traits:433:76: error: no matching function for call to '__source'
      : public integral_constant<bool, sizeof(__is_function_imp::__test<_Tp>(__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<void (unsigned char *) const, false>' 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<void (unsigned char *) const>' requested here
  template <class _Tp, class _Up> 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<void (flatbuffers::simple_allocator::*)(unsigned char *) const>' requested here
      : public __libcpp_is_member_function_pointer<typename remove_cv<_Tp>::type> {};
               ^

  PR:		215016
  Submitted by:	cpm
  Reviewed by:	dim (maintainer)
  Approved by:	dim (maintainer), feld (mentor, implicit)
  Obtained from:	https://reviews.llvm.org/D7573

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/devel/libc++/files/patch-include_type__traits
  branches/2016Q4/devel/libc++/files/patch-test_utilities_meta_meta.unary_meta.unary.cat_function.pass.cpp
Comment 5 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-12-09 14:46:40 UTC
Committed, thanks!