forked from ros/meta-ros
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
897334d
commit 70cf82c
Showing
4 changed files
with
62 additions
and
142 deletions.
There are no files selected for viewing
46 changes: 0 additions & 46 deletions
46
meta-ros-common/recipes-extended/pcl/pcl/0001-Dereference-shared_ptr-fix-for-GCC8.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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() | ||
|
@@ -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 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |