[med-svn] [opensurgsim] 01/01: Fix FTBFS with eigen3 3.3~beta2-1 (Closes: #835417)
Paul Novotny
paulnovo-guest at moszumanska.debian.org
Thu Sep 8 20:26:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
paulnovo-guest pushed a commit to branch master
in repository opensurgsim.
commit 1c6cd23d4f2f1530996d4061420f23e97a521205
Author: Paul Novotny <paul at paulnovo.us>
Date: Thu Sep 8 16:24:19 2016 -0400
Fix FTBFS with eigen3 3.3~beta2-1 (Closes: #835417)
---
debian/changelog | 4 +
debian/patches/backport-5fa47c607.patch | 314 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 319 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6ab6969..5cda350 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
opensurgsim (0.6.0-6) UNRELEASED; urgency=medium
+ [ Andreas Tille ]
* Team upload
* cme fix dpkg-control
* Fix FTBFS with GCC 6 (thanks for the patch to Graham Inggs
<ginggs at debian.org>)
Closes: #831096
+ [ Paul Novotny ]
+ * Fix FTBFS with eigen3 3.3~beta2-1 (Closes: #835417)
+
-- Andreas Tille <tille at debian.org> Thu, 25 Aug 2016 15:15:21 +0200
opensurgsim (0.6.0-5) unstable; urgency=medium
diff --git a/debian/patches/backport-5fa47c607.patch b/debian/patches/backport-5fa47c607.patch
new file mode 100644
index 0000000..37c2730
--- /dev/null
+++ b/debian/patches/backport-5fa47c607.patch
@@ -0,0 +1,314 @@
+Description: Fix FTBFS with eigen3 3.3~beta2-1
+ MultiplyVectorScalar and MultiplyScalarVector tests in VectorTests were
+ failing on at least amd64. This was fixed upstream by relaxing the expected
+ precision of the failing unit tests. The precision was previously to strict
+ for single precision floats.
+Author: Paul Novotny <paul at paulnovo.us>
+Bug-Debian: https://bugs.debian.org/835417
+Origin: upstream, https://github.com/simquest/opensurgsim/commit/5fa47c607
+Last-Update: 2016-09-08
+
+--- a/SurgSim/Math/UnitTests/VectorTests.cpp
++++ b/SurgSim/Math/UnitTests/VectorTests.cpp
+@@ -17,12 +17,12 @@
+ /// Tests that exercise the functionality of our vector typedefs, which come
+ /// straight from Eigen.
+
++#include <gtest/gtest.h>
++#include <math.h>
+ #include <vector>
+
+-#include <math.h>
+-#include "SurgSim/Math/Vector.h"
+ #include "SurgSim/Math/MathConvert.h"
+-#include "gtest/gtest.h"
++#include "SurgSim/Math/Vector.h"
+
+ // Define test fixture class templates.
+ // We don't really need fixtures as such, but the templatization encodes type.
+@@ -284,7 +284,7 @@
+ Vector2 vector;
+ // Initialize elements in order. Do NOT put parentheses around the list!
+ vector << static_cast<T>(1.1), static_cast<T>(1.2);
+- EXPECT_NEAR(2.3, vector.sum(), 1e-6) << "initialization was incorrect: " << vector;
++ EXPECT_NEAR(2.3, vector.sum(), 5e-6) << "initialization was incorrect: " << vector;
+ }
+
+ /// Test setting the vector using the << syntax.
+@@ -296,7 +296,7 @@
+ Vector3 vector;
+ // Initialize elements in order. Do NOT put parentheses around the list!
+ vector << static_cast<T>(1.1), static_cast<T>(1.2), static_cast<T>(1.3);
+- EXPECT_NEAR(3.6, vector.sum(), 1e-6) << "initialization was incorrect: " << vector;
++ EXPECT_NEAR(3.6, vector.sum(), 5e-6) << "initialization was incorrect: " << vector;
+ }
+
+ /// Test setting the vector using the << syntax.
+@@ -308,7 +308,7 @@
+ Vector4 vector;
+ // Initialize elements in order. Do NOT put parentheses around the list!
+ vector << static_cast<T>(1.1), static_cast<T>(1.2), static_cast<T>(1.3), static_cast<T>(1.4);
+- EXPECT_NEAR(5.0, vector.sum(), 1e-6) << "initialization was incorrect: " << vector;
++ EXPECT_NEAR(5.0, vector.sum(), 5e-6) << "initialization was incorrect: " << vector;
+ }
+
+ /// Test setting the vector using the << syntax.
+@@ -321,7 +321,7 @@
+ // Initialize elements in order. Do NOT put parentheses around the list!
+ vector << static_cast<T>(1.1), static_cast<T>(1.2), static_cast<T>(1.3), static_cast<T>(1.4),
+ static_cast<T>(1.5), static_cast<T>(1.6);
+- EXPECT_NEAR(8.1, vector.sum(), 1e-6) << "initialization was incorrect: " << vector;
++ EXPECT_NEAR(8.1, vector.sum(), 5e-6) << "initialization was incorrect: " << vector;
+ }
+
+ /// Test getting a zero value usable in expressions.
+@@ -461,7 +461,7 @@
+
+ Vector v(inputArray);
+ Vector n = -v;
+- EXPECT_NEAR(static_cast<T>(-expectedSum), n.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(-expectedSum), n.sum(), 5e-6);
+ }
+
+ /// Addition.
+@@ -479,7 +479,7 @@
+ Vector v(inputArray);
+ Vector w = v + Vector::Ones() + v;
+
+- EXPECT_NEAR(static_cast<T>(2 * expectedSum) + SIZE, w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(2 * expectedSum) + SIZE, w.sum(), 5e-6);
+ }
+
+ /// Subtraction.
+@@ -497,7 +497,7 @@
+ Vector v(inputArray);
+ Vector w = v - Vector::Ones();
+
+- EXPECT_NEAR(static_cast<T>(expectedSum) - SIZE, w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum) - SIZE, w.sum(), 5e-6);
+ }
+
+ /// Incrementing by a value.
+@@ -514,7 +514,7 @@
+
+ Vector v(inputArray);
+ v += Vector::Ones();
+- EXPECT_NEAR(static_cast<T>(expectedSum) + SIZE, v.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum) + SIZE, v.sum(), 5e-6);
+ }
+
+ /// Decrementing by a value.
+@@ -531,7 +531,7 @@
+
+ Vector v(inputArray);
+ v -= Vector::Ones();
+- EXPECT_NEAR(static_cast<T>(expectedSum) - SIZE, v.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum) - SIZE, v.sum(), 5e-6);
+ }
+
+ /// Vector-scalar multiplication.
+@@ -549,7 +549,7 @@
+ Vector v(inputArray);
+ Vector w = v * static_cast<T>(1.23);
+
+- EXPECT_NEAR(static_cast<T>(1.23 * expectedSum), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(1.23 * expectedSum), w.sum(), 5e-6);
+ }
+
+ /// Scalar-vector multiplication.
+@@ -567,7 +567,7 @@
+ Vector v(inputArray);
+ Vector w = static_cast<T>(1.23) * v;
+
+- EXPECT_NEAR(static_cast<T>(1.23 * expectedSum), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(1.23 * expectedSum), w.sum(), 5e-6);
+ }
+
+ /// Division by scalar.
+@@ -585,7 +585,7 @@
+ Vector v(inputArray);
+ Vector w = v / static_cast<T>(1.23);
+
+- EXPECT_NEAR(static_cast<T>(expectedSum / 1.23), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum / 1.23), w.sum(), 5e-6);
+ }
+
+ /// Component-wise multiplication.
+@@ -603,10 +603,10 @@
+ Vector v(inputArray);
+ // use the component-wise Eigen matrix operation:
+ Vector w = v.cwiseProduct(v);
+- EXPECT_NEAR(static_cast<T>(expectedSumSquares), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSumSquares), w.sum(), 5e-6);
+ // OR, the same thing done via conversion to arrays:
+ w = v.array() * v.array();
+- EXPECT_NEAR(static_cast<T>(expectedSumSquares), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSumSquares), w.sum(), 5e-6);
+ }
+
+ /// Component-wise division.
+@@ -623,10 +623,10 @@
+ Vector u = static_cast<T>(2)*v;
+ // use the component-wise Eigen matrix operation:
+ Vector w = u.cwiseQuotient(v);
+- EXPECT_NEAR(static_cast<T>(2*SIZE), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(2*SIZE), w.sum(), 5e-6);
+ // OR, the same thing done via conversion to arrays:
+ w = u.array() / v.array();
+- EXPECT_NEAR(static_cast<T>(2*SIZE), w.sum(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(2*SIZE), w.sum(), 5e-6);
+ }
+
+ /// Dot product.
+@@ -642,7 +642,7 @@
+ double expectedSumSquares = SIZE * (SIZE * (SIZE*0.03 + 0.885) + 8.695);
+
+ Vector v(inputArray);
+- EXPECT_NEAR(static_cast<T>(expectedSumSquares), v.dot(v), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSumSquares), v.dot(v), 5e-6);
+ }
+
+ /// Cross product.
+@@ -697,8 +697,8 @@
+ double expectedSumSquares = SIZE * (SIZE * (SIZE*0.03 + 0.885) + 8.695);
+
+ Vector v(inputArray);
+- EXPECT_NEAR(static_cast<T>(expectedSumSquares), v.squaredNorm(), 1e-6);
+- EXPECT_NEAR(sqrt(static_cast<T>(expectedSumSquares)), v.norm(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSumSquares), v.squaredNorm(), 5e-6);
++ EXPECT_NEAR(sqrt(static_cast<T>(expectedSumSquares)), v.norm(), 5e-6);
+ }
+
+ /// L1 (Manhattan) norm and L_Infinity (largest absolute value) norm.
+@@ -718,8 +718,8 @@
+ // Ugh, "template" is required to get this to parse properly. This is
+ // triggered because the test is a part of a template class; you don't
+ // need to do this in a non-template context.
+- EXPECT_NEAR(static_cast<T>(expectedSum), v.template lpNorm<1>(), 1e-6);
+- EXPECT_NEAR(static_cast<T>(expectedSum), w.template lpNorm<1>(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum), v.template lpNorm<1>(), 5e-6);
++ EXPECT_NEAR(static_cast<T>(expectedSum), w.template lpNorm<1>(), 5e-6);
+ EXPECT_NEAR(inputArray[SIZE-1], v.template lpNorm<Eigen::Infinity>(), 1e-6);
+ EXPECT_NEAR(inputArray[SIZE-1], w.template lpNorm<Eigen::Infinity>(), 1e-6);
+ }
+@@ -737,16 +737,16 @@
+ double expectedSumSquares = SIZE * (SIZE * (SIZE*0.03 + 0.885) + 8.695);
+
+ Vector v(inputArray);
+- EXPECT_NEAR(sqrt(expectedSumSquares), v.norm(), 1e-6);
++ EXPECT_NEAR(sqrt(expectedSumSquares), v.norm(), 5e-6);
+
+ // normalized() RETURNS the normalized vector, leaving original unchanged.
+ Vector u = v.normalized();
+- EXPECT_NEAR(static_cast<T>(1), u.norm(), 1e-6);
+- EXPECT_NEAR(sqrt(static_cast<T>(expectedSumSquares)), v.norm(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(1), u.norm(), 5e-6);
++ EXPECT_NEAR(sqrt(static_cast<T>(expectedSumSquares)), v.norm(), 5e-6);
+ // normalize() NORMALIZES the vector, modifying it.
+ v.normalize();
+- EXPECT_NEAR(static_cast<T>(1), v.norm(), 1e-6);
+- EXPECT_NEAR(static_cast<T>(0), (u - v).norm(), 1e-6);
++ EXPECT_NEAR(static_cast<T>(1), v.norm(), 5e-6);
++ EXPECT_NEAR(static_cast<T>(0), (u - v).norm(), 5e-6);
+ }
+
+ /// Minimum and maximum elements.
+@@ -782,7 +782,7 @@
+ // class; you don't need to do this in a non-template context.
+ vector3.template head<2>() = vector2;
+ vector3[2] = static_cast<T>(0);
+- EXPECT_NEAR(2.3, vector3.sum(), 1e-6) << "extending was incorrect: " << vector3;
++ EXPECT_NEAR(2.3, vector3.sum(), 5e-6) << "extending was incorrect: " << vector3;
+ }
+
+ /// Extending vectors using the head(r) syntax.
+@@ -798,7 +798,7 @@
+ Vector3 vector3;
+ vector3.head(2) = vector2;
+ vector3[2] = static_cast<T>(0);
+- EXPECT_NEAR(2.3, vector3.sum(), 1e-6) << "extending was incorrect: " << vector3;
++ EXPECT_NEAR(2.3, vector3.sum(), 5e-6) << "extending was incorrect: " << vector3;
+ }
+
+ /// Extending vectors using the block<r,c>() syntax.
+@@ -817,7 +817,7 @@
+ // class; you don't need to do this in a non-template context.
+ vector3.template block<2, 1>(0, 0) = vector2;
+ vector3(2, 0) = static_cast<T>(0);
+- EXPECT_NEAR(2.3, vector3.sum(), 1e-6) << "extending was incorrect: " << vector3;
++ EXPECT_NEAR(2.3, vector3.sum(), 5e-6) << "extending was incorrect: " << vector3;
+ }
+
+ /// Extending vectors using the block(i,j,r,c) syntax.
+@@ -833,7 +833,7 @@
+ Vector3 vector3;
+ vector3.block(0, 0, 2, 1) = vector2;
+ vector3(2, 0) = static_cast<T>(0);
+- EXPECT_NEAR(2.3, vector3.sum(), 1e-6) << "extending was incorrect: " << vector3;
++ EXPECT_NEAR(2.3, vector3.sum(), 5e-6) << "extending was incorrect: " << vector3;
+ }
+
+ /// Shrinking vectors using the head<r>() syntax.
+@@ -851,7 +851,7 @@
+ // properly. This is triggered because the test is a part of a template
+ // class; you don't need to do this in a non-template context.
+ vector2 = vector3.template head<2>();
+- EXPECT_NEAR(2.3, vector2.sum(), 1e-6) << "shrinking was incorrect: " << vector2;
++ EXPECT_NEAR(2.3, vector2.sum(), 5e-6) << "shrinking was incorrect: " << vector2;
+ }
+
+ /// Extending vectors using the head<r>() syntax.
+@@ -870,7 +870,7 @@
+ // class; you don't need to do this in a non-template context.
+ vector3.template head<2>() = vector2;
+ vector3[2] = static_cast<T>(0);
+- EXPECT_NEAR(2.3, vector3.sum(), 1e-6) << "extending was incorrect: " << vector3;
++ EXPECT_NEAR(2.3, vector3.sum(), 5e-6) << "extending was incorrect: " << vector3;
+ }
+
+ /// Shrinking vectors using the head<r>() syntax.
+@@ -888,7 +888,7 @@
+ // properly. This is triggered because the test is a part of a template
+ // class; you don't need to do this in a non-template context.
+ vector2 = vector3.template head<2>();
+- EXPECT_NEAR(2.3, vector2.sum(), 1e-6) << "shrinking was incorrect" << vector2;
++ EXPECT_NEAR(2.3, vector2.sum(), 5e-6) << "shrinking was incorrect" << vector2;
+ }
+
+ /// Extending vectors using the head<r>() syntax.
+@@ -907,7 +907,7 @@
+ // class; you don't need to do this in a non-template context.
+ vector4.template head<3>() = vector3;
+ vector4[3] = static_cast<T>(0);
+- EXPECT_NEAR(3.6, vector4.sum(), 1e-6) << "extending was incorrect" << vector4;
++ EXPECT_NEAR(3.6, vector4.sum(), 5e-6) << "extending was incorrect" << vector4;
+ }
+
+ /// Shrinking vectors using the head<r>() syntax.
+@@ -925,7 +925,7 @@
+ // properly. This is triggered because the test is a part of a template
+ // class; you don't need to do this in a non-template context.
+ vector3 = vector4.template head<3>();
+- EXPECT_NEAR(3.6, vector3.sum(), 1e-6) << "shrinking was incorrect" << vector3;
++ EXPECT_NEAR(3.6, vector3.sum(), 5e-6) << "shrinking was incorrect" << vector3;
+ }
+
+ /// Extending vectors using the head<r>() syntax.
+@@ -944,7 +944,7 @@
+ // class; you don't need to do this in a non-template context.
+ vector4.template head<3>() = vector3;
+ vector4[3] = static_cast<T>(0);
+- EXPECT_NEAR(3.6, vector4.sum(), 1e-6) << "extending was incorrect" << vector4;
++ EXPECT_NEAR(3.6, vector4.sum(), 5e-6) << "extending was incorrect" << vector4;
+ }
+
+ /// Shrinking vectors using the head<r>() syntax.
+@@ -962,7 +962,7 @@
+ // properly. This is triggered because the test is a part of a template
+ // class; you don't need to do this in a non-template context.
+ vector3 = vector4.template head<3>();
+- EXPECT_NEAR(3.6, vector3.sum(), 1e-6) << "shrinking was incorrect" << vector3;
++ EXPECT_NEAR(3.6, vector3.sum(), 5e-6) << "shrinking was incorrect" << vector3;
+ }
+
+ /// Extend Euclidean N-vector [a_i] to homogeneous (N+1)-vector [a_i 1].
diff --git a/debian/patches/series b/debian/patches/series
index fe3bfbc..549cd0e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ fix-build-with-eigen-3-3.patch
backport-b9584d8c1.patch
disable-sensitive-tests.patch
gcc6.patch
+backport-5fa47c607.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/opensurgsim.git
More information about the debian-med-commit
mailing list