Package Details: ros-indigo-roscpp 1.11.19-1

Git Clone URL: https://aur.archlinux.org/ros-indigo-roscpp.git (read-only)
Package Base: ros-indigo-roscpp
Description: ROS - roscpp is a C++ implementation of ROS.
Upstream URL: http://ros.org/wiki/roscpp
Licenses: BSD
Submitter: bchretien
Maintainer: fl.duriez
Last Packager: fl.duriez
Votes: 1
Popularity: 0.000000
First Submitted: 2014-06-07 15:20
Last Updated: 2017-10-23 13:00

Required by (303)

Sources (2)

Latest Comments

jerry73204 commented on 2018-11-03 07:45

Please include these two patches and update the version to 1.11.21.

Fix undefined writev and readv.

From 4fbb9f952726a12b1938ea7af9e88ae8b234395e Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Date: Wed, 19 Jul 2017 11:17:11 +0300
Subject: [PATCH] [roscpp] add missing header for writev().

After an update of gcc and glibc roscpp started to fail builds with the error:

    /home/rojkov/work/ros/build/tmp-glibc/work/i586-oe-linux/roscpp/1.11.21-r0/ros_comm-1.11.21/clients/roscpp/src/libros/transport/transport_udp.cpp:579:25: error: 'writev' was not declared in this scope
         ssize_t num_bytes = writev(sock_, iov, 2);
                             ^~~~~~

According to POSIX.1-2001 the function writev() is declared in sys/uio.h.

The patch includes the missing header for POSIX compliant systems.
---
 clients/roscpp/src/libros/transport/transport_udp.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clients/roscpp/src/libros/transport/transport_udp.cpp b/clients/roscpp/src/libros/transport/transport_udp.cpp
index c7d8298f9..47d969eea 100644
--- a/clients/roscpp/src/libros/transport/transport_udp.cpp
+++ b/clients/roscpp/src/libros/transport/transport_udp.cpp
@@ -48,6 +48,9 @@
 #elif defined(__ANDROID__)
   // For readv() and writev() on ANDROID
   #include <sys/uio.h>
+#elif defined(_POSIX_VERSION)
+  // For readv() and writev()
+  #include <sys/uio.h>
 #endif

 namespace ros

Fix boost type usage.

diff --git a/src/libros/callback_queue.cpp b/src/libros/callback_queue.cpp
index cd2f4f8..d380a6b 100644
--- a/src/libros/callback_queue.cpp
+++ b/src/libros/callback_queue.cpp
@@ -229,7 +229,7 @@ CallbackQueue::CallOneResult CallbackQueue::callOne(ros::WallDuration timeout)
     {
       if (!timeout.isZero())
       {
-        condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+        condition_.timed_wait(lock, boost::posix_time::microseconds((long) (timeout.toSec() * 1000000.0)));
       }

       if (callbacks_.empty())
@@ -305,7 +305,7 @@ void CallbackQueue::callAvailable(ros::WallDuration timeout)
     {
       if (!timeout.isZero())
       {
-        condition_.timed_wait(lock, boost::posix_time::microseconds(timeout.toSec() * 1000000.0f));
+        condition_.timed_wait(lock, boost::posix_time::microseconds((long) (timeout.toSec() * 1000000.0)));
       }

       if (callbacks_.empty() || !enabled_)

andrei91ro commented on 2017-09-15 11:36

Indeed, version 1.11.19-0 does fail to compile because of missing headers.
The fix can be found at:
https://github.com/ros/ros_comm/pull/1105

The fix has to be applied to both transport_tcp.cpp and transport_udp.cpp that are both in:
src/ros_comm-release-release-indigo-roscpp-1.11.19-0/src/libros/transport

djringjr commented on 2017-09-12 23:32

Fails to compile:

ros-indigo-roscpp/src/ros_comm-release-release-indigo-roscpp-1.11.19-0/src/libros/transport/transport_udp.cpp:407:21: error: ‘readv’ was not declared in this scope
num_bytes = readv(sock_, iov, 2);