This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 535 - Resolving a compile issue with 3.1.2
Summary: Resolving a compile issue with 3.1.2
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: General (show other bugs)
Version: 3.1
Hardware: x86 - 64-bit Mac OS
: Normal critical
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-05 09:16 UTC by Sebastian Wolff
Modified: 2019-12-04 11:59 UTC (History)
2 users (show)



Attachments

Description Sebastian Wolff 2012-12-05 09:16:03 UTC
I made some changes to Eigen 3.1.2 because it did not compile in my build environment

Setting:
Mac OS Lion, gcc 4.2.1
Compile options:

g++ -c -pipe -Wall -Wextra -Werror -Wno-long-long -std=c++98 -fopenmp O3 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -fPIC -W -DAPPLE -DNDEBUG 


Changes:

git diff
diff --git a/eigen/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h b/eigen/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h
index 86ec0a6..170ada2 100644
--- a/eigen/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h
+++ b/eigen/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h
@@ -207,7 +207,11 @@ class SparseSelfAdjointTimeDenseProduct
     SparseSelfAdjointTimeDenseProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs)
     {}
 
-    template<typename Dest> void scaleAndAddTo(Dest& dest, Scalar alpha) const
+    template<typename Dest> void scaleAndAddTo(Dest& dest, Scalar
+                                           #ifndef NDEBUG
+                                               alpha
+                                           #endif
+                                               ) const
     {
       // TODO use alpha
       eigen_assert(alpha==Scalar(1) && "alpha != 1 is not implemented yet, sorry");
diff --git a/eigen/eigen/Eigen/src/SparseCore/SparseVector.h b/eigen/eigen/Eigen/src/SparseCore/SparseVector.h
index c952f65..1e156e4 100644
--- a/eigen/eigen/Eigen/src/SparseCore/SparseVector.h
+++ b/eigen/eigen/Eigen/src/SparseCore/SparseVector.h
@@ -202,7 +202,7 @@ class SparseVector
     }
 
     inline SparseVector(const SparseVector& other)
-      : m_size(0)
+      : SparseBase(other), m_size(0)
     {
       *this = other.derived();
     }
Comment 1 Sebastian Wolff 2012-12-05 11:09:16 UTC
Additional changes:


git diff
diff --git a/eigen/eigen/Eigen/src/Cholesky/LDLT.h b/eigen/eigen/Eigen/src/Cholesky/LDLT.h
index 68e54b1..b5c9289 100644
--- a/eigen/eigen/Eigen/src/Cholesky/LDLT.h
+++ b/eigen/eigen/Eigen/src/Cholesky/LDLT.h
@@ -534,7 +534,9 @@ template<typename Derived>
 bool LDLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
 {
   eigen_assert(m_isInitialized && "LDLT is not initialized.");
+#ifndef NDEBUG
   const Index size = m_matrix.rows();
+#endif
   eigen_assert(size == bAndX.rows());
 
   bAndX = this->solve(bAndX);
Comment 2 Gael Guennebaud 2012-12-16 20:26:52 UTC
https://bitbucket.org/eigen/eigen/changeset/82c2fb95d1bb/
changeset:   82c2fb95d1bb
user:        ggael
date:        2012-12-16 20:21:28
summary:     Fix bug 535: unused variable warnings

https://bitbucket.org/eigen/eigen/changeset/e94f5f6ff8a2/
changeset:   e94f5f6ff8a2
branch:      3.1
user:        ggael
date:        2012-12-16 20:21:28
summary:     Fix bug 535: unused variable warnings
(transplanted from 82c2fb95d1bbb6af3d31a3db30d972bb32379991)
Comment 3 Nobody 2019-12-04 11:59:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/535.

Note You need to log in before you can comment on or make changes to this bug.