Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2016 22:27:49 +0100
From:      Christoph Moench-Tegeder <cmt@burggraben.net>
To:        freebsd-toolchain@freebsd.org
Subject:   c++/libc++ help needed for chromium update
Message-ID:  <20160316212749.GA1426@squirrel.exwg.net>

next in thread | raw e-mail | index | archive | help

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=chromium49_deleted_operator
Content-Transfer-Encoding: quoted-printable

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=3D2 -D_FI=
LE_OFFSET_BITS=3D64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLAN=
G_REVISION=3D255169-1 -DUSE_AURA=3D1 -DUSE_ASH=3D1 -DUSE_PANGO=3D1 -DUSE_CA=
IRO=3D1 -DUSE_DEFAULT_RENDER_THEME=3D1 -DUSE_LIBJPEG_TURBO=3D1 -DUSE_X11=3D=
1 -DUSE_CLIPBOARD_AURAX11=3D1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_WEBRTC=3D1=
 -DENABLE_MEDIA_ROUTER=3D1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_=
POLICY -DENABLE_NOTIFICATIONS -DDONT_EMBED_BUILD_METADATA -DFIELDTRIAL_TEST=
ING_ENABLED -DENABLE_TASK_MANAGER=3D1 -DENABLE_EXTENSIONS=3D1 -DENABLE_PDF=
=3D1 -DENABLE_PLUGINS=3D1 -DENABLE_SESSION_SERVICE=3D1 -DENABLE_THEMES=3D1 =
-DENABLE_AUTOFILL_DIALOG=3D1 -DENABLE_BACKGROUND=3D1 -DENABLE_PRINTING=3D1 =
-DENABLE_BASIC_PRINTING=3D1 -DENABLE_PRINT_PREVIEW=3D1 -DENABLE_SPELLCHECK=
=3D1 -DENABLE_CAPTIVE_PORTAL_DETECTION=3D1 -DENABLE_APP_LIST=3D1 -DENABLE_S=
ETTINGS_APP=3D1 -DENABLE_SUPERVISED_USERS=3D1 -DENABLE_MDNS=3D1 -DENABLE_SE=
RVICE_DISCOVERY=3D1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSIN=
G_DB_LOCAL -DSYNC_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=3D0 -DPROTOBUF_USE=
_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DU=
SE_LIBPCI=3D1 -DUSE_OPENSSL=3D1 -DUSE_GLIB=3D1 -DUSE_NSS_CERTS=3D1 -D__STDC=
_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNO=
TATIONS_ENABLED=3D0 -D_FORTIFY_SOURCE=3D2 -Igen/shim_headers/snappy/target =
-Igen/shim_headers/re2/target -Igen/shim_headers/icuuc/target -Igen/shim_he=
aders/icui18n/target -Igen/shim_headers/libevent/target -Igen -I../.. -I../=
=2E./third_party/leveldatabase/src/include -I../../third_party/leveldatabas=
e/src -I../../third_party/leveldatabase -I../../third_party/protobuf -I../.=
=2E/third_party/protobuf/src -I../../third_party/zlib -Igen/protoc_out -fst=
ack-protector --param=3Dssp-buffer-size=3D4  -pthread -fno-strict-aliasing =
-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisib=
ility=3Dhidden -pipe -fPIC -fcolor-diagnostics -Wheader-hygiene -Wfor-loop-=
analysis -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-cover=
ed-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-=
register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wexi=
t-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/inc=
lude -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/inc=
lude/nspr -Wno-header-guard -m64 -march=3Dx86-64 -O2 -fno-ident -fdata-sect=
ions -ffunction-sections -funwind-tables -O2 -pipe -march=3Dcore2 -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-threa=
dsafe-statics -fvisibility-inlines-hidden -std=3Dgnu++11  -c ../../sync/int=
ernal_api/public/data_batch_impl.cc -o obj/sync/internal_api/public/sync_co=
re.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::Entit=
yData> >'
          second(__p.second)
          ^      ~~~~~~~~~~
/usr/include/c++/v1/memory:1645:31: note: in instantiation of member functi=
on 'std::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::Enti=
tyData, std::__1::default_delete<syncer_v2::EntityData> > >::pair' requeste=
d here
            ::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                              ^
/usr/include/c++/v1/memory:1572:18: note: in instantiation of function temp=
late specialization 'std::__1::allocator<std::__1::pair<std::__1::basic_str=
ing<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<synce=
r_v2::EntityData> > > >::construct<std::__1::pair<std::__1::basic_string<ch=
ar>, 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 temp=
late 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 temp=
late 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::p=
air<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_d=
elete<syncer_v2::EntityData> > > &>' requested here
                construct(__a, _VSTD::__to_raw_pointer(__end2-1), _VSTD::mo=
ve_if_noexcept(*--__end1));
                ^
/usr/include/c++/v1/vector:897:21: note: in instantiation of function templ=
ate 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<s=
td::__1::pair<std::__1::basic_string<char>, scoped_ptr<syncer_v2::EntityDat=
a, std::__1::default_delete<syncer_v2::EntityData> > > *>' requested here
    __alloc_traits::__construct_backward(this->__alloc(), this->__begin_, t=
his->__end_, __v.__begin_);
                    ^
/usr/include/c++/v1/vector:1583:5: note: in instantiation of member functio=
n '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_p=
tr<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 templ=
ate 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_strin=
g<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<syncer_=
v2::EntityData> > > > >::__push_back_slow_path<std::__1::pair<std::__1::bas=
ic_string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete=
<syncer_v2::EntityData> > > >' requested here
        __push_back_slow_path(_VSTD::move(__x));
        ^
=2E./../sync/internal_api/public/data_batch_impl.cc:15:19: note: in instant=
iation of member function 'std::__1::vector<std::__1::pair<std::__1::basic_=
string<char>, scoped_ptr<syncer_v2::EntityData, std::__1::default_delete<sy=
ncer_v2::EntityData> > >, std::__1::allocator<std::__1::pair<std::__1::basi=
c_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)));
                  ^
=2E./../base/memory/scoped_ptr.h:241:47: note: 'scoped_ptr' has been explic=
itly marked deleted here
  DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND(scoped_ptr)
                                              ^
=2E./../base/move.h:47:3: note: expanded from macro 'DISALLOW_COPY_AND_ASSI=
GN_WITH_MOVE_FOR_BIND'
  type(const type&) =3D delete;                                   \
  ^
1 error generated.

--ikeVEW9yuYc//A+q--



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