How to downgrade Eigen version when execute brew install ceres-solver ?

1,059 views
Skip to first unread message

荻山亮大

unread,
Dec 4, 2016, 3:24:23 PM12/4/16
to Ceres Solver
Hello evey one .

Enviroment: MacOSX El Captain 10.11.4

I want to use a stable version 'Eigen 3.2.10'
instead of 'Eigen 3.3.0' that can be automatically obtained
with 'brew install ceres-solver'

Is there a good way to do it?

Sameer Agarwal

unread,
Dec 4, 2016, 3:29:57 PM12/4/16
to Ceres Solver
sorry this is a question better for the homebrew developers.
Sameer

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/0d5812a1-1e6b-4db3-98b3-053b88ee7ba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

荻山亮大

unread,
Dec 4, 2016, 3:31:37 PM12/4/16
to Ceres Solver
That's right...
Thanks!

2016年12月5日月曜日 5時29分57秒 UTC+9 Sameer Agarwal:

Alex Stewart

unread,
Dec 4, 2016, 3:39:40 PM12/4/16
to ceres-...@googlegroups.com
However, the short answer is not seamlessly no.

There is homebrew-versions: https://github.com/Homebrew/homebrew-versions but that is a) in flux and b) does not currently have an Eigen 3.x version (just an Eigen 2.x one).  However you could easily modify your eigen.rb formula, to pull down version 3.2.10 and then use --build-from-source.  I would not recommend this though as it will give you headaches in the future when you update other formulae.  Instead I would recommend you go with Eigen 3.3.0 unless you have a very good reason not too.  Maintaining legacy versions in Homebrew is a pain as its counter to their ethos.

-Alex

Stefan R

unread,
Dec 18, 2016, 8:48:11 AM12/18/16
to Ceres Solver
I suppose this happened due to an upgrade and now you cannot compile your application as Ceres CMake protection refuses to work because Ceres was linked to a previous Eigen version.
This is a frequent problem; it always happens when Eigen is updated. While I appreciate that the Ceres developer protect us from using broken Eigen versions I personally find this behaviour a bit too strict and would appreciate if Ceres only blocked known bad versions of Eigen from being used.

This situation can be resolved in a couple of ways:

You can see the installed versions of Eigen as follows: 
$ brew info eigen

Output:
eigen: stable 3.3.1 (bottled), HEAD
C++ template library for linear algebra
/usr/local/Cellar/eigen/3.2.10 (369 files, 3.5M) *
  Poured from bottle on 2016-10-08 at 08:46:59
/usr/local/Cellar/eigen/3.3.0 (484 files, 6.4M)
  Poured from bottle on 2016-11-14 at 16:18:13
/usr/local/Cellar/eigen/3.3.1 (486 files, 6.4M)
  Poured from bottle on 2016-12-09 at 22:19:39
...

If you did just a plain brew upgrade it will keep old versions. In that case you can downgrade by
$ brew switch Eigen 3.2.10

Then you can try to compile again. If the version is the one that was used when compiling Ceres you application should be compiling now, too.

If that does not help you can try to fully rebuild Ceres with the Eigen version installed:
$ brew install --build-from-source ceres-solver

Hope that helps,
Stefan
Reply all
Reply to author
Forward
0 new messages