[
https://issues.apache.org/jira/browse/MESOS-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gavin updated MESOS-2189:
-------------------------
Comment: was deleted
(was: www.rtat.net)
> Build failure on Linux with clang/llvm and libc++
> -------------------------------------------------
>
> Key: MESOS-2189
> URL: https://issues.apache.org/jira/browse/MESOS-2189
> Project: Mesos
> Issue Type: Bug
> Components: build, libprocess
> Affects Versions: 0.21.0
> Environment: Centos 6.6, llvm 3.3 or 3.5 (builds fine with GCC 4.9.2)
> Reporter: Richard Lake
> Priority: Minor
> Attachments: cpushare.ii
>
>
> Compile with:
> CC=clang; CXX=clang++; CXXFLAGS="-stdlib=libc++"; ../configure --disable-java
> /bin/sh ../libtool --tag=CXX --mode=compile clang++
> -DPACKAGE_NAME=\"mesos\" -DPACKAGE_TARNAME=\"mesos\"
> -DPACKAGE_VERSION=\"0.21.0\" -DPACKAGE_STRING=\"mesos\ 0.21.0\"
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesos\"
> -DVERSION=\"0.21.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD=1 -DHAVE_LIBZ=1
> -DHAVE_LIBCURL=1 -DHAVE_APR_POOLS_H=1 -DHAVE_LIBAPR_1=1
> -DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1
> -DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBSASL2=1 -DHAVE_PYTHON=\"2.6\"
> -DMESOS_HAS_PYTHON=1 -I. -I../../src -Wall -Werror
> -DLIBDIR=\"/usr/local/lib\" -DPKGLIBEXECDIR=\"/usr/local/libexec/mesos\"
> -DPKGDATADIR=\"/usr/local/share/mesos\" -I../../include
> -I../../3rdparty/libprocess/include
> -I../../3rdparty/libprocess/3rdparty/stout/include -I../include
> -I../include/mesos -I../3rdparty/libprocess/3rdparty/boost-1.53.0
> -I../3rdparty/libprocess/3rdparty/picojson-4f93734
> -I../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src
> -I../3rdparty/libprocess/3rdparty/glog-0.3.3/src
> -I../3rdparty/libprocess/3rdparty/glog-0.3.3/src
> -I../3rdparty/leveldb/include -I../3rdparty/zookeeper-3.4.5/src/c/include
> -I../3rdparty/zookeeper-3.4.5/src/c/generated
> -I../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src
> -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/usr/include/apr-1.0
> -stdlib=libc++ -std=c++11 -MT
> slave/containerizer/isolators/cgroups/libmesos_no_3rdparty_la-cpushare.lo -MD
> -MP -MF
> slave/containerizer/isolators/cgroups/.deps/libmesos_no_3rdparty_la-cpushare.Tpo
> -c -o
> slave/containerizer/isolators/cgroups/libmesos_no_3rdparty_la-cpushare.lo
> `test -f 'slave/containerizer/isolators/cgroups/cpushare.cpp' || echo
> '../../src/'`slave/containerizer/isolators/cgroups/cpushare.cpp
> In file included from
> ../../src/slave/containerizer/isolators/cgroups/cpushare.cpp:26:
> In file included from ../../3rdparty/libprocess/include/process/collect.hpp:7:
> In file included from ../../3rdparty/libprocess/include/process/defer.hpp:2:
> In file included from
> ../../3rdparty/libprocess/include/process/c++11/defer.hpp:7:
> In file included from
> ../../3rdparty/libprocess/include/process/deferred.hpp:2:
> ../../3rdparty/libprocess/include/process/c++11/deferred.hpp:171:385: error:
> no matching conversion for functional-style cast from 'const
> std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>'
> to 'std::function<void (const Future<list<Nothing, allocator<Nothing> >
> > &)>'
> ../../3rdparty/libprocess/include/process/future.hpp:192:56: note: in
> instantiation of function template specialization
>
> 'process::_Deferred<std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>
> >::operator function<const process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > &>' requested here
> return onAny(std::function<void(const Future<T>&)>(deferred));
> ^
> ../../src/slave/containerizer/isolators/cgroups/cpushare.cpp:506:6: note: in
> instantiation of function template specialization
> 'process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> >::onAny<std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>
> >' requested here
> .onAny(defer(PID<CgroupsCpushareIsolatorProcess>(this),
> ^
> /usr/include/c++/v1/functional:1448:5: note: candidate constructor not
> viable: no known conversion from 'const
> std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>'
> 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 'const
> std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>'
> to 'const std::__1::function<void (const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> > > &)>'
> for 1st argument
> function(const function&);
> ^
> /usr/include/c++/v1/functional:1450:5: note: candidate constructor not
> viable: no known conversion from 'const
> std::__1::__bind<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>'
> to 'std::__1::function<void (const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> > > &)>'
> 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<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > >
> (std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>::*)(const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &) const,
> std::__1::function<process::Future<std::__1::list<Nothing,
> std::__1::allocator<Nothing> > > (const mesos::ContainerID &, const
> process::Future<std::__1::list<Nothing, std::__1::allocator<Nothing> >
> > &)>, mesos::ContainerID &, std::__1::placeholders::__ph<1> &>]
> __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) {}
> ^
> 1 error generated.
> Note that with the intermediate source I can isolate the problem to the
> following expansion from deferred.hpp:
> template < typename P0> operator std::function<void( P0)> () const
> {
> if (pid.isNone()) {
> return std::function<void( P0)>(f); // *** error
> }
>
> Option<UPID> pid_ = pid;
> F f_ = f;
>
> return std::function<void( P0)>(
> [=] ( P0 p0) {
> std::function<void()> f__([=] () { f_( p0); });
> dispatch(pid_.get(), f__);
> });
> }
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)