https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232018-04-17T08:44:02ZNDN project issue tracking systemndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230392018-04-17T08:44:02ZJunxiao Shi
<ul><li><strong>Assignee</strong> set to <i>Davide Pesavento</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Immediate</i></li><li><strong>Start date</strong> deleted (<del><i>04/17/2018</i></del>)</li></ul><p>Assigning to Davide who wrote the <a href="https://github.com/named-data/ndn-cxx/blob/7d9039bef9da6a6888850f9035a9f178a2467e7f/tools/ndnsec/cert-dump.cpp#L178" class="external">offending line</a>.<br>
Please fix quickly as ndn-cxx won't compile because of this.</p>
ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230402018-04-17T08:51:05ZDavide Pesavento
<ul></ul><p>Junxiao Shi wrote:</p>
<blockquote>
<p>Assigning to Davide who wrote the <a href="https://github.com/named-data/ndn-cxx/blob/7d9039bef9da6a6888850f9035a9f178a2467e7f/tools/ndnsec/cert-dump.cpp#L178" class="external">offending line</a>.</p>
</blockquote>
<p>Learn how to use git before blaming people. That code was already there, I simply changed from <code>milliseconds(3000)</code> to <code>seconds(3)</code>.</p>
ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230412018-04-17T08:52:41ZDavide Pesavento
<ul></ul><p>Junxiao Shi wrote:</p>
<blockquote>
<p><a href="https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/basic_socket_iostream/expires_from_now.html" class="external"><code>boost::asio::basic_socket_iostream::expires_from_now</code></a> is deprecated in favor of <code>expires_after</code> since Boost 1.66.</p>
</blockquote>
<p>This is not even the reason for the compile failure. See the actual error below.</p>
<pre><code>../tools/ndnsec/cert-dump.cpp:178:21: error: no matching member function for call to 'expires_from_now'
requestStream.expires_from_now(boost::posix_time::seconds(3));
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/basic_socket_iostream.hpp:407:8: note: candidate function not viable: no known conversion from 'boost::posix_time::seconds' to 'const duration' (aka 'const duration<long long, ratio<1LL, 1000000000LL> >') for 1st argument
void expires_from_now(const duration& expiry_time)
^
/usr/local/include/boost/asio/basic_socket_iostream.hpp:392:12: note: candidate function not viable: requires 0 arguments, but 1 was provided
duration expires_from_now() const
^
1 error generated.
</code></pre> ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230502018-04-17T11:33:49ZDavide Pesavento
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-3 status-5 priority-2 priority-default closed" href="/issues/4564">Task #4564</a>: Release 0.6.2</i> added</li></ul> ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230522018-04-17T11:34:41ZDavide Pesavento
<ul><li><strong>Subject</strong> changed from <i>basic_socket_iostream::expires_from_now is deprecated, causing build failure with Boost 1.67</i> to <i>basic_socket_iostream::expires_from_now causes build failure with Boost 1.67</i></li></ul> ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230542018-04-17T15:31:43ZDavide Pesavento
<ul></ul><p><a href="https://github.com/boostorg/asio/commit/5672713c903d5cdedc8d9c4a1c150bc9ea42736f">https://github.com/boostorg/asio/commit/5672713c903d5cdedc8d9c4a1c150bc9ea42736f</a></p>
ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230552018-04-17T15:38:44ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Code review</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p><a href="https://gerrit.named-data.net/4685">https://gerrit.named-data.net/4685</a></p>
ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230572018-04-17T17:37:03ZDavide Pesavento
<ul></ul><p>Asio has a bug in 1.67, the following fails to compile:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"><span class="cp">#include</span> <span class="cpf"><boost/asio/ts/netfwd.hpp></span><span class="cp">
#include</span> <span class="cpf"><boost/asio/ip/tcp.hpp></span><span class="cp">
</span>
<span class="kt">void</span> <span class="nf">foo</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">boost</span><span class="o">::</span><span class="n">asio</span><span class="o">::</span><span class="n">ip</span><span class="o">::</span><span class="n">tcp</span><span class="o">::</span><span class="n">iostream</span> <span class="n">s</span><span class="p">;</span>
<span class="p">}</span>
</code></pre><pre><code>In file included from ../src/foo.cpp:2:
In file included from /usr/local/include/boost/asio/ip/tcp.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket_iostream.hpp:24:
In file included from /usr/local/include/boost/asio/basic_socket_streambuf.hpp:44:
In file included from /usr/local/include/boost/asio/steady_timer.hpp:22:
In file included from /usr/local/include/boost/asio/basic_waitable_timer.hpp:33:
/usr/local/include/boost/asio/detail/chrono_time_traits.hpp:41:32: error: no type named 'duration' in 'boost::posix_time::ptime'
typedef typename clock_type::duration duration_type;
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/local/include/boost/asio/basic_socket_streambuf.hpp:201:20: note: in instantiation of template class 'boost::asio::detail::chrono_time_traits<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >' requested here
typedef typename traits_helper::time_type time_type;
^
/usr/local/include/boost/asio/basic_socket_iostream.hpp:117:45: note: in instantiation of template class 'boost::asio::basic_socket_streambuf<boost::asio::ip::tcp, boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >' requested here
Clock, WaitTraits BOOST_ASIO_SVC_TARG1> streambuf_;
^
/usr/local/include/boost/asio/basic_socket_iostream.hpp:154:13: note: in instantiation of template class 'boost::asio::detail::socket_iostream_base<boost::asio::ip::tcp, boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >' requested here
: private detail::socket_iostream_base<Protocol
^
../src/foo.cpp:6:34: note: in instantiation of template class 'boost::asio::basic_socket_iostream<boost::asio::ip::tcp, boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >' requested here
boost::asio::ip::tcp::iostream s;
^
In file included from ../src/foo.cpp:2:
In file included from /usr/local/include/boost/asio/ip/tcp.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket_iostream.hpp:24:
In file included from /usr/local/include/boost/asio/basic_socket_streambuf.hpp:44:
In file included from /usr/local/include/boost/asio/steady_timer.hpp:22:
In file included from /usr/local/include/boost/asio/basic_waitable_timer.hpp:33:
/usr/local/include/boost/asio/detail/chrono_time_traits.hpp:44:32: error: no type named 'time_point' in 'boost::posix_time::ptime'
typedef typename clock_type::time_point time_type;
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
2 errors generated.
</code></pre>
<p>This can impact all applications that use <code>tcp::iostream</code> AND directly or indirectly include <code><ndn-cxx/net/asio-fwd.hpp></code>. One example of affected application is ndn-autoconfig.</p>
ndn-cxx - Bug #4584: basic_socket_iostream::expires_from_now causes build failure with Boost 1.67https://redmine.named-data.net/issues/4584?journal_id=230742018-04-19T17:02:08ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul>