aldebaran / libqi

NAOqi core framework
http://doc.aldebaran.com/libqi/
BSD 3-Clause "New" or "Revised" License
66 stars 53 forks source link

Compile ros-naoqi/libqi failed on Noetic #37

Closed northpoleforce closed 7 months ago

northpoleforce commented 8 months ago

ROS: noetic Ubuntu: Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

log

In file included from /usr/local/include/boost/asio/read.hpp:1480,
                 from /usr/local/include/boost/asio.hpp:172,
                 from /home/northpoleforce/pepper/ros_ws/src/libqi/qi/macro.hpp:31,
                 from /home/northpoleforce/pepper/ros_ws/src/libqi/qi/api.hpp:16,
                 from /home/northpoleforce/pepper/ros_ws/src/libqi/qi/os.hpp:17,
                 from /home/northpoleforce/pepper/ros_ws/src/libqi/qi/log.hpp:26,
                 from /home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/messagesocket.cpp:1:
/usr/local/include/boost/asio/impl/read.hpp: In instantiation of ‘class boost::asio::detail::initiate_async_read<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >’:
/usr/local/include/boost/asio/read.hpp:811:3:   required by substitution of ‘template<class AsyncReadStream, class MutableBufferSequence, class ReadToken> decltype (async_initiate<ReadToken, void(boost::system::error_code, std::size_t)>(declval<boost::asio::detail::initiate_async_read<AsyncReadStream> >(), token, buffers, boost::asio::transfer_all())) boost::asio::async_read(AsyncReadStream&, const MutableBufferSequence&, ReadToken&&, typename boost::asio::constraint<boost::asio::is_mutable_buffer_sequence<MutableBufferSequence>::value>::type) [with AsyncReadStream = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; MutableBufferSequence = boost::asio::mutable_buffers_1; ReadToken = boost::asio::detail::wrapped_handler<boost::asio::io_context&, ka::data_bound_proc_t<qi::sock::receiveMessage(const S&, M, qi::sock::SslEnabled, size_t, const Proc&, F0, F1) [with N = qi::sock::NetworkAsio; S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; M = qi::Message*; Proc = qi::sock::ReceiveMessageContinuous<N>::operator()(const S&, qi::sock::SslEnabled, size_t, Proc, const F0&, const F1&) [with S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; Proc = qi::sock::Connected<N, S>::Impl::start(qi::sock::SslEnabled, size_t, Proc, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; size_t = long unsigned int; qi::int64_t = long int]::<lambda()> mutable::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; N = qi::sock::NetworkAsio; size_t = long unsigned int]::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; size_t = long unsigned int]::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, std::size_t)>, std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >, boost::asio::detail::is_continuation_delegated>&]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/sock/networkasio.hpp:50:30:   required from ‘static void qi::sock::NetworkAsio::async_read(S&, const B&, H) [with S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; B = boost::asio::mutable_buffers_1; H = boost::asio::detail::wrapped_handler<boost::asio::io_context&, ka::data_bound_proc_t<qi::sock::receiveMessage(const S&, M, qi::sock::SslEnabled, size_t, const Proc&, F0, F1) [with N = qi::sock::NetworkAsio; S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; M = qi::Message*; Proc = qi::sock::ReceiveMessageContinuous<N>::operator()(const S&, qi::sock::SslEnabled, size_t, Proc, const F0&, const F1&) [with S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; Proc = qi::sock::Connected<N, S>::Impl::start(qi::sock::SslEnabled, size_t, Proc, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; size_t = long unsigned int; qi::int64_t = long int]::<lambda()> mutable::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; N = qi::sock::NetworkAsio; size_t = long unsigned int]::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; size_t = long unsigned int]::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, std::size_t)>, std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >, boost::asio::detail::is_continuation_delegated>]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/sock/receive.hpp:337:20:   required from ‘void qi::sock::receiveMessage(const S&, M, qi::sock::SslEnabled, size_t, const Proc&, F0, F1) [with N = qi::sock::NetworkAsio; S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; M = qi::Message*; Proc = qi::sock::ReceiveMessageContinuous<N>::operator()(const S&, qi::sock::SslEnabled, size_t, Proc, const F0&, const F1&) [with S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; Proc = qi::sock::Connected<N, S>::Impl::start(qi::sock::SslEnabled, size_t, Proc, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; size_t = long unsigned int; qi::int64_t = long int]::<lambda()> mutable::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; N = qi::sock::NetworkAsio; size_t = long unsigned int]::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; size_t = long unsigned int]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/sock/receive.hpp:395:24:   required from ‘void qi::sock::ReceiveMessageContinuous<N>::operator()(const S&, qi::sock::SslEnabled, size_t, Proc, const F0&, const F1&) [with S = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; Proc = qi::sock::Connected<N, S>::Impl::start(qi::sock::SslEnabled, size_t, Proc, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; size_t = long unsigned int; qi::int64_t = long int]::<lambda()> mutable::<lambda(qi::sock::ErrorCode<qi::sock::NetworkAsio>, qi::Message*)>; F0 = ka::data_bound_transfo_t<std::shared_ptr<qi::sock::Connected<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >::Impl> >; F1 = qi::sock::StrandTransfo<qi::sock::NetworkAsio>; N = qi::sock::NetworkAsio; size_t = long unsigned int]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/sock/connectedstate.hpp:288:9:   required from ‘void qi::sock::Connected<N, S>::Impl::start(qi::sock::SslEnabled, size_t, Proc, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; size_t = long unsigned int; qi::int64_t = long int]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/sock/connectedstate.hpp:248:7:   required from ‘qi::sock::Connected<N, S>::Connected(qi::sock::SocketPtr<S>&, qi::sock::SslEnabled, size_t, const Proc&, qi::int64_t) [with Proc = qi::sock::HandleMessage<qi::sock::NetworkAsio, qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>; qi::sock::SocketPtr<S> = boost::shared_ptr<qi::sock::SocketWithContext<qi::sock::NetworkAsio> >; size_t = long unsigned int; qi::int64_t = long int]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/tcpmessagesocket.hpp:475:18:   required from ‘qi::FutureSync<void> qi::TcpMessageSocket<N, S>::connect(const qi::Url&) [with N = qi::sock::NetworkAsio; S = qi::sock::SocketWithContext<qi::sock::NetworkAsio>]’
/home/northpoleforce/pepper/ros_ws/src/libqi/src/messaging/tcpmessagesocket.hpp:413:20:   required from here
/usr/local/include/boost/asio/impl/read.hpp:504:53: error: no type named ‘executor_type’ in ‘class qi::sock::SocketWithContext<qi::sock::NetworkAsio>’
  504 |     typedef typename AsyncReadStream::executor_type executor_type;
northpoleforce commented 8 months ago

@mbusy Could you help me, please? I found you commit the version of ros-naoqi/libqi based on Noetic.

nyibbang commented 8 months ago

Hello 👋

It looks like you're building with an older version of the Boost libraries. We currently only support versions 1.78 to 1.82 of Boost.

victorpaleologue commented 8 months ago

Hello, how are you building libqi? Please share the commands you typed and tell us more about your workspace.

northpoleforce commented 8 months ago
cd src
git clone https://github.com/ros-naoqi/libqi.git
git clone https://github.com/ros-naoqi/libqicore.git
git clone https://github.com/ros-naoqi/naoqi_bridge_msgs.git
git clone https://github.com/ros-naoqi/pepper_meshes.git
git clone https://github.com/ros-naoqi/naoqi_driver.git
git clone https://github.com/ros-naoqi/pepper_robot.git
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3

Then, I failed! ( So sad @victorpaleologue

victorpaleologue commented 8 months ago

@nyibbang the ROS fork uses a late version of libQi to remain compatible with older boost versions. @northpoleforce Could you share the results of dpkg -l | grep boost on your machine, please?

nyibbang commented 8 months ago

Okay, I realized this fork existed a few days ago while looking at ROS stuff.

It seems like @northpoleforce is using a recent Boost version and the ros-naoqi/libqi repo is missing this commit fb3a5b5b0074bcec2d04e0a89e43ee646aa435e9 which adds the executor_type type on SocketWithContext.

victorpaleologue commented 8 months ago

Ubuntu's boost is not meant to be that recent though. It's on an Ubuntu 20.04 and Noetic builds fine on official buildfarms (which are using the usual Boost version from Ubuntu 20.04). I suppose something is different with @northpoleforce's boost.

nyibbang commented 8 months ago

It's not Boost from Ubuntu, aka from apt. If you look at the path of the headers, (e.g /usr/local/include/boost/asio/impl/read.hpp), they are located in /usr/local, which seems to indicate that our friend compiled a Boost himself and installed it locally (which by default will install it in /usr/local, often done as sudo since it requires root permissions).

victorpaleologue commented 8 months ago

There you have it then =) @northpoleforce you should not be using a custom version of boost. ROS requires you to use Ubuntu's official version of boost. Thanks @nyibbang !

northpoleforce commented 7 months ago

Thank you both very much, but I found I just need to compile aother packages to reach my goal. However, thank for your help sincerely.