public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Rich Mattes <richmattes@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pcl] f44: Split up surface/mls template instantiations
Date: Thu, 25 Jun 2026 05:49:50 GMT	[thread overview]
Message-ID: <178236659094.1.15768292945117937664.rpms-pcl-17e162576d52@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pcl
            Branch : f44
            Commit : 17e162576d52360db91e0a8e0927047aa106e3b3
            Author : Rich Mattes <richmattes@gmail.com>
            Date   : 2019-02-16T14:48:39-05:00
            Stats  : +84/-2 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/pcl/c/17e162576d52360db91e0a8e0927047aa106e3b3?branch=f44

            Log:
            Split up surface/mls template instantiations

Move some explicit template instantiations to a separate translation
unit to avoid issues with running out of memory.

---
diff --git a/pcl-1.9.1-oom.patch b/pcl-1.9.1-oom.patch
new file mode 100644
index 0000000..076c4ff
--- /dev/null
+++ b/pcl-1.9.1-oom.patch
@@ -0,0 +1,80 @@
+diff -up ./surface/CMakeLists.txt.oom ./surface/CMakeLists.txt
+--- ./surface/CMakeLists.txt.oom	2019-02-16 14:45:04.746519567 -0500
++++ ./surface/CMakeLists.txt	2019-02-16 14:45:12.869544417 -0500
+@@ -100,6 +100,7 @@ if(build)
+         src/marching_cubes_rbf.cpp
+         src/bilateral_upsampling.cpp
+         src/mls.cpp
++        src/mls2.cpp
+         src/organized_fast_mesh.cpp
+         src/simplification_remove_unused_vertices.cpp
+         src/surfel_smoothing.cpp
+diff -up ./surface/src/mls2.cpp.oom ./surface/src/mls2.cpp
+--- ./surface/src/mls2.cpp.oom	2019-02-16 14:44:05.684338885 -0500
++++ ./surface/src/mls2.cpp	2019-02-16 14:44:48.231469044 -0500
+@@ -0,0 +1,53 @@
++/*
++ * Software License Agreement (BSD License)
++ *
++ * Point Cloud Library (PCL) - www.pointclouds.org
++ * Copyright (c) 2009-2011, Willow Garage, Inc.
++ *
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ *
++ * * Redistributions of source code must retain the above copyright
++ *   notice, this list of conditions and the following disclaimer.
++ * * Redistributions in binary form must reproduce the above
++ *   copyright notice, this list of conditions and the following
++ *   disclaimer in the documentation and/or other materials provided
++ *   with the distribution.
++ * * Neither the name of Willow Garage, Inc. nor the names of its
++ *   contributors may be used to endorse or promote products derived
++ *   from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
++ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
++ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
++ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
++ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
++ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
++ * POSSIBILITY OF SUCH DAMAGE.
++ *
++ * $Id$
++ *
++ */
++
++#include <pcl/surface/mls.h>
++#include <pcl/surface/impl/mls.hpp>
++
++#ifndef PCL_NO_PRECOMPILE
++#include <pcl/point_types.h>
++#include <pcl/impl/instantiate.hpp>
++#ifdef PCL_ONLY_CORE_POINT_TYPES
++ // Instantiations of specific point types
++  PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))
++                                              ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)))
++#else
++  PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, (PCL_XYZ_POINT_TYPES)(PCL_XYZ_POINT_TYPES))
++#endif
++#endif    // PCL_NO_PRECOMPILE
+diff -up ./surface/src/mls.cpp.oom ./surface/src/mls.cpp
+--- ./surface/src/mls.cpp.oom	2019-02-16 14:43:57.559314025 -0500
++++ ./surface/src/mls.cpp	2019-02-16 14:44:30.521414865 -0500
+@@ -46,7 +46,7 @@
+ #ifdef PCL_ONLY_CORE_POINT_TYPES
+  // Instantiations of specific point types
+   PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal))
+-                                              ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGB)(pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal)))
++                                              ((pcl::PointXYZRGBA)(pcl::PointXYZRGBNormal)(pcl::PointNormal)))
+ #else
+   PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, (PCL_XYZ_POINT_TYPES)(PCL_XYZ_POINT_TYPES))
+ #endif

diff --git a/pcl-1.9.1-sse2.patch b/pcl-1.9.1-sse2.patch
index ff95d9c..3b59242 100644
--- a/pcl-1.9.1-sse2.patch
+++ b/pcl-1.9.1-sse2.patch
@@ -14,7 +14,7 @@ diff -up ./cmake/pcl_find_sse.cmake.sse2 ./cmake/pcl_find_sse.cmake
 -        elseif(HAVE_SSE3_EXTENSIONS)
 -            list(APPEND SSE_FLAGS "-msse3" "-mfpmath=sse")
 -        elseif(HAVE_SSE2_EXTENSIONS)
-+	if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
++        if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
              list(APPEND SSE_FLAGS "-msse2" "-mfpmath=sse")
 -        elseif(HAVE_SSE_EXTENSIONS)
 -            list(APPEND SSE_FLAGS "-msse" "-mfpmath=sse")

diff --git a/pcl.spec b/pcl.spec
index cbfcc7f..a403340 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -20,6 +20,8 @@ Patch1:         %{name}-1.8.0-metslib.patch
 Patch2:         %{name}-1.8.1-fedora.patch
 # Exclude the "build" directory from doxygen processing.
 Patch3:         %{name}-1.7.2-doxyfix.patch
+# Split up explicit template instantiations so that builders don't run out of memory
+Patch4:         %{name}-1.9.1-oom.patch
 
 # For plain building
 BuildRequires:  cmake, gcc-c++, boost-devel
@@ -80,6 +82,7 @@ Library.
 %patch1 -p1 -b .metslib
 %patch2 -p0 -b .fedora
 %patch3 -p0 -b .doxyfix
+%patch4 -p1 -b .oom
 
 # Just to make it obvious we're not using any of these
 rm -fr recognition/include/pcl/recognition/3rdparty/metslib
@@ -102,7 +105,6 @@ pushd build
   -DWITH_DOCS=ON \
   -DWITH_CUDA=OFF \
   -DWITH_TUTORIALS=ON \
-  -DCMAKE_BUILD_TYPE=NONE \
   -DBUILD_apps=ON \
   -DBUILD_global_tests=OFF \
   -DOPENNI_INCLUDE_DIR:PATH=/usr/include/ni \

                 reply	other threads:[~2026-06-25  5:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178236659094.1.15768292945117937664.rpms-pcl-17e162576d52@fedoraproject.org \
    --to=richmattes@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox