Comments (11)
I added complete instruction for building the Telegram Bot API server on CentOS to the generator: https://tdlib.github.io/telegram-bot-api/build.html?os=Linux.
from telegram-bot-api.
We don't distribute binaries.
On CentOS 8 build instructions should work out of the box. On CentOS 7 or older you should install any newer version of g++ for them to work. What error do you receive while building?
from telegram-bot-api.
[ 2%] Built target generate_mime_types_gperf
[ 6%] Built target tdmime_auto
[ 8%] Building CXX object td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/FileFd.cpp.o
In file included from /home/telegram-bot-api/td/tdutils/td/utils/common.h:56:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:11,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/unique_ptr.h:40:30: error: expected type-specifier
template <class S, class = std::enable_if_t<std::is_base_of<T, S>::value>>
^
/home/telegram-bot-api/td/tdutils/td/utils/unique_ptr.h:40:30: error: expected ‘>’
/home/telegram-bot-api/td/tdutils/td/utils/unique_ptr.h:43:30: error: expected type-specifier
template <class S, class = std::enable_if_t<std::is_base_of<T, S>::value>>
^
/home/telegram-bot-api/td/tdutils/td/utils/unique_ptr.h:43:30: error: expected ‘>’
In file included from /home/telegram-bot-api/td/tdutils/td/utils/logging.h:27:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h: In function ‘void td::detail::do_init_thread_local(P&, ArgsT&& ...)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:14: error: ‘make_unique’ is not a member of ‘std’
auto ptr = std::make_unique<T>(std::forward<ArgsT>(args)...);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:14: note: suggested alternative:
In file included from /home/telegram-bot-api/td/tdutils/td/utils/common.h:56:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:11,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/unique_ptr.h:102:18: note: ‘td::make_unique’
unique_ptr<Type> make_unique(Args &&... args) {
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/logging.h:27:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:32: error: expected primary-expression before ‘>’ token
auto ptr = std::make_unique<T>(std::forward<ArgsT>(args)...);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:59: error: expected ‘)’ before ‘...’ token
auto ptr = std::make_unique<T>(std::forward<ArgsT>(args)...);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:62: error: parameter packs not expanded with ‘...’:
auto ptr = std::make_unique<T>(std::forward<ArgsT>(args)...);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:62: note: ‘args’
/home/telegram-bot-api/td/tdutils/td/utils/port/thread_local.h:46:62: note: ‘ArgsT’
In file included from /home/telegram-bot-api/td/tdutils/td/utils/Slice.h:10:0,
from /home/telegram-bot-api/td/tdutils/td/utils/logging.h:28,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:29:35: error: ‘std::enable_if_t’ has not been declared
explicit MutableSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:29:46: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit MutableSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:80:28: error: ‘std::enable_if_t’ has not been declared
explicit Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:80:39: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:82:28: error: ‘std::enable_if_t’ has not been declared
explicit Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:82:39: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:82:12: error: ‘template<class T> td::Slice::Slice(T, int)’ cannot be overloaded
explicit Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:80:12: error: with ‘template<class T> td::Slice::Slice(T, int)’
explicit Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:147:36: error: ‘std::enable_if_t’ has not been declared
explicit MutableCSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag> = {}) : MutableSlice(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:147:47: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit MutableCSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag> = {}) : MutableSlice(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:173:29: error: ‘std::enable_if_t’ has not been declared
explicit CSlice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:173:40: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit CSlice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:177:29: error: ‘std::enable_if_t’ has not been declared
explicit CSlice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:177:40: error: expected ‘,’ or ‘...’ before ‘<’ token
explicit CSlice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:177:12: error: ‘template<class T> td::CSlice::CSlice(T, int)’ cannot be overloaded
explicit CSlice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:173:12: error: with ‘template<class T> td::CSlice::CSlice(T, int)’
explicit CSlice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {})
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h: In constructor ‘td::CSlice::CSlice(const td::MutableCSlice&)’:
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:168:73: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default]
CSlice(const MutableCSlice &other) : Slice(other.begin(), other.size()) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:76:3: note: candidate 1: td::Slice::Slice(const char*, td::size_t)
Slice(const char *s, size_t len);
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:80:12: note: candidate 2: td::Slice::Slice(T, int) [with T = char*]
explicit Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {});
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:168:73: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default]
CSlice(const MutableCSlice &other) : Slice(other.begin(), other.size()) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:76:3: note: candidate 1: td::Slice::Slice(const char*, td::size_t)
Slice(const char *s, size_t len);
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice-decl.h:80:12: note: candidate 2: td::Slice::Slice(T, int) [with T = char*]
explicit Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag> = {});
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/logging.h:28:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:32:38: error: ‘std::enable_if_t’ has not been declared
MutableSlice::MutableSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:32:49: error: expected ‘,’ or ‘...’ before ‘<’ token
MutableSlice::MutableSlice(T s, std::enable_if_t<std::is_same<char *, T>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:157:24: error: ‘std::enable_if_t’ has not been declared
Slice::Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:157:35: error: expected ‘,’ or ‘...’ before ‘<’ token
Slice::Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:163:24: error: ‘std::enable_if_t’ has not been declared
Slice::Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:163:35: error: expected ‘,’ or ‘...’ before ‘<’ token
Slice::Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:163:1: error: redefinition of ‘td::Slice::Slice(T, int)’
Slice::Slice(T s, std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
/home/telegram-bot-api/td/tdutils/td/utils/Slice.h:157:1: error: ‘td::Slice::Slice(T, int)’ previously declared here
Slice::Slice(T s, std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, private_tag>) : s_(s) {
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/logging.h:30:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/StringBuilder.h:43:3: error: ‘enable_if_t’ in namespace ‘std’ does not name a type
std::enable_if_t<std::is_same<char *, std::remove_const_t<T>>::value, StringBuilder> &operator<<(T str) {
^
/home/telegram-bot-api/td/tdutils/td/utils/StringBuilder.h:47:3: error: ‘enable_if_t’ in namespace ‘std’ does not name a type
std::enable_if_t<std::is_same<const char *, std::remove_const_t<T>>::value, StringBuilder> &operator<<(T str) {
^
/home/telegram-bot-api/td/tdutils/td/utils/StringBuilder.h:140:1: error: ‘enable_if_t’ in namespace ‘std’ does not name a type
std::enable_if_t<std::is_arithmetic<T>::value, string> to_string(const T &x) {
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/Status.h:11:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:13,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/ScopeGuard.h: In function ‘auto td::operator+(td::ScopeExit, FunctionT&&)’:
/home/telegram-bot-api/td/tdutils/td/utils/ScopeGuard.h:72:22: error: ‘decay_t’ is not a member of ‘std’
return LambdaGuard<std::decay_t<FunctionT>>(std::forward<FunctionT>(func));
^
/home/telegram-bot-api/td/tdutils/td/utils/ScopeGuard.h:72:22: error: ‘decay_t’ is not a member of ‘std’
/home/telegram-bot-api/td/tdutils/td/utils/ScopeGuard.h:72:35: error: template argument 1 is invalid
return LambdaGuard<std::decay_t<FunctionT>>(std::forward<FunctionT>(func));
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:13:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:437:27: error: ‘std::enable_if_t’ has not been declared
template <class S, std::enable_if_t<!std::is_same<std::decay_t<S>, Result>::value, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:437:38: error: expected ‘>’ before ‘<’ token
template <class S, std::enable_if_t<!std::is_same<std::decay_t<S>, Result>::value, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: In member function ‘td::Result<td::CSlice> td::detail::SlicifySafe::operator&(td::Logger&)’:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:610:29: error: could not convert ‘(& logger)->td::Logger::as_cslice()’ from ‘td::MutableCSlice’ to ‘td::Result<td::CSlice>’
return logger.as_cslice();
^
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: In member function ‘td::Result<std::basic_string<char> > td::detail::StringifySafe::operator&(td::Logger&)’:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:620:35: error: could not convert ‘td::MutableSlice::str() const()’ from ‘td::string {aka std::basic_string<char>}’ to ‘td::Result<std::basic_string<char> >’
return logger.as_cslice().str();
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/format.h:10:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/PollableFd.h:10,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:13,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:58:8: error: expected type-specifier
-> std::enable_if_t<std::is_function<T>::value && std::is_base_of<Base, std::decay<Derived>>::value,
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:58:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:66:8: error: expected type-specifier
-> std::enable_if_t<std::is_function<T>::value && is_reference_wrapper<std::decay_t<RefWrap>>::value,
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:66:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:76:8: error: expected type-specifier
-> std::enable_if_t<std::is_function<T>::value && !is_reference_wrapper<std::decay_t<Pointer>>::value &&
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:76:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:84:8: error: expected type-specifier
-> std::enable_if_t<!std::is_function<T>::value && std::is_base_of<Base, std::decay_t<Derived>>::value,
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:84:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:91:8: error: expected type-specifier
-> std::enable_if_t<!std::is_function<T>::value && is_reference_wrapper<std::decay_t<RefWrap>>::value,
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:91:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:98:8: error: expected type-specifier
-> std::enable_if_t<!std::is_function<T>::value && !is_reference_wrapper<std::decay_t<Pointer>>::value &&
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:98:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:106:8: error: expected type-specifier
-> std::enable_if_t<!std::is_member_pointer<std::decay_t<F>>::value,
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:106:8: error: expected initializer
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:178:52: error: ‘std::enable_if_t’ has not been declared
template <size_t N, class Arg, class... Args, std::enable_if_t<N == 0, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:178:63: error: expected ‘>’ before ‘<’ token
template <size_t N, class Arg, class... Args, std::enable_if_t<N == 0, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:183:52: error: ‘std::enable_if_t’ has not been declared
template <size_t N, class Arg, class... Args, std::enable_if_t<N != 0, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:183:63: error: expected ‘>’ before ‘<’ token
template <size_t N, class Arg, class... Args, std::enable_if_t<N != 0, int> = 0>
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:184:8: error: redefinition of ‘template<long unsigned int N, class Arg, class ... Args, int <anonymous> > auto&& td::get_nth_argument(Arg&&, Args&& ...)’
auto &&get_nth_argument(Arg &&arg, Args &&... args) {
^
/home/telegram-bot-api/td/tdutils/td/utils/invoke.h:179:8: error: ‘template<long unsigned int N, class Arg, class ... Args, int <anonymous> > auto&& td::get_nth_argument(Arg&&, Args&& ...)’ previously declared here
auto &&get_nth_argument(Arg &&arg, Args &&... args) {
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/PollableFd.h:10:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:13,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/format.h: In function ‘td::StringBuilder& td::format::operator<<(td::StringBuilder&, const td::format::Concat<T>&)’:
/home/telegram-bot-api/td/tdutils/td/utils/format.h:299:43: error: parameter declared ‘auto’
tuple_for_each(concat.args, [&sb](auto &x) { sb << x; });
^
/home/telegram-bot-api/td/tdutils/td/utils/format.h: In lambda function:
/home/telegram-bot-api/td/tdutils/td/utils/format.h:299:54: error: ‘x’ was not declared in this scope
tuple_for_each(concat.args, [&sb](auto &x) { sb << x; });
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/thread.h:11:0,
from /home/telegram-bot-api/td/tdutils/td/utils/SpinLock.h:9,
from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/PollableFd.h:16,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:13,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/port/detail/ThreadPthread.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/port/detail/ThreadPthread.h:71:3: error: ‘decay_t’ in namespace ‘std’ does not name a type
std::decay_t<T> decay_copy(T &&v) {
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:17:0:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In function ‘auto td::transform(V&&, const Func&)’:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:84:35: error: ‘decay_t’ is not a member of ‘std’
return detail::transform_helper<std::decay_t<V>>().transform(std::forward<V>(v), f);
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:84:35: error: ‘decay_t’ is not a member of ‘std’
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:84:48: error: template argument 1 is invalid
return detail::transform_helper<std::decay_t<V>>().transform(std::forward<V>(v), f);
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:84:52: error: expected primary-expression before ‘)’ token
return detail::transform_helper<std::decay_t<V>>().transform(std::forward<V>(v), f);
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In function ‘void td::reset_to_empty(T&)’:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:140:3: error: ‘decay_t’ is not a member of ‘std’
std::decay_t<T> tmp;
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:140:17: error: expected primary-expression before ‘>’ token
std::decay_t<T> tmp;
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:140:19: error: ‘tmp’ was not declared in this scope
std::decay_t<T> tmp;
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:281:1: error: ‘enable_if_t’ in namespace ‘std’ does not name a type
std::enable_if_t<std::is_signed<T>::value, T> to_integer(Slice str) {
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:309:1: error: ‘enable_if_t’ in namespace ‘std’ does not name a type
std::enable_if_t<std::is_unsigned<T>::value, T> to_integer(Slice str) {
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In function ‘td::Result<T> td::to_integer_safe(td::Slice)’:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:321:14: error: ‘to_integer’ was not declared in this scope
auto res = to_integer<T>(str);
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:321:26: error: expected primary-expression before ‘>’ token
auto res = to_integer<T>(str);
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: At global scope:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:404:32: error: ‘enable_if_t’ is not a member of ‘std’
struct safe_undeflying_type<T, std::enable_if_t<std::is_enum<T>::value>> {
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:404:32: error: ‘enable_if_t’ is not a member of ‘std’
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:404:66: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class Enable> struct td::detail::safe_undeflying_type’
struct safe_undeflying_type<T, std::enable_if_t<std::is_enum<T>::value>> {
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:404:66: error: expected a type, got ‘(<expression error> < std::is_enum<_Tp>::value)’
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:404:71: error: expected unqualified-id before ‘>’ token
struct safe_undeflying_type<T, std::enable_if_t<std::is_enum<T>::value>> {
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In static member function ‘static td::Result<td::FileFd> td::FileFd::open(td::CSlice, td::int32, td::int32)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:160:44: error: could not convert ‘td::FileFd::from_native_fd(td::NativeFd)()’ from ‘td::FileFd’ to ‘td::Result<td::FileFd>’
return from_native_fd(NativeFd(native_fd));
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long unsigned int> td::FileFd::write(td::Slice)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:255:45: error: could not convert ‘td::detail::NarrowCast(((const char*)"/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp"), 255).td::detail::NarrowCast::cast<long unsigned int, long int>((*(const long int*)(& bytes_written)))’ from ‘long unsigned int’ to ‘td::Result<long unsigned int>’
return narrow_cast<size_t>(bytes_written);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long unsigned int> td::FileFd::writev(td::Span<iovec>)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:267:45: error: could not convert ‘td::detail::NarrowCast(((const char*)"/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp"), 267).td::detail::NarrowCast::cast<long unsigned int, long int>((*(const long int*)(& bytes_written)))’ from ‘long unsigned int’ to ‘td::Result<long unsigned int>’
return narrow_cast<size_t>(bytes_written);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long unsigned int> td::FileFd::read(td::MutableSlice)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:306:42: error: could not convert ‘(td::size_t)bytes_read’ from ‘td::size_t {aka long unsigned int}’ to ‘td::Result<long unsigned int>’
return static_cast<size_t>(bytes_read);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long unsigned int> td::FileFd::pwrite(td::Slice, td::int64)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:330:45: error: could not convert ‘td::detail::NarrowCast(((const char*)"/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp"), 330).td::detail::NarrowCast::cast<long unsigned int, long int>((*(const long int*)(& bytes_written)))’ from ‘long unsigned int’ to ‘td::Result<long unsigned int>’
return narrow_cast<size_t>(bytes_written);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long unsigned int> td::FileFd::pread(td::MutableSlice, td::int64) const’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:353:42: error: could not convert ‘td::detail::NarrowCast(((const char*)"/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp"), 353).td::detail::NarrowCast::cast<long unsigned int, long int>((*(const long int*)(& bytes_read)))’ from ‘long unsigned int’ to ‘td::Result<long unsigned int>’
return narrow_cast<size_t>(bytes_read);
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Status td::FileFd::lock(td::FileFd::LockFlags, const string&, td::int32)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:404:3: error: ‘void SCOPE_EXIT_VAR_400’ has incomplete type
};
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long int> td::FileFd::get_size() const’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:541:12: error: could not convert ‘s.td::Stat::size_’ from ‘td::int64 {aka long int}’ to ‘td::Result<long int>’
return s.size_;
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long int> td::FileFd::get_real_size() const’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:550:12: error: could not convert ‘s.td::Stat::real_size_’ from ‘td::int64 {aka long int}’ to ‘td::Result<long int>’
return s.real_size_;
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:17:0:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In instantiation of ‘td::Result<T> td::narrow_cast_safe(const A&) [with R = int; A = long unsigned int]’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:263:3: required from here
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:452:10: error: could not convert ‘r’ from ‘int’ to ‘td::Result<int>’
return r;
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:13:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: In instantiation of ‘td::Status td::Result<T>::move_as_error() [with T = int]’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:263:3: required from here
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:522:5: error: ‘void SCOPE_EXIT_VAR_520’ has incomplete type
};
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:17:0:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In instantiation of ‘td::Result<T> td::narrow_cast_safe(const A&) [with R = long int; A = long int]’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:317:3: required from here
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:452:10: error: could not convert ‘r’ from ‘long int’ to ‘td::Result<long int>’
return r;
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/detail/NativeFd.h:13:0,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.h:12,
from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:7:
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: In instantiation of ‘td::Status td::Result<T>::move_as_error() [with T = long int]’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:317:3: required from here
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:522:5: error: ‘void SCOPE_EXIT_VAR_520’ has incomplete type
};
^
/home/telegram-bot-api/td/tdutils/td/utils/Status.h: In instantiation of ‘td::Status td::Result<T>::move_as_error() [with T = td::Stat]’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:537:3: required from here
/home/telegram-bot-api/td/tdutils/td/utils/Status.h:522:5: error: ‘void SCOPE_EXIT_VAR_520’ has incomplete type
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In static member function ‘static td::Result<td::FileFd> td::FileFd::open(td::CSlice, td::int32, td::int32)’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:236:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from /home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:17:0:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In function ‘td::Result<T> td::narrow_cast_safe(const A&) [with R = int; A = long unsigned int]’:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:453:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/home/telegram-bot-api/td/tdutils/td/utils/misc.h: In function ‘td::Result<T> td::narrow_cast_safe(const A&) [with R = long int; A = long int]’:
/home/telegram-bot-api/td/tdutils/td/utils/misc.h:453:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long int> td::FileFd::get_size() const’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:542:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp: In member function ‘td::Result<long int> td::FileFd::get_real_size() const’:
/home/telegram-bot-api/td/tdutils/td/utils/port/FileFd.cpp:551:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
gmake[2]: *** [td/tdutils/CMakeFiles/tdutils.dir/td/utils/port/FileFd.cpp.o] Error 1
gmake[1]: *** [td/tdutils/CMakeFiles/tdutils.dir/all] Error 2
gmake: *** [all] Error 2
from telegram-bot-api.
You need to update g++ to any version newer than 4.8.
from telegram-bot-api.
gcc version is ^7 but.
from telegram-bot-api.
What is "^7"?
from telegram-bot-api.
its 7 and newser 😅
from telegram-bot-api.
What is output of g++ --version
?
from telegram-bot-api.
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
from telegram-bot-api.
That's what I was waiting for, thank you.
from telegram-bot-api.
@AliKeshtKarORG Did you succeed?
from telegram-bot-api.
Related Issues (20)
- hajaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar
- Does telegram-bot-api still not support uploading files up to 4G? HOT 7
- How to create a service on Ubuntu HOT 1
- Tgram.api
- http proxy does not work! HOT 1
- Message entities are not preserved by `editMessageText` and `editMessageMedia` HOT 2
- Request: Add Possibility for bot to publish/maintain stories in Channels
- NOT: User.language_code described at IETF but only being used as ISO-639? HOT 3
- How should I apply for the API HOT 4
- How can I be sure that Telegram BOT API local server is running properly? HOT 4
- Blockquote HTML syntax issues HOT 1
- pending_update_counts delay HOT 15
- get 404 error on download file! HOT 9
- Bot latency HOT 6
- Failed to forward message: 'Bad Request: message thread not found' HOT 7
- Persistent "ERROR" When Creating Telegram Application HOT 6
- Change the maximum upload size HOT 1
- not able to set more webhooks! HOT 9
- Too few replies to incoming private messages. Conversion is 0% HOT 1
- [ASK] Why not found method getinvoicelink ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-bot-api.