Skip to content

Commit

Permalink
pcl: upgrade to 1.9.1
Browse files Browse the repository at this point in the history
* resolves issues with newer CMake
  -- Performing Test HAVE_MM_MALLOC
  CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
     HAVE_MM_MALLOC_EXITCODE (advanced)
     HAVE_MM_MALLOC_EXITCODE__TRYRUN_OUTPUT (advanced)
  For details see pcl/1.8.0-r0/build/TryRunResults.cmake
  -- Performing Test HAVE_MM_MALLOC - Success
* should resolve the issues with memory usage during the build:
  PointCloudLibrary/pcl#2284 (comment)
  but it still triggers OOMK with -j8 on 32GB RAM builder, use at least
  -j4 to improve the build time a bit
* use git fetcher for sources, github archives can be regenerated
  from time to time with different checksums:
  ros#609
* 0001-make-the-pcl-library-compile-with-gcc6.patch is needed only
  with thud and older, with warrior it builds OK without this
  patch as well

Signed-off-by: Martin Jansa <[email protected]>
  • Loading branch information
shr-project committed Jul 3, 2019
1 parent ca51533 commit 023e8eb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 74 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Date: Tue, 27 Sep 2016 14:05:22 +0200
Subject: [PATCH] make the pcl library compile with gcc6
Expand Down Expand Up @@ -58,23 +58,23 @@ Signed-off-by: Lukas Bulwahn <[email protected]>
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()
Expand All @@ -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()
Expand All @@ -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})
Expand All @@ -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}")
Expand All @@ -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)
Expand All @@ -134,6 +134,3 @@ index 3b3e2d7..342cb62 100644

add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc)

--
2.5.5

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5b8a2a1aa14e6de44b4273134946a34c"

DEPENDS = "boost libflann libeigen qhull"

SRC_URI = "https://github.com/PointCloudLibrary/${PN}/archive/${P}.tar.gz"
SRC_URI[md5sum] = "8c1308be2c13106e237e4a4204a32cca"
SRC_URI[sha256sum] = "9e54b0c1b59a67a386b9b0f4acb2d764272ff9a0377b825c4ed5eedf46ebfcf4"

SRC_URI += "file://0001-make-the-pcl-library-compile-with-gcc6.patch"
SRC_URI += "file://0001-Dereference-shared_ptr-fix-for-GCC8.patch"
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}/pcl-${P}"
S = "${WORKDIR}/git"

EXTRA_OECMAKE += "\
-DCMAKE_SKIP_RPATH=ON \
Expand All @@ -39,9 +38,9 @@ CXXFLAGS += "${@bb.utils.contains("TARGET_CC_ARCH", "-mfpmath=sse", "", "-ffloat

inherit cmake

FILES_${PN}-dev += "${datadir}/${PN}-1.8/*.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 = "-j1"
PARALLEL_MAKE = "-j4"

0 comments on commit 023e8eb

Please sign in to comment.