From 67cf4445e04f20c0285f1715f55e6dadfa0c9c6e Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 10 Jul 2018 06:58:03 +0200 Subject: [PATCH 1/2] libflann: backport patch for cmake >= 3.11 --- ...ries-instead-of-empty-file-list-in-C.patch | 118 ++++++++++++++++++ recipes-extended/libflann/libflann_1.9.1.bb | 2 + 2 files changed, 120 insertions(+) create mode 100644 recipes-extended/libflann/libflann/0001-Use-object-libraries-instead-of-empty-file-list-in-C.patch diff --git a/recipes-extended/libflann/libflann/0001-Use-object-libraries-instead-of-empty-file-list-in-C.patch b/recipes-extended/libflann/libflann/0001-Use-object-libraries-instead-of-empty-file-list-in-C.patch new file mode 100644 index 0000000..40a5b62 --- /dev/null +++ b/recipes-extended/libflann/libflann/0001-Use-object-libraries-instead-of-empty-file-list-in-C.patch @@ -0,0 +1,118 @@ +From 2acc9cce82c2634d3b75f1e50f4eb84b4e6f27b6 Mon Sep 17 00:00:00 2001 +From: Francois Budin +Date: Thu, 7 Jun 2018 17:52:00 -0400 +Subject: [PATCH] Use object libraries instead of empty file list in CMake + add_library + +This modification is required to be able to configure this project with CMake +3.11. +To avoid compiling the source code once for the static libraries and once +for the corresponding shared libraries, a trick was used to pass an empty +list of files to the CMake command `add_library()`. This trick does not +work anymore with CMake 3.11 and above. Instead, the CMake code has been +adapted to first create object libraries, and then use the object +libraries to build both the static and the shared libraries. + +Upstream-Status: Submitted [https://github.com/mariusmuja/flann/pull/378] + +[Backport submitted patch to version 1.9.1] +Signed-off-by: Lukas Bulwahn +--- + src/cpp/CMakeLists.txt | 57 ++++++++++++++++++++++---------------------------- + 1 file changed, 25 insertions(+), 32 deletions(-) + +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 49c53f0..d1f54d6 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -8,10 +8,13 @@ file(GLOB_RECURSE C_SOURCES flann.cpp lz4.c lz4hc.c) + file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp lz4.c lz4hc.c) + file(GLOB_RECURSE CU_SOURCES *.cu) + +-add_library(flann_cpp_s STATIC ${CPP_SOURCES}) ++add_library(flann_cpp_o OBJECT ${CPP_SOURCES}) + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +- set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC) ++ set_target_properties(flann_cpp_o PROPERTIES COMPILE_FLAGS -fPIC) + endif() ++ ++add_library(flann_cpp_s STATIC $) ++ + set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) + + if (BUILD_CUDA_LIB) +@@ -24,28 +27,22 @@ if (BUILD_CUDA_LIB) + else() + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" ) + endif() +- cuda_add_library(flann_cuda_s STATIC ${CU_SOURCES}) ++ cuda_add_library(flann_cuda_o OBJECT ${CU_SOURCES}) ++ cuda_add_library(flann_cuda_s STATIC $) + set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + endif() + +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann_cpp SHARED "") +- set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) +- +- if (BUILD_CUDA_LIB) +- cuda_add_library(flann_cuda SHARED "") +- set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) +- set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) +- # target_link_libraries(flann_cuda cudpp_x86_64) +- endif() +-else() +- add_library(flann_cpp SHARED ${CPP_SOURCES}) +- if (BUILD_CUDA_LIB) +- cuda_add_library(flann_cuda SHARED ${CPP_SOURCES}) +- set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) +- endif() ++add_library(flann_cpp SHARED $) ++ ++if (BUILD_CUDA_LIB) ++ cuda_add_library(flann_cuda SHARED $) ++ set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) ++# target_link_libraries(flann_cuda cudpp_x86_64) ++endif() ++ ++if(MSVC) ++ # export lz4 headers, so that MSVC to creates flann_cpp.lib ++ set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES) + endif() + + set_target_properties(flann_cpp PROPERTIES +@@ -76,22 +73,18 @@ endif() + + + if (BUILD_C_BINDINGS) +- add_library(flann_s STATIC ${C_SOURCES}) ++ add_library(flann_o OBJECT ${C_SOURCES}) + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +- set_target_properties(flann_s PROPERTIES COMPILE_FLAGS -fPIC) ++ set_target_properties(flann_o PROPERTIES COMPILE_FLAGS -fPIC) + endif() ++ add_library(flann_s STATIC $) ++ + set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + +- if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann SHARED "") +- set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) +- else() +- add_library(flann SHARED ${C_SOURCES}) ++ add_library(flann SHARED $) + +- if(MINGW AND OPENMP_FOUND) +- target_link_libraries(flann gomp) +- endif() ++ if(MINGW AND OPENMP_FOUND) ++ target_link_libraries(flann gomp) + endif() + + set_target_properties(flann PROPERTIES +-- +2.7.4 + diff --git a/recipes-extended/libflann/libflann_1.9.1.bb b/recipes-extended/libflann/libflann_1.9.1.bb index c190ba3..271b003 100644 --- a/recipes-extended/libflann/libflann_1.9.1.bb +++ b/recipes-extended/libflann/libflann_1.9.1.bb @@ -11,3 +11,5 @@ SRC_URI[sha256sum] = "b23b5f4e71139faa3bcb39e6bbcc76967fbaf308c4ee9d4f5bfbeceaa7 S = "${WORKDIR}/flann-${PV}" inherit cmake + +SRC_URI += "file://0001-Use-object-libraries-instead-of-empty-file-list-in-C.patch" From 00088e9d9a47c58f5b2aa3ca4d45c6f9c0d478fd Mon Sep 17 00:00:00 2001 From: Dmitry Kargin Date: Tue, 12 Jun 2018 23:06:43 +0300 Subject: [PATCH 2/2] improve dependencies for dynamic-reconfigure users rospkg is necessary to generate dreconf files. dynamic-reconfigure was not providing proper build-time depencency to packages that use it. This patch series adds ${PYTHON_PN}-roskpg to DEPENDS of dynamic-reconfigure.bb and removes unnecessary reference to it in all recipes that are using dynamic-reconfigure. There were a fix for theora-image-transport with missing libvorbis as well. [modified commit message header.] Signed-off-by: Lukas Bulwahn --- recipes-ros/control-toolbox/control-toolbox_1.13.3.bb | 2 +- .../depthimage-to-laserscan/depthimage-to-laserscan_1.0.7.bb | 2 +- recipes-ros/dynamic-reconfigure/dynamic-reconfigure_1.5.49.bb | 2 +- recipes-ros/image-pipeline/image-proc_1.12.23.bb | 2 +- recipes-ros/image-pipeline/image-publisher_1.12.23.bb | 2 +- recipes-ros/image-pipeline/image-rotate_1.12.23.bb | 2 +- .../compressed-depth-image-transport_1.9.5.bb | 2 +- .../image-transport-plugins/compressed-image-transport_1.9.5.bb | 2 +- .../image-transport-plugins/theora-image-transport_1.9.5.bb | 2 +- recipes-ros/moveit/moveit-ros-planning_0.7.13.bb | 2 +- recipes-ros/navigation/amcl_1.12.16.bb | 2 +- recipes-ros/razor-imu-9dof/razor-imu-9dof_1.2.0.bb | 2 +- recipes-ros/velodyne/velodyne-driver_1.3.0.bb | 2 +- recipes-ros/yujin-ocs/yocs-cmd-vel-mux_0.6.4.bb | 2 +- recipes-ros/yujin-ocs/yocs-velocity-smoother_0.6.4.bb | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/recipes-ros/control-toolbox/control-toolbox_1.13.3.bb b/recipes-ros/control-toolbox/control-toolbox_1.13.3.bb index f3558e6..c5b6906 100644 --- a/recipes-ros/control-toolbox/control-toolbox_1.13.3.bb +++ b/recipes-ros/control-toolbox/control-toolbox_1.13.3.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc494f5f793a6690ba5" DEPENDS = "rosconsole tf roscpp angles message-generation dynamic-reconfigure libtinyxml \ - realtime-tools message-filters ${PYTHON_PN}-rospkg" + realtime-tools message-filters" SRC_URI = "https://github.com/ros-controls/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" SRC_URI[md5sum] = "3df0a768373bdf0b6297a4246ef4885b" diff --git a/recipes-ros/depthimage-to-laserscan/depthimage-to-laserscan_1.0.7.bb b/recipes-ros/depthimage-to-laserscan/depthimage-to-laserscan_1.0.7.bb index 2d8e7df..c4f750c 100644 --- a/recipes-ros/depthimage-to-laserscan/depthimage-to-laserscan_1.0.7.bb +++ b/recipes-ros/depthimage-to-laserscan/depthimage-to-laserscan_1.0.7.bb @@ -3,7 +3,7 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "roscpp sensor-msgs nodelet image-transport image-geometry dynamic-reconfigure ${PYTHON_PN}-rospkg" +DEPENDS = "roscpp sensor-msgs nodelet image-transport image-geometry dynamic-reconfigure" SRC_URI = "https://github.com/ros-perception/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz \ file://0001-Add-missing-std-namespace-prefixes.patch \ diff --git a/recipes-ros/dynamic-reconfigure/dynamic-reconfigure_1.5.49.bb b/recipes-ros/dynamic-reconfigure/dynamic-reconfigure_1.5.49.bb index cbe0568..334ae53 100644 --- a/recipes-ros/dynamic-reconfigure/dynamic-reconfigure_1.5.49.bb +++ b/recipes-ros/dynamic-reconfigure/dynamic-reconfigure_1.5.49.bb @@ -4,7 +4,7 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "roscpp std-msgs roslib" +DEPENDS = "roscpp std-msgs roslib ${PYTHON_PN}-rospkg" SRC_URI = "https://github.com/ros/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" SRC_URI[md5sum] = "c8205d14f3084e1dae677bc0812bb769" diff --git a/recipes-ros/image-pipeline/image-proc_1.12.23.bb b/recipes-ros/image-pipeline/image-proc_1.12.23.bb index c659882..7dd2038 100644 --- a/recipes-ros/image-pipeline/image-proc_1.12.23.bb +++ b/recipes-ros/image-pipeline/image-proc_1.12.23.bb @@ -5,6 +5,6 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc DEPENDS = "boost camera-calibration-parsers cv-bridge dynamic-reconfigure \ image-geometry image-transport nodelet nodelet-topic-tools opencv roscpp \ - sensor-msgs ${PYTHON_PN}-rospkg" + sensor-msgs" require image-pipeline.inc diff --git a/recipes-ros/image-pipeline/image-publisher_1.12.23.bb b/recipes-ros/image-pipeline/image-publisher_1.12.23.bb index 1195ea6..dbb5c6c 100644 --- a/recipes-ros/image-pipeline/image-publisher_1.12.23.bb +++ b/recipes-ros/image-pipeline/image-publisher_1.12.23.bb @@ -3,6 +3,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=12;endline=12;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "camera-info-manager cv-bridge dynamic-reconfigure image-transport nodelet roscpp sensor-msgs ${PYTHON_PN}-rospkg" +DEPENDS = "camera-info-manager cv-bridge dynamic-reconfigure image-transport nodelet roscpp sensor-msgs" require image-pipeline.inc diff --git a/recipes-ros/image-pipeline/image-rotate_1.12.23.bb b/recipes-ros/image-pipeline/image-rotate_1.12.23.bb index 7a1c7fc..237c26d 100644 --- a/recipes-ros/image-pipeline/image-rotate_1.12.23.bb +++ b/recipes-ros/image-pipeline/image-rotate_1.12.23.bb @@ -4,6 +4,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=26;endline=26;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "cmake-modules cv-bridge dynamic-reconfigure eigen-conversions image-transport nodelet opencv roscpp tf2 tf2-geometry-msgs tf2-ros ${PYTHON_PN}-rospkg" +DEPENDS = "cmake-modules cv-bridge dynamic-reconfigure eigen-conversions image-transport nodelet opencv roscpp tf2 tf2-geometry-msgs tf2-ros" require image-pipeline.inc diff --git a/recipes-ros/image-transport-plugins/compressed-depth-image-transport_1.9.5.bb b/recipes-ros/image-transport-plugins/compressed-depth-image-transport_1.9.5.bb index 3288bf5..f28981e 100644 --- a/recipes-ros/image-transport-plugins/compressed-depth-image-transport_1.9.5.bb +++ b/recipes-ros/image-transport-plugins/compressed-depth-image-transport_1.9.5.bb @@ -4,6 +4,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf ${PYTHON_PN}-rospkg" +DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf" require image-transport-plugins.inc diff --git a/recipes-ros/image-transport-plugins/compressed-image-transport_1.9.5.bb b/recipes-ros/image-transport-plugins/compressed-image-transport_1.9.5.bb index c64ce3d..64840be 100644 --- a/recipes-ros/image-transport-plugins/compressed-image-transport_1.9.5.bb +++ b/recipes-ros/image-transport-plugins/compressed-image-transport_1.9.5.bb @@ -4,6 +4,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf ${PYTHON_PN}-rospkg" +DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf" require image-transport-plugins.inc diff --git a/recipes-ros/image-transport-plugins/theora-image-transport_1.9.5.bb b/recipes-ros/image-transport-plugins/theora-image-transport_1.9.5.bb index c688bef..5aa0125 100644 --- a/recipes-ros/image-transport-plugins/theora-image-transport_1.9.5.bb +++ b/recipes-ros/image-transport-plugins/theora-image-transport_1.9.5.bb @@ -4,6 +4,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf rosbag ${PYTHON_PN}-rospkg" +DEPENDS = "cv-bridge dynamic-reconfigure image-transport tf rosbag libtheora" require image-transport-plugins.inc diff --git a/recipes-ros/moveit/moveit-ros-planning_0.7.13.bb b/recipes-ros/moveit/moveit-ros-planning_0.7.13.bb index d8e44bd..885ba48 100644 --- a/recipes-ros/moveit/moveit-ros-planning_0.7.13.bb +++ b/recipes-ros/moveit/moveit-ros-planning_0.7.13.bb @@ -3,7 +3,7 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=13;endline=13;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "moveit-core moveit-ros-perception dynamic-reconfigure ${PYTHON_PN}-rospkg libtinyxml tf-conversions" +DEPENDS = "moveit-core moveit-ros-perception dynamic-reconfigure libtinyxml tf-conversions" require moveit.inc diff --git a/recipes-ros/navigation/amcl_1.12.16.bb b/recipes-ros/navigation/amcl_1.12.16.bb index 2a3d152..b607df8 100644 --- a/recipes-ros/navigation/amcl_1.12.16.bb +++ b/recipes-ros/navigation/amcl_1.12.16.bb @@ -3,6 +3,6 @@ SECTION = "devel" LICENSE = "LGPL-2.1+" LIC_FILES_CHKSUM = "file://package.xml;beginline=22;endline=22;md5=58d727014cda5ed405b7fb52666a1f97" -DEPENDS = "dynamic-reconfigure message-filters nav-msgs rosbag roscpp std-srvs tf ${PYTHON_PN}-rospkg" +DEPENDS = "dynamic-reconfigure message-filters nav-msgs rosbag roscpp std-srvs tf" require navigation.inc diff --git a/recipes-ros/razor-imu-9dof/razor-imu-9dof_1.2.0.bb b/recipes-ros/razor-imu-9dof/razor-imu-9dof_1.2.0.bb index 6ba9e61..b9bb94b 100644 --- a/recipes-ros/razor-imu-9dof/razor-imu-9dof_1.2.0.bb +++ b/recipes-ros/razor-imu-9dof/razor-imu-9dof_1.2.0.bb @@ -7,7 +7,7 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=15;endline=15;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "dynamic-reconfigure ${PYTHON_PN}-rospkg" +DEPENDS = "dynamic-reconfigure" SRC_URI = "https://github.com/KristofRobot/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" SRC_URI[md5sum] = "1d036536b614e4e9841c970150692e46" diff --git a/recipes-ros/velodyne/velodyne-driver_1.3.0.bb b/recipes-ros/velodyne/velodyne-driver_1.3.0.bb index 89d2802..1743b5e 100644 --- a/recipes-ros/velodyne/velodyne-driver_1.3.0.bb +++ b/recipes-ros/velodyne/velodyne-driver_1.3.0.bb @@ -3,7 +3,7 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=14;endline=14;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "diagnostic-updater dynamic-reconfigure ${PYTHON_PN}-rospkg libpcap nodelet pluginlib roscpp tf velodyne-msgs" +DEPENDS = "diagnostic-updater dynamic-reconfigure libpcap nodelet pluginlib roscpp tf velodyne-msgs" require velodyne.inc diff --git a/recipes-ros/yujin-ocs/yocs-cmd-vel-mux_0.6.4.bb b/recipes-ros/yujin-ocs/yocs-cmd-vel-mux_0.6.4.bb index 48f0494..ef27c10 100644 --- a/recipes-ros/yujin-ocs/yocs-cmd-vel-mux_0.6.4.bb +++ b/recipes-ros/yujin-ocs/yocs-cmd-vel-mux_0.6.4.bb @@ -3,6 +3,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=12;endline=12;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "roscpp nodelet dynamic-reconfigure pluginlib geometry-msgs yaml-cpp ${PYTHON_PN}-rospkg" +DEPENDS = "roscpp nodelet dynamic-reconfigure pluginlib geometry-msgs yaml-cpp" require yujin-ocs.inc diff --git a/recipes-ros/yujin-ocs/yocs-velocity-smoother_0.6.4.bb b/recipes-ros/yujin-ocs/yocs-velocity-smoother_0.6.4.bb index d3891d9..3d945f7 100644 --- a/recipes-ros/yujin-ocs/yocs-velocity-smoother_0.6.4.bb +++ b/recipes-ros/yujin-ocs/yocs-velocity-smoother_0.6.4.bb @@ -3,6 +3,6 @@ SECTION = "devel" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" -DEPENDS = "roscpp pluginlib nodelet geometry-msgs nav-msgs ecl-threads dynamic-reconfigure ${PYTHON_PN}-rospkg" +DEPENDS = "roscpp pluginlib nodelet geometry-msgs nav-msgs ecl-threads dynamic-reconfigure" require yujin-ocs.inc