• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

compiling tfs 1.2 ubuntu

jareczekjsp

Member
Joined
Jan 30, 2023
Messages
188
Reaction score
9
GitHub
Jarek123
Hello guys I try compiling tfs 1.2 on ubuntu but I have error,how I can fix it?
/home/ots/src/connection.cpp: In member function ‘void Connection::accept()’:
/home/ots/src/connection.cpp:119:95: error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
119 | readTimer.expires_from_now(boost::posix_time::seconds(Connection::read_timeout));
| ^
In file included from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:16,
from /usr/include/boost/asio/time_traits.hpp:23,
from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22,
from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29,
from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
from /usr/include/boost/asio.hpp:25,
from /home/ots/src/otpch.h:42,
from /home/ots/build/cotire/tfs_CXX_prefix.cxx:4,
from /home/ots/build/cotire/tfs_CXX_prefix.hxx:4:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
57 | BOOST_CXX14_CONSTEXPR explicit seconds(T const& s,
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
/home/ots/src/connection.cpp:119:81: required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
53 | class BOOST_SYMBOL_VISIBLE seconds : public time_duration
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
/home/ots/src/connection.cpp: In member function ‘void Connection::parseHeader(const boost::system::error_code&)’:
/home/ots/src/connection.cpp:159:95: error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
159 | readTimer.expires_from_now(boost::posix_time::seconds(Connection::read_timeout));
| ^
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
57 | BOOST_CXX14_CONSTEXPR explicit seconds(T const& s,
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
/home/ots/src/connection.cpp:159:81: required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
53 | class BOOST_SYMBOL_VISIBLE seconds : public time_duration
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
/home/ots/src/connection.cpp: In member function ‘void Connection::parsePacket(const boost::system::error_code&)’:
/home/ots/src/connection.cpp:222:95: error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
222 | readTimer.expires_from_now(boost::posix_time::seconds(Connection::read_timeout));
| ^
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
57 | BOOST_CXX14_CONSTEXPR explicit seconds(T const& s,
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
/home/ots/src/connection.cpp:222:81: required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
53 | class BOOST_SYMBOL_VISIBLE seconds : public time_duration
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
/home/ots/src/connection.cpp: In member function ‘void Connection::internalSend(const OutputMessage_ptr&)’:
/home/ots/src/connection.cpp:254:97: error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
254 | writeTimer.expires_from_now(boost::posix_time::seconds(Connection::write_timeout));
| ^
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: candidate: ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*)’
57 | BOOST_CXX14_CONSTEXPR explicit seconds(T const& s,
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp: In substitution of ‘template<class T> boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = Connection::<unnamed enum>]’:
/home/ots/src/connection.cpp:254:83: required from here
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:57:38: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<Connection::<unnamed enum> >, void>’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(const boost::posix_time::seconds&)’
53 | class BOOST_SYMBOL_VISIBLE seconds : public time_duration
| ^~~~~~~
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘const boost::posix_time::seconds&’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: candidate: ‘constexpr boost::posix_time::seconds::seconds(boost::posix_time::seconds&&)’
/usr/include/boost/date_time/posix_time/posix_time_duration.hpp:53:30: note: no known conversion for argument 1 from ‘Connection::<unnamed enum>’ to ‘boost::posix_time::seconds&&’
make[2]: *** [CMakeFiles/tfs.dir/build.make:240: CMakeFiles/tfs.dir/src/connection.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
 
Hello guys I try compiling tfs 1.2 on ubuntu but I have error,how I can fix it?
i'm not using tfs 1.2 for a long time, but i have it on my notes:

using ubuntu 18

-- install libs
sudo apt-get install git cmake build-essential libluajit-5.1-dev zip libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev libfmt-dev libgmp10 libgmp-dev gdb libmpfr-dev libboost-all-dev -y
 
in src/connection.h you should find
C++:
        enum { write_timeout = 30 };
        enum { read_timeout = 30 };
replace it with
C++:
        static constexpr int write_timeout = 30;
        static constexpr int read_timeout = 30;
should fix the error: no matching function for call to ‘boost::posix_time::seconds::seconds(Connection::<unnamed enum>)’
errors.
 
Last edited:
Back
Top