c++/libc++ help needed for chromium update
Christoph Moench-Tegeder
cmt at burggraben.net
Wed Mar 16 21:27:55 UTC 2016
Hi,
I'm currently working on updating www/chromium to the latest
version (the 49 versions). Recently (that is, during development
of version 49) the chromium developers allowed some c++11 features
to be used.
Included in those is std::move(), replacing their homegrown
rvalue-reference-generating code (the .Pass() hack). That
required me to use lang/clang36 as a compiler (with our
clang 3.4.1 in FreeBSD 10 I got a bunch of obviously "wrong
errors").
The following is my interpretation, grain-of-salt applies.
There's one issue remaining: this line
https://chromium.googlesource.com/chromium/src.git/+/49.0.2623.87/sync/internal_api/public/data_batch_impl.cc#15
causes an compiler error - complaining that a copy-assignment
operator had to be used but the operator had been deleted (error
message attached, it's a little unwieldy).
The scoped_ptr implementation is this one:
https://chromium.googlesource.com/chromium/src.git/+/49.0.2623.87/base/memory/scoped_ptr.h
and the magic DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND()
has been defined here:
https://chromium.googlesource.com/chromium/src.git/+/49.0.2623.87/base/move.h#35
The key_data_pairs_ thing is a std::vector<KeyAndData>
https://chromium.googlesource.com/chromium/src.git/+/49.0.2623.87/sync/internal_api/public/data_batch_impl.h#41
while KeyAndData is a std::pair<>
https://chromium.googlesource.com/chromium/src.git/+/49.0.2623.87/sync/api/data_batch.h#18
(I think you get the hang of it...)
As clang is the "official" compiler used upstream, and after some
research into C++ land (I'm from the plain C side), I'm suspecting
that our libc++ is at fault (and it's behind upstream, of course,
but there's no "simple" way of importing a new one - devel/libc++
leaves the templates in /usr/include alone). Build results on
FreeBSD 11 are still... building
Could anyone point me in a direction to resolve this?
Regards,
Christoph
--
Spare Space
-------------- next part --------------
FAILED: /usr/local/bin/clang++36 -MMD -MF obj/sync/internal_api/public/sync_core.data_batch_impl.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=255169-1 -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DDONT_EMBED_BUILD_METADATA -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSYNC_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=0 -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen/shim_headers/snappy/target -Igen/shim_headers/re2/target -Igen/shim_headers/icuuc/target -Igen/shim_headers/icui18n/target -Igen/shim_headers/libevent/target -Igen -I../.. -I../../third_party/leveldatabase/src/include -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/zlib -Igen/protoc_out -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-strict-aliasing -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -fcolor-diagnostics -Wheader-hygiene -Wfor-loop-analysis -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wexit-time-destructors -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -pthread -I/usr/local/include -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/include/nspr -Wno-header-guard -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -O2 -pipe -march=core2 -isystem/usr/local/include -I/usr/local/include/atk-1.0 -Wno-unknown-warning-option -fstack-protector -fno-strict-aliasing -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -c ../../sync/internal_api/public/data_batch_impl.cc -o obj/sync/internal_api/public/sync_core.data_batch_impl.o
In file included from ../../sync/internal_api/public/data_batch_impl.cc:5:
In file included from ../../sync/internal_api/public/data_batch_impl.h:10:
In file included from /usr/include/c++/v1/string:439:
In file included from /usr/include/c++/v1/algorithm:627:
/usr/include/c++/v1/utility:284:11: error: call to deleted constructor of 'scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> >'
second(__p.second)
^ ~~~~~~~~~~
/usr/include/c++/v1/memory:1645:31: note: in instantiation of member function 'std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >::pair' requested here
::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
^
/usr/include/c++/v1/memory:1572:18: note: in instantiation of function template specialization 'std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > >::construct<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, const std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > &>' requested here
{__a.construct(__p, _VSTD::forward<_Args>(__args)...);}
^
/usr/include/c++/v1/memory:1453:14: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::__construct<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, const std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > &>' requested here
{__construct(__has_construct<allocator_type, _Tp*, _Args...>(),
^
/usr/include/c++/v1/memory:1535:17: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::construct<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, const std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > &>' requested here
construct(__a, _VSTD::__to_raw_pointer(__end2-1), _VSTD::move_if_noexcept(*--__end1));
^
/usr/include/c++/v1/vector:897:21: note: in instantiation of function template specialization 'std::__1::allocator_traits<std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::__construct_backward<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > *>' requested here
__alloc_traits::__construct_backward(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
^
/usr/include/c++/v1/vector:1583:5: note: in instantiation of member function 'std::__1::vector<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::__swap_out_circular_buffer' requested here
__swap_out_circular_buffer(__v);
^
/usr/include/c++/v1/vector:1620:9: note: in instantiation of function template specialization 'std::__1::vector<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::__push_back_slow_path<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > >' requested here
__push_back_slow_path(_VSTD::move(__x));
^
../../sync/internal_api/public/data_batch_impl.cc:15:19: note: in instantiation of member function 'std::__1::vector<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_v2::EntityData> > > > >::push_back' requested here
key_data_pairs_.push_back(KeyAndData(client_key, std::move(specifics)));
^
../../base/memory/scoped_ptr.h:241:47: note: 'scoped_ptr' has been explicitly marked deleted here
DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND(scoped_ptr)
^
../../base/move.h:47:3: note: expanded from macro 'DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND'
type(const type&) = delete; \
^
1 error generated.
More information about the freebsd-toolchain
mailing list