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 Sep 14, 2021
1 parent 9a4b172 commit ad267c7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 117 deletions.

This file was deleted.

71 changes: 0 additions & 71 deletions meta-ros-common/recipes-extended/pcl/pcl_1.8.1.bb

This file was deleted.

46 changes: 46 additions & 0 deletions meta-ros-common/recipes-extended/pcl/pcl_git.bb
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-Fix-deprecated-boost-endians.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"

0 comments on commit ad267c7

Please sign in to comment.