Merge pull request #523 from rojkov/gcc7

Fix gcc v7.1 compilation issues
This commit is contained in:
Lukas Bulwahn 2017-06-27 14:26:27 +02:00 committed by GitHub
commit b0bf3da6d5
7 changed files with 103 additions and 18 deletions

View File

@ -1,16 +0,0 @@
DESCRIPTION = "Open Asset Import Library"
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bc4231a2268da8fc55525ad119638a87"
DEPENDS = "boost"
SRC_URI = "http://sourceforge.net/projects/assimp/files/assimp-3.0/assimp--${PV}-source-only.zip"
SRC_URI[md5sum] = "52aa4cf4e34e6b2a9c5f6c0b3c319af1"
SRC_URI[sha256sum] = "ac29beb596db97df57451a5503afaf2d8b4366522842a6914da89644927a1423"
S = "${WORKDIR}/assimp--${PV}-source-only"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake/assimp-3.0/*.cmake"

View File

@ -0,0 +1,16 @@
DESCRIPTION = "Open Asset Import Library"
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bc4231a2268da8fc55525ad119638a87"
DEPENDS = "boost"
SRC_URI = "https://downloads.sourceforge.net/project/${PN}/${PN}-3.1/${PN}-${PV}_no_test_models.zip"
SRC_URI[md5sum] = "ccd4788204509da58a3a53c7aeda7a8b"
SRC_URI[sha256sum] = "da9827876f10a8b447270368753392cfd502e70a2e9d1361554e5dfcb1fede9e"
S = "${WORKDIR}/${PN}-${PV}"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake/assimp-3.1/*.cmake"

View File

@ -14,4 +14,4 @@ S = "${WORKDIR}/sophus-${PV}"
inherit cmake
# CXXFLAGS are needed to compile eigen 3.3.1 headers properly
CXXFLAGS += "-Wno-deprecated-declarations -Wno-misleading-indentation"
CXXFLAGS += "-Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context"

View File

@ -0,0 +1,34 @@
From 8f40c9b006c70326bcfca73daebb54187a65aa5e Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Date: Mon, 26 Jun 2017 17:05:01 +0300
Subject: [PATCH] [ecl_containers] Fix gcc v7.1 compilation issue
When built with gcc v7.1 compilation fails with an error message
about using an expression as a function when updating
the private attribute FloatContainerFormatter.prm_width.
The patch uses assignment to update the attribute.
Upstream-Status: Accepted [https://github.com/stonier/ecl_core/pull/58]
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
---
ecl_containers/include/ecl/containers/common/formatters.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ecl_containers/include/ecl/containers/common/formatters.hpp b/ecl_containers/include/ecl/containers/common/formatters.hpp
index e26ec60..5f4c026 100644
--- a/ecl_containers/include/ecl/containers/common/formatters.hpp
+++ b/ecl_containers/include/ecl/containers/common/formatters.hpp
@@ -123,7 +123,7 @@ class ECL_LOCAL FloatContainerFormatter {
* @param w : the width to use for the inserted float.
* @return FloatContainerFormatter& : this formatter readied for use with a stream.
*/
- FloatContainerFormatter& operator()(const unsigned int p, const int w) { format.precision(p); prm_width(w); return *this; } // Permanent
+ FloatContainerFormatter& operator()(const unsigned int p, const int w) { format.precision(p); prm_width = w; return *this; } // Permanent
/**
* Convenient stream formatter. This function directly readies the formatter
* with the specified container and the stored (permanent) settings.
--
2.9.3

View File

@ -6,3 +6,5 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=14;endline=14;md5=d566ef916e9de
DEPENDS = "ecl-license ecl-config ecl-errors ecl-exceptions ecl-formatters ecl-converters ecl-mpl ecl-type-traits ecl-utilities"
require ecl-core.inc
SRC_URI += "file://0001-ecl_containers-Fix-gcc-v7.1-compilation-issue.patch;patchdir=.."

View File

@ -0,0 +1,48 @@
From bd789fc1fc201c3d180e9570af5065bd27e50338 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Date: Fri, 16 Jun 2017 14:50:52 +0300
Subject: [PATCH] amcl: fix compilation with gcc v7
When building amcl with recent enough gcc v7 compilation fails with
the error
src/amcl/map/map_cspace.cpp: In function 'void enqueue(map_t*, unsigned int, unsigned int, unsigned int, unsigned int, std::priority_queue<CellData>&, CachedDistanceMap*, unsigned char*)':
src/amcl/map/map_cspace.cpp:98:34: error: call of overloaded 'abs(unsigned int)' is ambiguous
unsigned int di = abs(i - src_i);
Use `int abs(int)` flavour of the abs() function.
Upstream-Status: Submitted [https://github.com/ros-planning/navigation/pull/587]
---
amcl/src/amcl/map/map_cspace.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/amcl/src/amcl/map/map_cspace.cpp b/amcl/src/amcl/map/map_cspace.cpp
index 421f718..5b4cf9c 100644
--- a/amcl/src/amcl/map/map_cspace.cpp
+++ b/amcl/src/amcl/map/map_cspace.cpp
@@ -86,8 +86,8 @@ get_distance_map(double scale, double max_dist)
return cdm;
}
-void enqueue(map_t* map, unsigned int i, unsigned int j,
- unsigned int src_i, unsigned int src_j,
+void enqueue(map_t* map, int i, int j,
+ int src_i, int src_j,
std::priority_queue<CellData>& Q,
CachedDistanceMap* cdm,
unsigned char* marked)
@@ -95,8 +95,8 @@ void enqueue(map_t* map, unsigned int i, unsigned int j,
if(marked[MAP_INDEX(map, i, j)])
return;
- unsigned int di = abs(i - src_i);
- unsigned int dj = abs(j - src_j);
+ int di = abs(i - src_i);
+ int dj = abs(j - src_j);
double distance = cdm->distances_[di][dj];
if(distance > cdm->cell_radius_)
--
2.9.3

View File

@ -2,7 +2,8 @@ SRC_URI = "https://github.com/ros-planning/${ROS_SPN}/archive/${PV}.tar.gz;downl
SRC_URI[md5sum] = "d7a392da183b3c2a5fce063e90cbf1f2"
SRC_URI[sha256sum] = "169f89a4a3a94437ffbf80a9b06b65471c17529169d1940a217e92d85481f18f"
SRC_URI += "file://0001-address-gcc6-build-error.patch;patchdir=.."
SRC_URI += "file://0001-address-gcc6-build-error.patch;patchdir=.. \
file://0001-amcl-fix-compilation-with-gcc-v7.patch;patchdir=.."
S = "${WORKDIR}/${ROS_SP}/${ROS_BPN}"