diff --git a/meta-ros-common/recipes-extended/pcl/pcl/0001-Dereference-shared_ptr-fix-for-GCC8.patch b/meta-ros-common/recipes-extended/pcl/pcl/0001-Dereference-shared_ptr-fix-for-GCC8.patch deleted file mode 100644 index 78675f0784a..00000000000 --- a/meta-ros-common/recipes-extended/pcl/pcl/0001-Dereference-shared_ptr-fix-for-GCC8.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a0b3ce9ca5c69a945695c1c83dab7937a3d99b83 Mon Sep 17 00:00:00 2001 -From: Jochen Sprickerhof -Date: Sat, 5 May 2018 23:58:13 +0200 -Subject: [PATCH] Dereference shared_ptr, fix for GCC8 - -Upstream-Status: Accepted [https://github.com/PointCloudLibrary/pcl/commit/a0b3ce9ca5c69a945695c1c83dab7937a3d99b83] - -This patch has been generated with: - `git format-patch -1 a0b3ce9ca5c69a945695c1c83dab7937a3d99b83` -in the pcl repository. - -Signed-off-by: Lukas Bulwahn ---- - segmentation/include/pcl/segmentation/ground_plane_comparator.h | 2 +- - segmentation/include/pcl/segmentation/plane_coefficient_comparator.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/segmentation/include/pcl/segmentation/ground_plane_comparator.h b/segmentation/include/pcl/segmentation/ground_plane_comparator.h -index e39354d..f96f38b 100644 ---- a/segmentation/include/pcl/segmentation/ground_plane_comparator.h -+++ b/segmentation/include/pcl/segmentation/ground_plane_comparator.h -@@ -147,7 +147,7 @@ namespace pcl - const std::vector& - getPlaneCoeffD () const - { -- return (plane_coeff_d_); -+ return (*plane_coeff_d_); - } - - /** \brief Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane. -diff --git a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h -index 9c94813..a21725a 100644 ---- a/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h -+++ b/segmentation/include/pcl/segmentation/plane_coefficient_comparator.h -@@ -141,7 +141,7 @@ namespace pcl - const std::vector& - getPlaneCoeffD () const - { -- return (plane_coeff_d_); -+ return (*plane_coeff_d_); - } - - /** \brief Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane. --- -2.7.4 - diff --git a/meta-ros-common/recipes-extended/pcl/pcl/0001-make-the-pcl-library-compile-with-gcc6.patch b/meta-ros-common/recipes-extended/pcl/pcl/0001-make-the-pcl-library-compile-with-gcc6.patch index 01170afbf07..cb1e38b2de4 100644 --- a/meta-ros-common/recipes-extended/pcl/pcl/0001-make-the-pcl-library-compile-with-gcc6.patch +++ b/meta-ros-common/recipes-extended/pcl/pcl/0001-make-the-pcl-library-compile-with-gcc6.patch @@ -1,4 +1,4 @@ -From 19361abfa1bf21bc9be911f6ffa97f1c43174d8d Mon Sep 17 00:00:00 2001 +From 31f72094a309ef6845e5c6b0b989237b4b59973f Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 27 Sep 2016 14:05:22 +0200 Subject: [PATCH] make the pcl library compile with gcc6 @@ -58,23 +58,23 @@ Signed-off-by: Lukas Bulwahn 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index e5fd763..c658df5 100644 +index 0b4c1a33d..95e1d31e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -272,7 +272,7 @@ endif() +@@ -277,7 +277,7 @@ endif() # Eigen (required) find_package(Eigen REQUIRED) -include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) +include_directories(${EIGEN_INCLUDE_DIRS}) - add_definitions(-DEIGEN_USE_NEW_STDVECTOR - -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET) + # FLANN (required) + if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32)) diff --git a/cmake/Modules/FindOpenNI.cmake b/cmake/Modules/FindOpenNI.cmake -index 9f772a4..bd36f3e 100644 +index 2c7b26eea..1e62c359b 100644 --- a/cmake/Modules/FindOpenNI.cmake +++ b/cmake/Modules/FindOpenNI.cmake -@@ -30,7 +30,7 @@ if(NOT WIN32) +@@ -31,7 +31,7 @@ if(NOT WIN32) message(STATUS "OpenNI disabled because libusb-1.0 not found.") return() else() @@ -84,10 +84,10 @@ index 9f772a4..bd36f3e 100644 endif(NOT WIN32) diff --git a/cmake/Modules/FindOpenNI2.cmake b/cmake/Modules/FindOpenNI2.cmake -index 713099a..8226895 100644 +index 037a9a399..cc1855e0f 100644 --- a/cmake/Modules/FindOpenNI2.cmake +++ b/cmake/Modules/FindOpenNI2.cmake -@@ -30,7 +30,7 @@ if(NOT WIN32) +@@ -31,7 +31,7 @@ if(NOT WIN32) message(STATUS "OpenNI 2 disabled because libusb-1.0 not found.") return() else() @@ -97,10 +97,10 @@ index 713099a..8226895 100644 endif(NOT WIN32) diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake -index a3abe1c..c57b87d 100644 +index 6489f3954..0c170116d 100644 --- a/cmake/pcl_find_boost.cmake +++ b/cmake/pcl_find_boost.cmake -@@ -48,6 +48,6 @@ if(Boost_FOUND) +@@ -49,6 +49,6 @@ if(Boost_FOUND) # Obtain diagnostic information about Boost's automatic linking outputted # during compilation time. add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) @@ -109,11 +109,11 @@ index a3abe1c..c57b87d 100644 link_directories(${Boost_LIBRARY_DIRS}) endif(Boost_FOUND) diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake -index 691ead0..f730743 100644 +index 30696346f..bede67ffa 100644 --- a/cmake/pcl_targets.cmake +++ b/cmake/pcl_targets.cmake -@@ -858,7 +858,7 @@ macro(PCL_ADD_GRABBER_DEPENDENCY _name _description) - message(WARNING "${_description}: not building because ${_name} not found") +@@ -864,7 +864,7 @@ macro(PCL_ADD_GRABBER_DEPENDENCY _name _description) + message(STATUS "${_description}: not building because ${_name} not found") else() set(HAVE_${_name_capitalized} TRUE) - include_directories(SYSTEM "${${_name_capitalized}_INCLUDE_DIRS}") @@ -122,10 +122,10 @@ index 691ead0..f730743 100644 endif() endmacro(PCL_ADD_GRABBER_DEPENDENCY) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 3b3e2d7..342cb62 100644 +index 6a1d55d96..543c279ef 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt -@@ -17,7 +17,7 @@ PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} OPT_DEPS ${OPT_DEPS +@@ -9,7 +9,7 @@ PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} OPT_DEPS ${OPT_DEPS if(build) find_package(Gtest REQUIRED) @@ -134,6 +134,3 @@ index 3b3e2d7..342cb62 100644 add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc) --- -2.5.5 - diff --git a/meta-ros-common/recipes-extended/pcl/pcl_1.8.1.bb b/meta-ros-common/recipes-extended/pcl/pcl_1.8.1.bb deleted file mode 100644 index 5bcd3859ed2..00000000000 --- a/meta-ros-common/recipes-extended/pcl/pcl_1.8.1.bb +++ /dev/null @@ -1,77 +0,0 @@ -DESCRIPTION = "The Point Cloud Library (or PCL) for point cloud processing." -SECTION = "devel" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5b8a2a1aa14e6de44b4273134946a34c" - -DEPENDS = "boost libflann libeigen qhull" - -SRCREV = "39732f5a7c8455ed51fd0f6278d8b25322a68dd9" -# pcl-1.8.1 tag isn't in any branch -ROS_BRANCH ?= "nobranch=1" -SRC_URI = "git://github.com/PointCloudLibrary/pcl;${ROS_BRANCH};protocol=https" - -S = "${WORKDIR}/git" - -#SRC_URI += "file://0001-make-the-pcl-library-compile-with-gcc6.patch" -SRC_URI += "file://0001-Dereference-shared_ptr-fix-for-GCC8.patch" - -EXTRA_OECMAKE += "\ - -DCMAKE_SKIP_RPATH=ON \ - -DHAVE_MM_MALLOC_EXITCODE=0 -DHAVE_MM_MALLOC_EXITCODE__TRYRUN_OUTPUT=0 \ - -DHAVE_POSIX_MEMALIGN_EXITCODE=0 -DHAVE_POSIX_MEMALIGN_EXITCODE__TRYRUN_OUTPUT=0 \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DHAVE_SSE4_2_EXTENSIONS_EXITCODE=0 -DHAVE_SSE4_2_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0", "-DHAVE_SSE4_2_EXTENSIONS_EXITCODE=1 -DHAVE_SSE4_2_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=1", d)} \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DHAVE_SSE4_1_EXTENSIONS_EXITCODE=0 -DHAVE_SSE4_1_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0", "-DHAVE_SSE4_1_EXTENSIONS_EXITCODE=1 -DHAVE_SSE4_1_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=1", d)} \ - -DHAVE_SSSE3_EXTENSIONS_EXITCODE=0 -DHAVE_SSSE3_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0 \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DHAVE_SSE3_EXTENSIONS_EXITCODE=0 -DHAVE_SSE3_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0", "-DHAVE_SSE3_EXTENSIONS_EXITCODE=1 -DHAVE_SSE3_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=1", d)} \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse2", "-DHAVE_SSE2_EXTENSIONS_EXITCODE=0 -DHAVE_SSE2_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0", "-DHAVE_SSE2_EXTENSIONS_EXITCODE=1 -DHAVE_SSE2_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=1", d)} \ - ${@bb.utils.contains("TARGET_CC_ARCH", "-msse", "-DHAVE_SSE_EXTENSIONS_EXITCODE=0 -DHAVE_SSE_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=0", "-DHAVE_SSE_EXTENSIONS_EXITCODE=1 -DHAVE_SSE_EXTENSIONS_EXITCODE__TRYRUN_OUTPUT=1", d)} \ - -DWITH_LIBUSB=FALSE \ - -DWITH_PNG=FALSE \ - -DWITH_QHULL=TRUE \ - -DWITH_CUDA=FALSE \ - -DWITH_QT=FALSE \ - -DWITH_VTK=FALSE \ - -DWITH_PCAP=FALSE \ - -DWITH_OPENGL=FALSE \ -" - -#Setting -ffloat-store to alleviate 32bit vs 64bit discrepancies on non-SSE platforms. -CXXFLAGS += "${@bb.utils.contains("TARGET_CC_ARCH", "-mfpmath=sse", "", "-ffloat-store", d)}" - -inherit cmake - -FILES_${PN}-dev += "${datadir}/${PN}-1.8/*.cmake" - -# The build is really memory hungry (at least with gcc8), even with just -j 8 it triggers OOMK on system with 32GB ram -# High memory needs mentioned in: https://github.com/PointCloudLibrary/pcl/issues/2284 -# Setting just empty doesn't work, ninja will by default use number of cores available -# However, quick experiments have shown that it's possible to use up to CEIL(/5) as the argument to -j without running -# out of memory as long as the machine has a few GB of swap space. If this fails, override it by setting -# PARALLEL_MAKE_pn-pcl = "-j " in conf/local.conf . - -# Tried this, but psutil fails to import: -# inherit python3native -# DEPENDS += "python3-psutil-native" -# PARALLEL_MAKE = "-j ${@from psutil import virtual_memory; import math; int(math.ceil(virtual_memory().total / float(1024*1024*1024*5)))}" - -def pcl_parallel_make_n(): - import math - with open('/proc/meminfo', 'r') as f: - # First line of /proc/meminfo is: - # MemTotal: 65879500 kB - _, phys_mem_kb, _ = f.readline().split() - return int(math.ceil(float(phys_mem_kb)/float(1024*1024*5))) - -PARALLEL_MAKE = "-j ${@pcl_parallel_make_n()}" - - -# Fixes this: -# | fatal error: stdlib.h: No such file or directory -# | #include_next -do_configure_append() { - if [ -e ${B}/build.ninja ]; then - sed -i -e 's/-isystem /-I/g' ${B}/build.ninja - else - grep -rl -- '-isystem ' ${B} | xargs sed -i -e 's/-isystem /-I/g' - fi -} diff --git a/meta-ros-common/recipes-extended/pcl/pcl_git.bb b/meta-ros-common/recipes-extended/pcl/pcl_git.bb new file mode 100644 index 00000000000..0e2ace4613d --- /dev/null +++ b/meta-ros-common/recipes-extended/pcl/pcl_git.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "The Point Cloud Library (or PCL) for point cloud processing." +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5b8a2a1aa14e6de44b4273134946a34c" + +DEPENDS = "boost libflann libeigen qhull" + +PV = "1.9.1+git${SRCPV}" +SRCREV = "72f41b60a539cd1da67d1329b57222290122a0bb" +SRC_URI = "git://github.com/PointCloudLibrary/pcl.git \ + file://0001-make-the-pcl-library-compile-with-gcc6.patch \ +" + +S = "${WORKDIR}/git" + +EXTRA_OECMAKE += "\ + -DCMAKE_SKIP_RPATH=ON \ + -DHAVE_MM_MALLOC_EXITCODE=0 \ + -DHAVE_POSIX_MEMALIGN_EXITCODE=0 \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DHAVE_SSE4_2_EXTENSIONS_EXITCODE=0", "-DHAVE_SSE4_2_EXTENSIONS_EXITCODE=1", d)} \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DHAVE_SSE4_1_EXTENSIONS_EXITCODE=0", "-DHAVE_SSE4_1_EXTENSIONS_EXITCODE=1", d)} \ + -DHAVE_SSSE3_EXTENSIONS_EXITCODE=0 \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DHAVE_SSE3_EXTENSIONS_EXITCODE=0", "-DHAVE_SSE3_EXTENSIONS_EXITCODE=1", d)} \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse2", "-DHAVE_SSE2_EXTENSIONS_EXITCODE=0", "-DHAVE_SSE2_EXTENSIONS_EXITCODE=1", d)} \ + ${@bb.utils.contains("TARGET_CC_ARCH", "-msse", "-DHAVE_SSE_EXTENSIONS_EXITCODE=0", "-DHAVE_SSE_EXTENSIONS_EXITCODE=1", d)} \ + -DWITH_LIBUSB=FALSE \ + -DWITH_PNG=FALSE \ + -DWITH_QHULL=TRUE \ + -DWITH_CUDA=FALSE \ + -DWITH_QT=FALSE \ + -DWITH_VTK=FALSE \ + -DWITH_PCAP=FALSE \ + -DWITH_OPENGL=FALSE \ +" + +#Setting -ffloat-store to alleviate 32bit vs 64bit discrepancies on non-SSE platforms. +CXXFLAGS += "${@bb.utils.contains("TARGET_CC_ARCH", "-mfpmath=sse", "", "-ffloat-store", d)}" + +inherit cmake + +FILES_${PN}-dev += "${datadir}/${PN}-1.9/*.cmake ${datadir}/${PN}-1.9/Modules/*.cmake" + +# The build is really memory hungry (at least with gcc8), even with just -j 8 it triggers OOMK on system with 32GB ram +# High memory needs mentioned in: https://github.com/PointCloudLibrary/pcl/issues/2284 +# Setting just empty doesn't work, ninja will by default use number of cores available +PARALLEL_MAKE = "-j4"