Open FinchPowers opened 7 years ago
I had very similar issue with Android NDK r16b (armv7, libc++):
[ 96%] Building CXX object cpprestsdk-2.10.1/Release/src/CMakeFiles/cpprest.dir/http/listener/http_server_asio.cpp.o
/home/sse4/.conan/data/cpprestsdk/2.10.1/bincrafters/testing/build/362f885c561e9e7387d7059684f2a74afba9979e/cpprestsdk-2.10.1/Release/src/http/client/http_client_asio.cpp:1559:21: error: no matching member function for call to 'expires_from_now'
m_timer.expires_from_now(m_duration);
~~~~~~~~^~~~~~~~~~~~~~~~
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:578:15: note: candidate function not viable: no known conversion from 'boost::chrono::microseconds' (aka 'duration<long long, ratio<1LL, 1000000LL> >') to 'const
boost::asio::basic_waitable_timer<std::__ndk1::chrono::steady_clock, boost::asio::wait_traits<std::__ndk1::chrono::steady_clock> >::duration' (aka 'const duration<long long, ratio<1LL, 1000000000LL> >') for 1st argument
std::size_t expires_from_now(const duration& expiry_time)
^
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:550:12: note: candidate function not viable: requires 0 arguments, but 1 was provided
duration expires_from_now() const
^
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:610:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
std::size_t expires_from_now(const duration& expiry_time,
^
/home/sse4/.conan/data/cpprestsdk/2.10.1/bincrafters/testing/build/362f885c561e9e7387d7059684f2a74afba9979e/cpprestsdk-2.10.1/Release/src/http/client/http_client_asio.cpp:1571:24: error: no matching member function for call to 'expires_from_now'
if(m_timer.expires_from_now(m_duration) > 0)
~~~~~~~~^~~~~~~~~~~~~~~~
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:578:15: note: candidate function not viable: no known conversion from 'boost::chrono::microseconds' (aka 'duration<long long, ratio<1LL, 1000000LL> >') to 'const
boost::asio::basic_waitable_timer<std::__ndk1::chrono::steady_clock, boost::asio::wait_traits<std::__ndk1::chrono::steady_clock> >::duration' (aka 'const duration<long long, ratio<1LL, 1000000000LL> >') for 1st argument
std::size_t expires_from_now(const duration& expiry_time)
^
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:550:12: note: candidate function not viable: requires 0 arguments, but 1 was provided
duration expires_from_now() const
^
/home/sse4/.conan/data/boost_asio/1.66.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/asio/include/boost/asio/basic_waitable_timer.hpp:610:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
std::size_t expires_from_now(const duration& expiry_time,
^
2 errors generated.
make[2]: *** [cpprestsdk-2.10.1/Release/src/CMakeFiles/cpprest.dir/http/client/http_client_asio.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [cpprestsdk-2.10.1/Release/src/CMakeFiles/cpprest.dir/all] Error 2
make: *** [all] Error 2
solved by patching Release/src/http/client/http_client_asio.cpp:
replaced m_timer.expires_from_now(m_duration)
via m_timer.expires_from_now(std::chrono::microseconds(m_duration.count()))
related to the https://github.com/bincrafters/community/issues/189
Hi!
Is it supposed to build with clang or not? I saw issues and a branch related to it, so I'm unsure because on the other hand the doc only states "gcc".
So if it's not meant to work, here I have my answer. Otherwise, here is some of the errors I've got.
First, the exact compile command:
Then the build errors
The output of
clang++-3.8 -v
isLastly, if I rebuild everything with g++/gcc 4.8.5 instead, the same command works.
Any help is appreciated. Thanks!