Environment: Ubuntu 18.04
Watchman ver: v4.9.0
Folly version: 2d6a8fcbde9acb7689d49cba543ce39465ccb23b (Tue Oct 16 11:50:35 2018)
Problem:
It seems not related to folly going out of sync, but still could be related to versioning problem. It would also be nice to know which version of folly is compatible with latest stable release.
make fails with the following error:
make all-am
make[1]: Entering directory '/home/ideahitme/watchman'
CXX cppclient/libwatchmanclient_la-WatchmanClient.lo
In file included from /usr/local/include/folly/functional/ApplyTuple.h:25:0,
from /usr/local/include/folly/hash/Hash.h:29,
from /usr/local/include/folly/FBString.h:59,
from /usr/local/include/folly/Demangle.h:19,
from /usr/local/include/folly/ExceptionWrapper.h:33,
from cppclient/WatchmanConnection.h:10,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/functional/Invoke.h: In substitution of ‘template<class F, class ... Args> using invoke_result_t = typename folly::invoke_result::type [with F = watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>; Args = {folly::Try<folly::dynamic>&&}]’:
/usr/local/include/folly/futures/Future-pre.h:95:45: required from ‘struct folly::futures::detail::argResult<true, watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>, folly::Try<folly::dynamic>&&>’
/usr/local/include/folly/futures/Future-pre.h:111:54: required from ‘struct folly::futures::detail::callableResult<folly::dynamic, watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)> >’
/usr/local/include/folly/futures/Future.h:1183:22: required by substitution of ‘template<class F, class R> typename R::Return folly::Future<folly::dynamic>::then<F, R>(F&&) & [with F = watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>; R = folly::futures::detail::callableResult<folly::dynamic, watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)> >]’
cppclient/WatchmanClient.cpp:89:8: required from here
/usr/local/include/folly/functional/Invoke.h:142:65: error: no type named ‘type’ in ‘struct folly::invoke_result<watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>, folly::Try<folly::dynamic>&&>’
using invoke_result_t = typename invoke_result<F, Args...>::type;
^
cppclient/WatchmanClient.cpp: In member function ‘folly::Future<std::shared_ptr<watchman::WatchPath> > watchman::WatchmanClient::watch(folly::StringPiece)’:
cppclient/WatchmanClient.cpp:89:8: error: no matching function for call to ‘folly::Future<folly::dynamic>::then(watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>)’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: candidate: template<class F, class R> typename std::enable_if<((! folly::is_invocable<F>::value) && folly::is_invocable<F, T&&>::value), typename R::Return>::type folly::Future<T>::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1160:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1168:3: note: candidate: template<class F, class R> typename std::enable_if<((! folly::is_invocable<F, T&&>::value) && (! folly::is_invocable<F>::value)), typename R::Return>::type folly::Future<T>::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1168:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1175:3: note: candidate: template<class F, class R> typename std::enable_if<folly::is_invocable<F>::value, typename R::Return>::type folly::Future<T>::then(F&&) && [with F = F; R = R; T = folly::dynamic]
then(F&& func) && {
^~~~
/usr/local/include/folly/futures/Future.h:1175:3: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h:1183:22: note: candidate: template<class F, class R> typename R::Return folly::Future<T>::then(F&&) & [with F = F; R = R; T = folly::dynamic] <deleted>
typename R::Return then(F&& func) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1183:22: note: substitution of deduced template arguments resulted in errors seen above
/usr/local/include/folly/futures/Future.h:1207:39: note: candidate: template<class R, class Caller, class ... Args> folly::Future<typename folly::isFuture<F>::Inner> folly::Future<T>::then(R (Caller::*)(Args ...), Caller*) && [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
Future<typename isFuture<R>::Inner> then(
^~~~
/usr/local/include/folly/futures/Future.h:1207:39: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: mismatched types ‘R (Caller::*)(Args ...)’ and ‘watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1216:3: note: candidate: template<class R, class Caller, class ... Args> folly::Future<typename folly::isFuture<F>::Inner> folly::Future<T>::then(R (Caller::*)(Args ...), Caller*) & [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic] <deleted>
then(R (Caller::*func)(Args...), Caller* instance) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1216:3: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: mismatched types ‘R (Caller::*)(Args ...)’ and ‘watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1242:8: note: candidate: template<class Arg> auto folly::Future<T>::then(folly::Executor*, Arg&&) && [with Arg = Arg; T = folly::dynamic]
auto then(Executor* x, Arg&& arg) && {
^~~~
/usr/local/include/folly/futures/Future.h:1242:8: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects 2 arguments, 1 provided
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1256:8: note: candidate: template<class R, class Caller, class ... Args> auto folly::Future<T>::then(folly::Executor*, R (Caller::*)(Args ...), Caller*) && [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
auto then(Executor* x, R (Caller::*func)(Args...), Caller* instance) && {
^~~~
/usr/local/include/folly/futures/Future.h:1256:8: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects 3 arguments, 1 provided
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1266:3: note: candidate: template<class Arg, class ... Args> auto folly::Future<T>::then(folly::Executor*, Arg&&, Args&& ...) & [with Arg = Arg; Args = {Args ...}; T = folly::dynamic] <deleted>
then(Executor* x, Arg&& arg, Args&&... args) & = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1266:3: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects at least 2 arguments, 1 provided
});
^
In file included from /usr/local/include/folly/futures/Future.h:2061:0,
from cppclient/WatchmanConnection.h:13,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future-inl.h:1121:14: note: candidate: folly::Future<folly::Unit> folly::Future<T>::then() && [with T = folly::dynamic]
Future<Unit> Future<T>::then() && {
^~~~~~~~~
/usr/local/include/folly/futures/Future-inl.h:1121:14: note: candidate expects 0 arguments, 1 provided
cppclient/WatchmanClient.cpp: In member function ‘folly::Future<std::shared_ptr<watchman::Subscription> > watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)’:
cppclient/WatchmanClient.cpp:113:8: warning: ‘typename std::enable_if<((! folly::is_invocable<F>::value) && folly::is_invocable<F, T&&>::value), typename R::Return>::type folly::Future<T>::then(F&&) && [with F = watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)::<lambda(folly::dynamic)>; R = folly::futures::detail::callableResult<folly::dynamic, watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)::<lambda(folly::dynamic)> >; T = folly::dynamic; typename std::enable_if<((! folly::is_invocable<F>::value) && folly::is_invocable<F, T&&>::value), typename R::Return>::type = folly::Future<std::shared_ptr<watchman::Subscription> >]’ is deprecated: use thenValue instead [-Wdeprecated-declarations]
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: declared here
then(F&& func) && {
^~~~
cppclient/WatchmanClient.cpp: In member function ‘folly::Future<std::shared_ptr<watchman::Subscription> > watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&)’:
cppclient/WatchmanClient.cpp:124:8: warning: ‘typename std::enable_if<((! folly::is_invocable<F>::value) && folly::is_invocable<F, T&&>::value), typename R::Return>::type folly::Future<T>::then(F&&) && [with F = watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&)::<lambda(watchman::WatchPathPtr)>; R = folly::futures::detail::callableResult<std::shared_ptr<watchman::WatchPath>, watchman::WatchmanClient::subscribe(const folly::dynamic&, folly::StringPiece, folly::Executor*, watchman::SubscriptionCallback&&)::<lambda(watchman::WatchPathPtr)> >; T = std::shared_ptr<watchman::WatchPath>; typename std::enable_if<((! folly::is_invocable<F>::value) && folly::is_invocable<F, T&&>::value), typename R::Return>::type = folly::Future<std::shared_ptr<watchman::Subscription> >]’ is deprecated: use thenValue instead [-Wdeprecated-declarations]
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1160:3: note: declared here
then(F&& func) && {
^~~~
Makefile:1960: recipe for target 'cppclient/libwatchmanclient_la-WatchmanClient.lo' failed
make[1]: *** [cppclient/libwatchmanclient_la-WatchmanClient.lo] Error 1
make[1]: Leaving directory '/home/ideahitme/watchman'
Makefile:1101: recipe for target 'all' failed
make: *** [all] Error 2
I have some changes running through our internal CI to add a dep on folly to the main watchman build; those changes add a script to fetch the current folly version (and all of the difficult deps) and build them as needed. Once that has landed I expect to have to do another couple of rounds with the travis/appveyor/circle ci, and then we can revisit how well the cppclient code builds.
Please bear with me on this!
@wez Did that change land? I'm trying to get watchman to build on Ubuntu 16.04 and seeing the same issue.
Some guidance on version compatibility would be great (although in my case, it seems to extend past watchman anyway).
@wez Did that change land? I'm trying to get watchman to build on Ubuntu 18.04 and seeing the same issue.
which version of folly is compatible with latest stable release?
gcc: 7.4.0
watchman: 4.9.0
folly: 92dd0f714562029307964767a93b9d8108673ac0 (Back out "[folly] create unorderedReduceSemiFuture method")
CC = gcc
CPPFLAGS = -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CFLAGS = -g -O2 -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer
CXX = g++
CXXFLAGS = -g -O2 -Wall -Wextra -g -gdwarf-2 -fno-omit-frame-pointer
LDFLAGS =
prefix: /usr/local
version: 4.9.0
state directory: /usr/local/var/run/watchman
make all-am
make[1]: вход в каталог «/home/avakimov_am/watchman/watchman»
CXX thirdparty/jansson/libwmanjson_a-dump.o
CXX thirdparty/jansson/libwmanjson_a-error.o
CXX thirdparty/jansson/libwmanjson_a-load.o
CXX thirdparty/jansson/libwmanjson_a-memory.o
CXX thirdparty/jansson/libwmanjson_a-pack_unpack.o
CXX thirdparty/jansson/libwmanjson_a-strbuffer.o
CXX thirdparty/jansson/libwmanjson_a-strconv.o
CXX thirdparty/jansson/libwmanjson_a-value.o
AR libwmanjson.a
ar: `u' modifier ignored since `D' is the default (see `U')
CXX cppclient/libwatchmanclient_la-WatchmanClient.lo
cppclient/WatchmanClient.cpp: In member function ‘folly::Future<std::shared_ptr<watchman::WatchPath> > watchman::WatchmanClient::watch(folly::StringPiece)’:
cppclient/WatchmanClient.cpp:89:8: error: no matching function for call to ‘folly::Future<folly::dynamic>::then(watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>)’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1178:73: note: candidate: template<class F> folly::Future<typename folly::futures::detail::tryCallableResult<T, F>::value_type> folly::Future<T>::then(F&&) && [with F = F; T = folly::dynamic]
Future<typename futures::detail::tryCallableResult<T, F>::value_type> then(
^~~~
/usr/local/include/folly/futures/Future.h:1178:73: note: template argument deduction/substitution failed:
/usr/local/include/folly/futures/Future.h: In substitution of ‘template<class F> folly::Future<typename folly::futures::detail::tryCallableResult<folly::dynamic, F, typename std::enable_if<std::is_invocable<F, folly::Try<folly::dynamic>&&>::value, void>::type>::value_type> folly::Future<folly::dynamic>::then<F>(F&&) && [with F = watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>]’:
cppclient/WatchmanClient.cpp:89:8: required from here
/usr/local/include/folly/futures/Future.h:1178:73: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
/usr/local/include/folly/futures/Future.h:1209:39: note: candidate: template<class R, class Caller, class ... Args> folly::Future<typename folly::isFuture<F>::Inner> folly::Future<T>::then(R (Caller::*)(Args ...), Caller*) && [with R = R; Caller = Caller; Args = {Args ...}; T = folly::dynamic]
Future<typename isFuture<R>::Inner> then(
^~~~
/usr/local/include/folly/futures/Future.h:1209:39: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: mismatched types ‘R (Caller::*)(Args ...)’ and ‘watchman::WatchmanClient::watch(folly::StringPiece)::<lambda(folly::dynamic&)>’
});
^
In file included from cppclient/WatchmanConnection.h:13:0,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future.h:1236:8: note: candidate: template<class Arg> auto folly::Future<T>::then(folly::Executor::KeepAlive<>, Arg&&) && [with Arg = Arg; T = folly::dynamic] <deleted>
auto then(Executor::KeepAlive<> x, Arg&& arg) && = delete;
^~~~
/usr/local/include/folly/futures/Future.h:1236:8: note: template argument deduction/substitution failed:
cppclient/WatchmanClient.cpp:89:8: note: candidate expects 2 arguments, 1 provided
});
^
In file included from /usr/local/include/folly/futures/Future.h:2588:0,
from cppclient/WatchmanConnection.h:13,
from cppclient/WatchmanClient.h:52,
from cppclient/WatchmanClient.cpp:4:
/usr/local/include/folly/futures/Future-inl.h:1205:14: note: candidate: folly::Future<folly::Unit> folly::Future<T>::then() && [with T = folly::dynamic]
Future<Unit> Future<T>::then() && {
^~~~~~~~~
/usr/local/include/folly/futures/Future-inl.h:1205:14: note: candidate expects 0 arguments, 1 provided
cppclient/WatchmanClient.cpp: In member function ‘folly::Future<std::shared_ptr<watchman::Subscription> > watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)’:
cppclient/WatchmanClient.cpp:113:8: error: no matching function for call to ‘folly::Future<folly::dynamic>::then(watchman::WatchmanClient::subscribe(folly::dynamic, watchman::WatchPathPtr, folly::Executor*, watchman::SubscriptionCallback&&)::<lambda(folly::dynamic)>)’
});
^
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
how solve this problem.can give me an advise?
I solve this problem。download latest cpp client https://github.com/facebook/watchman/tree/master/cppclient source code and replace cpp client directory source file,then make。that‘s ok!
Most helpful comment
@wez Did that change land? I'm trying to get watchman to build on Ubuntu 16.04 and seeing the same issue.
Some guidance on version compatibility would be great (although in my case, it seems to extend past watchman anyway).