In file included from ../../services/ui/ws/window_manager_state.cc:5: In file included from ../../services/ui/ws/window_manager_state.h:10: In file included from /usr/include/c++/v1/memory:599: /usr/include/c++/v1/__config:58:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ ^ 1 error generated. http://package18.nyi.freebsd.org/data/headi386PR212343-default/2016-09-11_07h04m19s/logs/errors/chromium-52.0.2743.116.log http://package18.nyi.freebsd.org/data/headamd64PR212343-default/2016-09-13_07h18m01s/logs/errors/chromium-52.0.2743.116.log
Adding the following to www/chromium/Makefile.local unbreaks build for 52.* BUILD_DEPENDS+= ${LOCALBASE}/include/c++/v1/__config:devel/libc++ CXXFLAGS+= -nostdinc++ -isystem ${LOCALBASE}/include/c++/v1 but not for 54.* (see review D8517) which no longer respects CXXFLAGS.
It looks wise using devel/libc++ for me. -isystem flag has it's place in GN system and now it's time to use it, probably.
(In reply to Jan Beich (mail not working) from comment #1) Could you try removing _LIBCPP_TRIVIAL_PAIR_COPY_CTOR completely from build system? If I understand it right libc++ from ports has expected behaviour, and would work without hacks, is it? Here: https://github.com/gliaskos/freebsd-chromium/blob/master/www/chromium/files/patch-services_ui_ws_BUILD.gn Or just remove the patch and build it again. Jan would you prefer to finish this by yourself or do you need help, etc? I could do it also, but I want you to finish this, since you have started and idea is your.
(In reply to clutton from comment #3) > Could you try removing _LIBCPP_TRIVIAL_PAIR_COPY_CTOR completely > from build system? Chromium 52 builds fine then. > Or just remove the patch and build it again. Chromium 54 fails with In file included from ../../services/ui/ws/user_activity_monitor.cc:5: In file included from ../../services/ui/ws/user_activity_monitor.h:8: In file included from ../../base/time/tick_clock.h:9: In file included from ../../base/time/time.h:60: In file included from ../../base/numerics/safe_math.h:13: In file included from ../../base/logging.h:12: In file included from /usr/include/c++/v1/sstream:174: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:442: In file included from /usr/include/c++/v1/algorithm:633: /usr/include/c++/v1/utility:316:11: error: call to deleted constructor of 'mojo::InterfacePtr<ui::mojom::UserActivityObserver>' second(__p.second) ^ ~~~~~~~~~~ /usr/include/c++/v1/memory:1747:31: note: in instantiation of member function 'std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >::pair' requested here ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); ^ /usr/include/c++/v1/memory:1658:18: note: in instantiation of function template specialization 'std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > >::construct<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > &>' requested here {__a.construct(__p, _VSTD::forward<_Args>(__args)...);} ^ /usr/include/c++/v1/memory:1504:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::__construct<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > &>' requested here {__construct(__has_construct<allocator_type, _Tp*, _Args...>(), ^ /usr/include/c++/v1/memory:1620:17: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::construct<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > &>' requested here construct(__a, _VSTD::__to_raw_pointer(__end2-1), _VSTD::move_if_noexcept(*--__end1)); ^ /usr/include/c++/v1/vector:892:21: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::__construct_backward<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > *>' requested here __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_); ^ /usr/include/c++/v1/vector:1577:5: note: in instantiation of member function 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::__swap_out_circular_buffer' requested here __swap_out_circular_buffer(__v); ^ /usr/include/c++/v1/vector:1614:9: note: in instantiation of function template specialization 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::__push_back_slow_path<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > >' requested here __push_back_slow_path(_VSTD::move(__x)); ^ ../../services/ui/ws/user_activity_monitor.cc:62:23: note: in instantiation of member function 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::ActivityObserverInfo, mojo::InterfacePtr<ui::mojom::UserActivityObserver> > > >::push_back' requested here activity_observers_.push_back(std::make_pair(info, std::move(observer))); ^ ../../mojo/public/cpp/bindings/interface_ptr.h:214:28: note: 'InterfacePtr' has been explicitly marked deleted here DISALLOW_COPY_AND_ASSIGN(InterfacePtr); ^ In file included from ../../services/ui/ws/user_activity_monitor.cc:5: In file included from ../../services/ui/ws/user_activity_monitor.h:8: In file included from ../../base/time/tick_clock.h:9: In file included from ../../base/time/time.h:60: In file included from ../../base/numerics/safe_math.h:13: In file included from ../../base/logging.h:12: In file included from /usr/include/c++/v1/sstream:174: In file included from /usr/include/c++/v1/ostream:138: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:442: In file included from /usr/include/c++/v1/algorithm:633: /usr/include/c++/v1/utility:316:11: error: call to deleted constructor of 'mojo::InterfacePtr<ui::mojom::UserIdleObserver>' second(__p.second) ^ ~~~~~~~~~~ /usr/include/c++/v1/memory:1747:31: note: in instantiation of member function 'std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >::pair' requested here ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); ^ /usr/include/c++/v1/memory:1658:18: note: in instantiation of function template specialization 'std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > >::construct<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > &>' requested here {__a.construct(__p, _VSTD::forward<_Args>(__args)...);} ^ /usr/include/c++/v1/memory:1504:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::__construct<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > &>' requested here {__construct(__has_construct<allocator_type, _Tp*, _Args...>(), ^ /usr/include/c++/v1/memory:1620:17: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::construct<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, const std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > &>' requested here construct(__a, _VSTD::__to_raw_pointer(__end2-1), _VSTD::move_if_noexcept(*--__end1)); ^ /usr/include/c++/v1/vector:892:21: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::__construct_backward<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > *>' requested here __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_); ^ /usr/include/c++/v1/vector:1577:5: note: in instantiation of member function 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::__swap_out_circular_buffer' requested here __swap_out_circular_buffer(__v); ^ /usr/include/c++/v1/vector:1614:9: note: in instantiation of function template specialization 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::__push_back_slow_path<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > >' requested here __push_back_slow_path(_VSTD::move(__x)); ^ ../../services/ui/ws/user_activity_monitor.cc:80:19: note: in instantiation of member function 'std::__1::vector<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> >, std::__1::allocator<std::__1::pair<ui::ws::UserActivityMonitor::IdleObserverInfo, mojo::InterfacePtr<ui::mojom::UserIdleObserver> > > >::push_back' requested here idle_observers_.push_back(std::make_pair(info, std::move(observer))); ^ ../../mojo/public/cpp/bindings/interface_ptr.h:214:28: note: 'InterfacePtr' has been explicitly marked deleted here DISALLOW_COPY_AND_ASSIGN(InterfacePtr); ^
(In reply to Jan Beich (mail not working) from comment #4) Ok, nice to hear that we don't need LIBCPP_TRIVIAL_PAIR_COPY_CTOR with ports' libc++ I guess you wouldn't mine if I'll implement this in 54, would you?
(In reply to clutton from comment #5) It seems I've forgoten to reply, devel/libc++ is too old for chromium 54. It can't be used.
The bug can be closed. libc++ wasn't updated for too long, and chromium needs newer implementation.
Dimitry, do you plan to make _LIBCPP_TRIVIAL_PAIR_COPY_CTOR behavior default in 12.0 following devel/libc++ and OS X ? This issue is likely to haunt chromium@ on updates even if someone comes up with a fix. (In reply to clutton from comment #7) > libc++ wasn't updated for too long devel/libc++ is locked down by ABI of the oldest supported FreeBSD release with libc++ by default. Another reason is compatibility with lang/gcc. If chromium 54.* builds fine on 10.3 then the fix may be available in a month, once 10.1 and 10.2 reach EOL.
(In reply to Jan Beich (mail not working) from comment #8) Yes, it builds fine on 10.3 and 10.2, but fails on 10.1
(In reply to clutton from comment #9) > (In reply to Jan Beich (mail not working) from comment #8) > > Yes, it builds fine on 10.3 and 10.2, but fails on 10.1 Hm, you could also use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead, as it indicates. But this would only work on new enough versions of FreeBSD, so you'd have to check __FreeBSD_version.
Hi Dimitry, do you know which versions of FreeBSD are new enough?
(In reply to Dimitry Andric from comment #10) > could also use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead That macro has inverse logic. And -U won't cancel regular #define.
(In reply to Rene Ladan from comment #11) > do you know which versions of FreeBSD are new enough? I imported libc++ 3.9.0 together with clang 3.9.0, and __FreeBSD_version was then bumped to 1200017. (In reply to Jan Beich (mail not working) from comment #12) > (In reply to Dimitry Andric from comment #10) > > could also use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead > > That macro has inverse logic. And -U won't cancel regular #define. Hm, I see that now, it's rather unfortunate. I will check with upstream if we can make this configurable using =0 and =1 instead.
Created attachment 177658 [details] Use different method to enable trivial pair copy constructors for newer libc++ Here is a patch proposal that enables the trivial std::pair copy constructors for newer libc++, in a different way, namely defining _LIBCPP_ABI_UNSTABLE instead. This was a suggestion from upstream. Unfortunately we've patched up one of the BUILD.gn files to accomplish this, so I have now split this up in two separate EXTRA_PATCHES files. If there is a nicer and cleaner way to do this, I'm all ears. With this, chromium builds and runs just fine for me on head r309213 with clang and libc++ 3.9.0, under light testing.
(In reply to Dimitry Andric from comment #14) Unless devel/libc++ would be of llvm39 version this is the way to go.
(In reply to Dimitry Andric from comment #14) Using your patch, chromium builds fine on HEAD. Tested for amd64 and i386 archs.
(In reply to Carlos J. Puga Medina from comment #16) Carlos, could you apply the patch asap? The build is broken without it now.
The patch resolves the build failures under amd64 and i386.
(In reply to clutton from comment #17) I will keep the patch on hold until the next chromium update to 55. chromium update to 55.0.2883.87 is coming.
Could you please add the patch onto chromium-54.0? There is no visibility for when the update to chromium-55 will occur.
Yes, please. For weeks I am forced to use Firefox on HEAD and it's a royal PITA.
A commit references this bug: Author: cpm Date: Wed Jan 11 10:26:34 UTC 2017 New revision: 431170 URL: https://svnweb.freebsd.org/changeset/ports/431170 Log: - Fix build on HEAD In file included from ../../services/ui/ws/window_manager_state.cc:5: In file included from ../../services/ui/ws/window_manager_state.h:10: In file included from /usr/include/c++/v1/memory:599: /usr/include/c++/v1/__config:58:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ ^ 1 error generated. PR: 214654 Submitted by: dim Reported by: jbeich Reviewed by: rene Approved by: chromium (rene) MFH: 2017Q1 Changes: head/www/chromium/Makefile head/www/chromium/files/extra-patch-libc++-new head/www/chromium/files/extra-patch-libc++-old
A commit references this bug: Author: cpm Date: Wed Jan 11 15:04:03 UTC 2017 New revision: 431185 URL: https://svnweb.freebsd.org/changeset/ports/431185 Log: MFH: r431170 - Fix build on HEAD In file included from ../../services/ui/ws/window_manager_state.cc:5: In file included from ../../services/ui/ws/window_manager_state.h:10: In file included from /usr/include/c++/v1/memory:599: /usr/include/c++/v1/__config:58:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead #error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \ ^ 1 error generated. PR: 214654 Submitted by: dim Reported by: jbeich Reviewed by: rene Approved by: chromium (rene) Approved by: ports-secteam (feld) Changes: _U branches/2017Q1/ branches/2017Q1/www/chromium/Makefile branches/2017Q1/www/chromium/files/extra-patch-libc++-new branches/2017Q1/www/chromium/files/extra-patch-libc++-old
Committed! Thanks