public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pcl] f44: Update oom patch to fix multiple definition errors
@ 2026-06-25 5:50
0 siblings, 0 replies; only message in thread
From: @ 2026-06-25 5:50 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/pcl
Branch : f44
Commit : 91f614918237e9e2bbc34acced5d337c38ce8f2d
Author : Björn Esser <besser82@fedoraproject.org>
Date : 2021-08-20T18:32:06+02:00
Stats : +82/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/pcl/c/91f614918237e9e2bbc34acced5d337c38ce8f2d?branch=f44
Log:
Update oom patch to fix multiple definition errors
---
diff --git a/pcl-1.12.0-oom.patch b/pcl-1.12.0-oom.patch
index ffc99bf..a95b068 100644
--- a/pcl-1.12.0-oom.patch
+++ b/pcl-1.12.0-oom.patch
@@ -20,7 +20,7 @@ Index: pcl-1.12.0/surface/src/mls_n.cpp
===================================================================
--- /dev/null
+++ pcl-1.12.0/surface/src/mls_n.cpp
-@@ -0,0 +1,53 @@
+@@ -0,0 +1,54 @@
+/*
+ * Software License Agreement (BSD License)
+ *
@@ -62,6 +62,7 @@ Index: pcl-1.12.0/surface/src/mls_n.cpp
+
+#include <pcl/surface/mls.h>
+#include <pcl/surface/impl/mls.hpp>
++#include "mls_calculatePrincipalCurvatures.hpp"
+
+#ifndef PCL_NO_PRECOMPILE
+#include <pcl/point_types.h>
@@ -364,3 +365,82 @@ Index: pcl-1.12.0/surface/src/mls_xyzrgbn.cpp
+ //PCL_INSTANTIATE_PRODUCT(MovingLeastSquares, (PCL_XYZ_POINT_TYPES)(PCL_XYZ_POINT_TYPES))
+#endif
+#endif // PCL_NO_PRECOMPILE
+Index: pcl-1.12.0/surface/include/pcl/surface/impl/mls.hpp
+===================================================================
+--- pcl-1.12.0.orig/surface/include/pcl/surface/impl/mls.hpp
++++ pcl-1.12.0/surface/include/pcl/surface/impl/mls.hpp
+@@ -533,38 +533,6 @@ pcl::MLSResult::getPolynomialPartialDeri
+ return (d);
+ }
+
+-Eigen::Vector2f
+-pcl::MLSResult::calculatePrincipalCurvatures (const double u, const double v) const
+-{
+- Eigen::Vector2f k (1e-5, 1e-5);
+-
+- // Note: this use the Monge Patch to derive the Gaussian curvature and Mean Curvature found here http://mathworld.wolfram.com/MongePatch.html
+- // Then:
+- // k1 = H + sqrt(H^2 - K)
+- // k2 = H - sqrt(H^2 - K)
+- if (order > 1 && c_vec.size () >= (order + 1) * (order + 2) / 2 && std::isfinite (c_vec[0]))
+- {
+- const PolynomialPartialDerivative d = getPolynomialPartialDerivative (u, v);
+- const double Z = 1 + d.z_u * d.z_u + d.z_v * d.z_v;
+- const double Zlen = std::sqrt (Z);
+- const double K = (d.z_uu * d.z_vv - d.z_uv * d.z_uv) / (Z * Z);
+- const double H = ((1.0 + d.z_v * d.z_v) * d.z_uu - 2.0 * d.z_u * d.z_v * d.z_uv + (1.0 + d.z_u * d.z_u) * d.z_vv) / (2.0 * Zlen * Zlen * Zlen);
+- const double disc2 = H * H - K;
+- assert (disc2 >= 0.0);
+- const double disc = std::sqrt (disc2);
+- k[0] = H + disc;
+- k[1] = H - disc;
+-
+- if (std::abs (k[0]) > std::abs (k[1])) std::swap (k[0], k[1]);
+- }
+- else
+- {
+- PCL_ERROR ("No Polynomial fit data, unable to calculate the principal curvatures!\n");
+- }
+-
+- return (k);
+-}
+-
+ pcl::MLSResult::MLSProjectionResults
+ pcl::MLSResult::projectPointOrthogonalToPolynomialSurface (const double u, const double v, const double w) const
+ {
+Index: pcl-1.12.0/surface/src/mls_calculatePrincipalCurvatures.hpp
+===================================================================
+--- /dev/null
++++ pcl-1.12.0/surface/src/mls_calculatePrincipalCurvatures.hpp
+@@ -0,0 +1,31 @@
++Eigen::Vector2f
++pcl::MLSResult::calculatePrincipalCurvatures (const double u, const double v) const
++{
++ Eigen::Vector2f k (1e-5, 1e-5);
++
++ // Note: this use the Monge Patch to derive the Gaussian curvature and Mean Curvature found here http://mathworld.wolfram.com/MongePatch.html
++ // Then:
++ // k1 = H + sqrt(H^2 - K)
++ // k2 = H - sqrt(H^2 - K)
++ if (order > 1 && c_vec.size () >= (order + 1) * (order + 2) / 2 && std::isfinite (c_vec[0]))
++ {
++ const PolynomialPartialDerivative d = getPolynomialPartialDerivative (u, v);
++ const double Z = 1 + d.z_u * d.z_u + d.z_v * d.z_v;
++ const double Zlen = std::sqrt (Z);
++ const double K = (d.z_uu * d.z_vv - d.z_uv * d.z_uv) / (Z * Z);
++ const double H = ((1.0 + d.z_v * d.z_v) * d.z_uu - 2.0 * d.z_u * d.z_v * d.z_uv + (1.0 + d.z_u * d.z_u) * d.z_vv) / (2.0 * Zlen * Zlen * Zlen);
++ const double disc2 = H * H - K;
++ assert (disc2 >= 0.0);
++ const double disc = std::sqrt (disc2);
++ k[0] = H + disc;
++ k[1] = H - disc;
++
++ if (std::abs (k[0]) > std::abs (k[1])) std::swap (k[0], k[1]);
++ }
++ else
++ {
++ PCL_ERROR ("No Polynomial fit data, unable to calculate the principal curvatures!\n");
++ }
++
++ return (k);
++}
diff --git a/pcl.spec b/pcl.spec
index a92fa4c..924e75c 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -195,6 +195,7 @@ mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/Modules $RPM_BUILD_ROOT%{_libdir}/cmake/
- Disable fat-lto-objects to reduce memory usage
Doing so will not hurt as we are not shipping any static libraries
- Re-enable and realign oom patch
+- Update oom patch to fix multiple definition errors
* Tue Aug 17 2021 Rich Mattes <richmattes@gmail.com> - 1.12.0-1
- Drop "oom" patch to resolve multiple definition error and fix FTBFS (rhbz#1992893)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-25 5:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 5:50 [rpms/pcl] f44: Update oom patch to fix multiple definition errors
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox