[pcl] Rebuild for gcc-4.7 and flann-1.7.1
rmattes
rmattes at fedoraproject.org
Sun Jan 15 00:07:27 UTC 2012
commit b82761c2f651228311c328782ba31b4a751a090d
Author: Rich Mattes <richmattes at gmail.com>
Date: Sat Jan 14 19:07:05 2012 -0500
Rebuild for gcc-4.7 and flann-1.7.1
pcl-1.3.1-gcc47.patch | 263 +++++++++++++++++++++++++++++++++++++++++++++++++
pcl.spec | 7 +-
2 files changed, 269 insertions(+), 1 deletions(-)
---
diff --git a/pcl-1.3.1-gcc47.patch b/pcl-1.3.1-gcc47.patch
new file mode 100644
index 0000000..98145ec
--- /dev/null
+++ b/pcl-1.3.1-gcc47.patch
@@ -0,0 +1,263 @@
+diff -up ./features/include/pcl/features/impl/fpfh_omp.hpp.gcc47 ./features/include/pcl/features/impl/fpfh_omp.hpp
+--- ./features/include/pcl/features/impl/fpfh_omp.hpp.gcc47 2012-01-14 16:00:42.664988851 -0500
++++ ./features/include/pcl/features/impl/fpfh_omp.hpp 2012-01-14 16:01:31.997831388 -0500
+@@ -94,7 +94,7 @@ pcl::FPFHEstimationOMP<PointInT, PointNT
+ this->searchForNeighbors (*surface_, p_idx, search_parameter_, nn_indices, nn_dists);
+
+ // Estimate the SPFH signature around p_idx
+- computePointSPFHSignature (*surface_, *normals_, p_idx, i, nn_indices, hist_f1_, hist_f2_, hist_f3_);
++ this->computePointSPFHSignature (*surface_, *normals_, p_idx, i, nn_indices, hist_f1_, hist_f2_, hist_f3_);
+
+ // Populate a lookup table for converting a point index to its corresponding row in the spfh_hist_* matrices
+ spfh_hist_lookup[p_idx] = i;
+diff -up ./features/include/pcl/features/impl/shot_omp.hpp.gcc47 ./features/include/pcl/features/impl/shot_omp.hpp
+--- ./features/include/pcl/features/impl/shot_omp.hpp.gcc47 2012-01-14 17:09:12.303410196 -0500
++++ ./features/include/pcl/features/impl/shot_omp.hpp 2012-01-14 17:10:00.871225274 -0500
+@@ -86,7 +86,7 @@ pcl::SHOTEstimationOMP<PointInT, PointNT
+ #else
+ int tid = 0;
+ #endif
+- computePointSHOT ((*indices_)[idx], nn_indices, nn_dists, shot[tid], rfs[tid]);
++ this->computePointSHOT ((*indices_)[idx], nn_indices, nn_dists, shot[tid], rfs[tid]);
+
+ // Copy into the resultant cloud
+ for (int d = 0; d < shot[tid].size (); ++d)
+@@ -143,7 +143,7 @@ pcl::SHOTEstimationOMP<pcl::PointXYZRGBA
+ #else
+ int tid = 0;
+ #endif
+- computePointSHOT ((*indices_)[idx], nn_indices, nn_dists, shot[tid], rfs[tid]);
++ this->computePointSHOT ((*indices_)[idx], nn_indices, nn_dists, shot[tid], rfs[tid]);
+
+ // Copy into the resultant cloud
+ for (int d = 0; d < shot[tid].size (); ++d)
+diff -up ./features/include/pcl/features/impl/spin_image.hpp.gcc47 ./features/include/pcl/features/impl/spin_image.hpp
+--- ./features/include/pcl/features/impl/spin_image.hpp.gcc47 2012-01-14 16:45:11.277663954 -0500
++++ ./features/include/pcl/features/impl/spin_image.hpp 2012-01-14 16:46:03.581618888 -0500
+@@ -107,7 +107,7 @@ SpinImageEstimation<PointInT, PointNT, P
+
+ std::vector<int> nn_indices;
+ std::vector<float> nn_sqr_dists;
+- const int neighb_cnt = searchForNeighbors (index, search_radius_, nn_indices, nn_sqr_dists);
++ const int neighb_cnt = this->searchForNeighbors (index, search_radius_, nn_indices, nn_sqr_dists);
+ if (neighb_cnt < (int)min_pts_neighb_)
+ {
+ throw PCLException (
+diff -up ./features/include/pcl/features/spin_image.h.gcc47 ./features/include/pcl/features/spin_image.h
+--- ./features/include/pcl/features/spin_image.h.gcc47 2012-01-14 16:43:35.168744754 -0500
++++ ./features/include/pcl/features/spin_image.h 2012-01-14 16:44:53.371994704 -0500
+@@ -157,7 +157,7 @@ namespace pcl
+ setInputWithNormals (const PointCloudInConstPtr& input,
+ const PointCloudNConstPtr& normals)
+ {
+- setInputCloud (input);
++ this->setInputCloud (input);
+ input_normals_ = normals;
+ }
+
+@@ -174,8 +174,8 @@ namespace pcl
+ setSearchSurfaceWithNormals (const PointCloudInConstPtr& surface,
+ const PointCloudNConstPtr& normals)
+ {
+- setSearchSurface (surface);
+- setInputNormals (normals);
++ this->setSearchSurface (surface);
++ this->setInputNormals (normals);
+ }
+
+ /** \brief Sets single vector a rotation axis for all input points.
+diff -up ./octree/include/pcl/octree/impl/octree_pointcloud.hpp.gcc47 ./octree/include/pcl/octree/impl/octree_pointcloud.hpp
+--- ./octree/include/pcl/octree/impl/octree_pointcloud.hpp.gcc47 2012-01-14 15:25:26.705656377 -0500
++++ ./octree/include/pcl/octree/impl/octree_pointcloud.hpp 2012-01-14 15:26:29.624998977 -0500
+@@ -763,10 +763,10 @@ namespace pcl
+ // iterate over all children
+ for (childIdx = 0; childIdx < 8; childIdx++)
+ {
+- if (branchHasChild (*node_arg, childIdx))
++ if (this->branchHasChild (*node_arg, childIdx))
+ {
+ const OctreeNode * childNode;
+- childNode = getBranchChild (*node_arg, childIdx);
++ childNode = this->getBranchChild (*node_arg, childIdx);
+
+ // generate new key for current branch voxel
+ OctreeKey newKey;
+diff -up ./octree/include/pcl/octree/impl/octree_search.hpp.gcc47 ./octree/include/pcl/octree/impl/octree_search.hpp
+--- ./octree/include/pcl/octree/impl/octree_search.hpp.gcc47 2012-01-14 15:20:28.924569463 -0500
++++ ./octree/include/pcl/octree/impl/octree_search.hpp 2012-01-14 15:35:37.363064763 -0500
+@@ -51,9 +51,9 @@ pcl::octree::OctreePointCloudSearch<Poin
+ bool b_success = false;
+
+ // generate key
+- genOctreeKeyforPoint (point, key);
++ this->genOctreeKeyforPoint (point, key);
+
+- LeafT* leaf = getLeaf (key);
++ LeafT* leaf = this->getLeaf (key);
+
+ if (leaf)
+ {
+@@ -196,7 +196,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ // iterate over all children
+ for (childIdx = 0; childIdx < 8; childIdx++)
+ {
+- if (branchHasChild (*node, childIdx))
++ if (this->branchHasChild (*node, childIdx))
+ {
+ PointT voxelCenter;
+
+@@ -205,10 +205,10 @@ pcl::octree::OctreePointCloudSearch<Poin
+ searchEntryHeap[childIdx].key.z = (key.z << 1) + (!!(childIdx & (1 << 0)));
+
+ // generate voxel center point for voxel at key
+- genVoxelCenterFromOctreeKey (searchEntryHeap[childIdx].key, treeDepth, voxelCenter);
++ this->genVoxelCenterFromOctreeKey (searchEntryHeap[childIdx].key, treeDepth, voxelCenter);
+
+ // generate new priority queue element
+- searchEntryHeap[childIdx].node = getBranchChild (*node, childIdx);
++ searchEntryHeap[childIdx].node = this->getBranchChild (*node, childIdx);
+ searchEntryHeap[childIdx].pointDistance = pointSquaredDist (voxelCenter, point);
+ }
+ else
+@@ -303,11 +303,11 @@ pcl::octree::OctreePointCloudSearch<Poin
+ // iterate over all children
+ for (childIdx = 0; childIdx < 8; childIdx++)
+ {
+- if (!branchHasChild (*node, childIdx))
++ if (!this->branchHasChild (*node, childIdx))
+ continue;
+
+ const OctreeNode* childNode;
+- childNode = getBranchChild (*node, childIdx);
++ childNode = this->getBranchChild (*node, childIdx);
+
+ OctreeKey newKey;
+ PointT voxelCenter;
+@@ -319,7 +319,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ newKey.z = (key.z << 1) + (!!(childIdx & (1 << 0)));
+
+ // generate voxel center point for voxel at key
+- genVoxelCenterFromOctreeKey (newKey, treeDepth, voxelCenter);
++ this->genVoxelCenterFromOctreeKey (newKey, treeDepth, voxelCenter);
+
+ // calculate distance to search point
+ squaredDist = pointSquaredDist ((const PointT &)voxelCenter, point);
+@@ -395,7 +395,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ // iterate over all children
+ for (childIdx = 0; childIdx < 8; childIdx++)
+ {
+- if (!branchHasChild (*node, childIdx))
++ if (!this->branchHasChild (*node, childIdx))
+ continue;
+
+ PointT voxelCenter;
+@@ -406,7 +406,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ newKey.z = (key.z << 1) + (!!(childIdx & (1 << 0)));
+
+ // generate voxel center point for voxel at key
+- genVoxelCenterFromOctreeKey (newKey, treeDepth, voxelCenter);
++ this->genVoxelCenterFromOctreeKey (newKey, treeDepth, voxelCenter);
+
+ voxelPointDist = pointSquaredDist (voxelCenter, point);
+
+@@ -422,7 +422,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ // make sure we found at least one branch child
+ assert (minChildIdx<8);
+
+- childNode = getBranchChild (*node, minChildIdx);
++ childNode = this->getBranchChild (*node, minChildIdx);
+
+ if (treeDepth < this->octreeDepth_)
+ {
+@@ -545,7 +545,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ {
+ PointT newPoint;
+
+- genLeafNodeCenterFromOctreeKey (key, newPoint);
++ this->genLeafNodeCenterFromOctreeKey (key, newPoint);
+
+ voxelCenterList.push_back (newPoint);
+
+@@ -576,7 +576,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ childIdx = a;
+
+ // childNode == 0 if childNode doesn't exist
+- childNode = getBranchChild ((OctreeBranch&)*node, childIdx);
++ childNode = this->getBranchChild ((OctreeBranch&)*node, childIdx);
+
+ // Generate new key for current branch voxel
+ childKey.x = (key.x << 1) | (!!(childIdx & (1 << 2)));
+@@ -700,7 +700,7 @@ pcl::octree::OctreePointCloudSearch<Poin
+ childIdx = a;
+
+ // childNode == 0 if childNode doesn't exist
+- childNode = getBranchChild ((OctreeBranch&)*node, childIdx);
++ childNode = this->getBranchChild ((OctreeBranch&)*node, childIdx);
+ // Generate new key for current branch voxel
+ childKey.x = (key.x << 1) | (!!(childIdx & (1 << 2)));
+ childKey.y = (key.y << 1) | (!!(childIdx & (1 << 1)));
+diff -up ./octree/include/pcl/octree/octree_search.h.gcc47 ./octree/include/pcl/octree/octree_search.h
+diff -up ./registration/include/pcl/registration/impl/icp.hpp.gcc47 ./registration/include/pcl/registration/impl/icp.hpp
+--- ./registration/include/pcl/registration/impl/icp.hpp.gcc47 2012-01-14 18:03:32.307882238 -0500
++++ ./registration/include/pcl/registration/impl/icp.hpp 2012-01-14 18:07:15.791146315 -0500
+@@ -87,7 +87,7 @@ pcl::IterativeClosestPoint<PointSource,
+ // Iterating over the entire index vector and find all correspondences
+ for (size_t idx = 0; idx < indices_->size (); ++idx)
+ {
+- if (!searchForNeighbors (output, (*indices_)[idx], nn_indices, nn_dists))
++ if (!this->searchForNeighbors (output, (*indices_)[idx], nn_indices, nn_dists))
+ {
+ PCL_ERROR ("[pcl::%s::computeTransformation] Unable to find a nearest neighbor in the target dataset for point %d in the source!\n", getClassName ().c_str (), (*indices_)[idx]);
+ return;
+@@ -190,7 +190,7 @@ pcl::IterativeClosestPoint<PointSource,
+
+ if (nr_iterations_ >= max_iterations_ ||
+ fabs ((transformation_ - previous_transformation_).sum ()) < transformation_epsilon_ ||
+- fabs (getFitnessScore (correspondence_distances_, previous_correspondence_distances)) <= euclidean_fitness_epsilon_
++ fabs (this->getFitnessScore (correspondence_distances_, previous_correspondence_distances)) <= euclidean_fitness_epsilon_
+ )
+ {
+ converged_ = true;
+@@ -201,7 +201,7 @@ pcl::IterativeClosestPoint<PointSource,
+ PCL_DEBUG ("fabs ((transformation_ - previous_transformation_).sum ()) (%f) < transformation_epsilon_ (%f)\n",
+ fabs ((transformation_ - previous_transformation_).sum ()), transformation_epsilon_);
+ PCL_DEBUG ("fabs (getFitnessScore (correspondence_distances_, previous_correspondence_distances)) (%f) <= euclidean_fitness_epsilon_ (%f)\n",
+- fabs (getFitnessScore (correspondence_distances_, previous_correspondence_distances)),
++ fabs (this->getFitnessScore (correspondence_distances_, previous_correspondence_distances)),
+ euclidean_fitness_epsilon_);
+
+ }
+diff -up ./surface/include/pcl/surface/impl/marching_cubes_greedy_dot.hpp.gcc47 ./surface/include/pcl/surface/impl/marching_cubes_greedy_dot.hpp
+--- ./surface/include/pcl/surface/impl/marching_cubes_greedy_dot.hpp.gcc47 2012-01-14 17:49:26.620582540 -0500
++++ ./surface/include/pcl/surface/impl/marching_cubes_greedy_dot.hpp 2012-01-14 17:49:50.245465241 -0500
+@@ -72,11 +72,11 @@ pcl::MarchingCubesGreedyDot<PointNT>::vo
+
+ // the vertices are shared by 8 voxels, so we need to update all 8 of them
+ HashMap neighbor_list;
+- getNeighborList1D (cell_data, index_3d, neighbor_list);
++ this->getNeighborList1D (cell_data, index_3d, neighbor_list);
+ BOOST_FOREACH (typename HashMap::value_type entry, neighbor_list)
+ {
+ Eigen::Vector3i i3d;
+- getIndexIn3D (entry.first, i3d);
++ this->getIndexIn3D (entry.first, i3d);
+ // getCellCenterFromIndex (const Eigen::Vector3i &index, Eigen::Vector4f ¢er) const
+ Eigen::Vector4f posVector;
+ MarchingCubes<PointNT>::getCellCenterFromIndex (i3d, posVector);
+diff -up ./surface/include/pcl/surface/impl/marching_cubes_greedy.hpp.gcc47 ./surface/include/pcl/surface/impl/marching_cubes_greedy.hpp
+--- ./surface/include/pcl/surface/impl/marching_cubes_greedy.hpp.gcc47 2012-01-14 17:47:23.051965619 -0500
++++ ./surface/include/pcl/surface/impl/marching_cubes_greedy.hpp 2012-01-14 17:48:06.715597034 -0500
+@@ -72,11 +72,11 @@ pcl::MarchingCubesGreedy<PointNT>::voxel
+
+ // the vertices are shared by 8 voxels, so we need to update all 8 of them
+ HashMap neighbor_list;
+- getNeighborList1D (cell_data, index_3d, neighbor_list);
++ this->getNeighborList1D (cell_data, index_3d, neighbor_list);
+ BOOST_FOREACH (typename HashMap::value_type entry, neighbor_list)
+ {
+ Eigen::Vector3i i3d;
+- getIndexIn3D(entry.first, i3d);
++ this->getIndexIn3D(entry.first, i3d);
+ // if the neighbor doesn't exist, add it, otherwise we need to do an OR operation on the vertices
+ if (cell_hash_map_.find (entry.first) == cell_hash_map_.end ())
+ {
diff --git a/pcl.spec b/pcl.spec
index 50bdfa7..4607e03 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -1,6 +1,6 @@
Name: pcl
Version: 1.3.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Library for point cloud processing
Group: System Environment/Libraries
@@ -8,6 +8,7 @@ License: BSD
URL: http://pointclouds.org/
Source0: http://dev.pointclouds.org/attachments/download/572/PCL-1.3.1-Source.tar.bz2
Patch0: PCL-1.3.1-Source-fedora.patch
+Patch1: pcl-1.3.1-gcc47.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# For plain building
@@ -73,6 +74,7 @@ Library.
%prep
%setup -q -n PCL-%{version}-Source
%patch0 -p1
+%patch1 -p0
# Just to make it obvious we're not using any of these
rm -rf 3rdparty
@@ -178,6 +180,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Jan 14 2012 Rich Mattes <richmattes at gmail.com> - 1.3.1-4
+- Rebuild for gcc-4.7 and flann-1.7.1
+
* Sun Jan 08 2012 Dan HorĂ¡k <dan[at]danny.cz> - 1.3.1-3
- openni is exclusive for x86
More information about the scm-commits
mailing list