New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 1392 - Compiling Eigen/Sparse with EIGEN_MPL2_ONLY includes SparseCholesky:#error
Compiling Eigen/Sparse with EIGEN_MPL2_ONLY includes SparseCholesky:#error
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: Sparse
3.3 (current stable)
All All
: Normal Compilation Problem
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-10 19:29 UTC by totto
Modified: 2017-02-11 09:36 UTC (History)
2 users (show)



Attachments
Eigen-3.3.2-SparseCholesky-MPL2_ONLY.patch (246 bytes, patch)
2017-02-10 19:29 UTC, totto
no flags Details | Diff

Description totto 2017-02-10 19:29:10 UTC
Created attachment 774 [details]
Eigen-3.3.2-SparseCholesky-MPL2_ONLY.patch

When including Eigen/Sparse and compiling with EIGEN_MPL2_ONLY an #error directive is triggered:

Eigen/SparseCholesky:34:2: error: The SparseCholesky module has nothing to offer in MPL2 only mode
#error The SparseCholesky module has nothing to offer in MPL2 only mode

This can be fixed by checking for the MPL2 define in Eigen/Sparse and skipping Eigen/SparseCholesky if it is set, see attached patch.
Comment 1 Gael Guennebaud 2017-02-11 09:36:59 UTC
Thank you for the fix. Applied:

https://bitbucket.org/eigen/eigen/commits/4ce22c540fc5/  (default)
https://bitbucket.org/eigen/eigen/commits/332d580117b7/  (3.3)

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