diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-01-23 13:24:26 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-01-23 13:28:12 +0100 |
commit | 2f934bb189f6267f1815f853403c84de934e3235 (patch) | |
tree | e2007a8523bef7ff92ed06384f558c7ab0e2cebd /dev-ros | |
parent | 0d681298f8a3ca967597555e3df315160a3303d5 (diff) | |
download | gentoo-2f934bb189f6267f1815f853403c84de934e3235.tar.gz gentoo-2f934bb189f6267f1815f853403c84de934e3235.tar.xz |
dev-ros/image_publisher: Backport upstream patches to build with gcc6.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-ros')
-rw-r--r-- | dev-ros/image_publisher/files/gcc6-1.patch | 44 | ||||
-rw-r--r-- | dev-ros/image_publisher/files/gcc6.patch | 32 | ||||
-rw-r--r-- | dev-ros/image_publisher/image_publisher-1.12.19.ebuild | 3 |
3 files changed, 78 insertions, 1 deletions
diff --git a/dev-ros/image_publisher/files/gcc6-1.patch b/dev-ros/image_publisher/files/gcc6-1.patch new file mode 100644 index 00000000000..74e238b0012 --- /dev/null +++ b/dev-ros/image_publisher/files/gcc6-1.patch @@ -0,0 +1,44 @@ +commit 562332df73781c1e56ce9123542334cc1d91b143 +Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> +Date: Thu Oct 6 08:55:27 2016 +0200 + + explicitly cast to std::vector<double> to make gcc6 happy + + With gcc6, compiling image_publisher fails with this error: + ``` + /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()': + /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:43: error: ambiguous overload for 'operator=' (operand types are 'sensor_msgs::CameraInfo_<std::allocator<void> >::_D_type {aka std::vector<double>}' and 'boost::assign_detail::generic_list<int>') + camera_info_.D = list_of(0)(0)(0)(0)(0); + ``` + + After adding an initial explicit type cast for the assignment, + compiling fails further with: + ``` + | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp: In member function 'virtual void image_publisher::ImagePublisherNodelet::onInit()': + | /[...]/image_publisher/src/nodelet/image_publisher_nodelet.cpp:180:65: error: call of overloaded 'vector(boost::assign_detail::generic_list<int>&)' is ambiguous + | camera_info_.D = std::vector<double> (list_of(0)(0)(0)(0)(0)); + ``` + + Various sources on the internet [1, 2, 3] point to use the + `convert_to_container` method; hence, this commit follows those + suggestions and with that image_publisher compiles with gcc6. + + [1] http://stackoverflow.com/questions/16211410/ambiguity-when-using-boostassignlist-of-to-construct-a-stdvector + [2] http://stackoverflow.com/questions/12352692/ambiguous-call-with-list-of-in-vs2010/12362548#12362548 + [3] http://stackoverflow.com/questions/13285272/using-boostassignlist-of?rq=1 + + Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> + +diff --git a/image_publisher/src/nodelet/image_publisher_nodelet.cpp b/image_publisher/src/nodelet/image_publisher_nodelet.cpp +index 4102d0d..26e1352 100644 +--- a/image_publisher/src/nodelet/image_publisher_nodelet.cpp ++++ b/image_publisher/src/nodelet/image_publisher_nodelet.cpp +@@ -177,7 +177,7 @@ public: + camera_info_.width = image_.cols; + camera_info_.height = image_.rows; + camera_info_.distortion_model = "plumb_bob"; +- camera_info_.D = list_of(0)(0)(0)(0)(0); ++ camera_info_.D = list_of(0)(0)(0)(0)(0).convert_to_container<std::vector<double> >(); + camera_info_.K = list_of(1)(0)(camera_info_.width/2)(0)(1)(camera_info_.height/2)(0)(0)(1); + camera_info_.R = list_of(1)(0)(0)(0)(1)(0)(0)(0)(1); + camera_info_.P = list_of(1)(0)(camera_info_.width/2)(0)(0)(1)(camera_info_.height/2)(0)(0)(0)(1)(0); diff --git a/dev-ros/image_publisher/files/gcc6.patch b/dev-ros/image_publisher/files/gcc6.patch new file mode 100644 index 00000000000..4815e9e682c --- /dev/null +++ b/dev-ros/image_publisher/files/gcc6.patch @@ -0,0 +1,32 @@ +commit 6c2d65452bd5fe62723988a1a570789921900d59 +Author: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> +Date: Fri Sep 30 15:39:47 2016 +0200 + + address gcc6 build error + + With gcc6, compiling fails with `stdlib.h: No such file or directory`, + as including '-isystem /usr/include' breaks with gcc6, cf., + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129. + + This commit addresses this issue for this package in the same way + it was addressed in various other ROS packages. A list of related + commits and pull requests is at: + + https://github.com/ros/rosdistro/issues/12783 + + Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> + +diff --git a/image_publisher/CMakeLists.txt b/image_publisher/CMakeLists.txt +index 8015a45..431109c 100644 +--- a/image_publisher/CMakeLists.txt ++++ b/image_publisher/CMakeLists.txt +@@ -8,8 +8,7 @@ generate_dynamic_reconfigure_options(cfg/ImagePublisher.cfg) + + catkin_package() + +-# add the executable +-include_directories(SYSTEM ${catkin_INCLUDE_DIRS}) ++include_directories(${catkin_INCLUDE_DIRS}) + + add_library(${PROJECT_NAME} SHARED src/nodelet/image_publisher_nodelet.cpp) + target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) diff --git a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild b/dev-ros/image_publisher/image_publisher-1.12.19.ebuild index c7d3a6523f2..782fa09f27d 100644 --- a/dev-ros/image_publisher/image_publisher-1.12.19.ebuild +++ b/dev-ros/image_publisher/image_publisher-1.12.19.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -25,3 +25,4 @@ RDEPEND=" dev-ros/sensor_msgs[${CATKIN_MESSAGES_CXX_USEDEP}] " DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/gcc6.patch" "${FILESDIR}/gcc6-1.patch" ) |