Re: [eigen] Eigen2 to Eigen3 Migration Path

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

(Gael: i think the issue is that their users may be using
simultaneously ROS and other Eigen2-based libraries, so that they may
really need to include Eigen2 for the time being).

To complement Gael's answer:

Radu has several times mentioned this to me, but reading your mail I
come to realize that it's time we do something more on our side to
make things easier for you (proposal below, search for PROPOSAL).

2011/1/11 Tully Foote <tfoote@xxxxxxxxxxxxxxxx>:
> Hi,
>
> As an introduction I’m the developer who maintains the ROS wrapper of Eigen.
>   As we are approaching our next release we have quite a few developers who
> want Eigen3 to be integrated into the upcoming release.  However I have a
> problem in that several of our core libraries use Eigen2 and many packages
> built on top of them use Eigen2 as well.  Because Eigen3 and Eigen2 are API
> breaking I would like to be able to install them side by side

That, in itself, is very easy: Eigen2 and Eigen3 are co-installable.
By default, Eigen2 installs into $prefix/eigen2/include and Eigen3
into $prefix/eigen3/include.

Moreover, in Eigen3's sources' cmake/ directory, you can find
FindEigen2.cmake and FindEigen3.cmake modules.

So co-installation is not a problem at all.

The only problem is when a single program wants to use both Eigen2 and
Eigen3 at the same time, as both use the same Eigen namespace and
probably also have lots of #include guards in common.

> so as to
> provide a period where developers can transition from Eigen2 to Eigen3.  We
> have found a temporary way to do this which involves patching all
> namespaces, include guards, and macros inside Eigen3 such that none of them
> collide with Eigen2.

Indeed, ok.

>  However doing this is a problem for it means that our
> installation of Eigen3 is not the same as the  official released version,
> and any library written against the released version is not compatible with
> our mangled version.

Indeed.

>
> We’d really like to be able to support both Eigen2 and Eigen3 to allow a
> transition period for existing software using Eigen2.  Has anyone thought
> about how to deal with this migration and have a suggestion about how to
> proceed?

First of all, Gael's proposal is the way to go if your Eigen2 code can
trivially use instead Eigen3+EIGEN2_SUPPORT.

But in the general case, I agree that solving the problems you mention
would help our current users move to Eigen3 and that's what we want.

*** PROPOSAL: ***

The trivial solution would have been to replace Eigen by Eigen3 and
EIGEN_ by EIGEN3_ everywhere in the Eigen3 sources, but that is quite
invasive at this stage.

However, given that that solves the problem once and for all, also for
any future version, it's quite tempting.

Would you agree with such a change?

Library major version transitions are always difficult, I still
remember Qt3->Qt4 and KDE3->KDE4, let's do everything we can to ease
our own transition.

> BTW for scale I have several thousand lines of code using Eigen2 by name in
> our indexed repositories.

That in itself is not the scary part....

>  And I know that there are many projects building
> on top of our software which use our core libraries and consequently I
> expect are also using Eigen2.  Also we rely on external libraries which use
> Eigen2 natively such as kdl and opencv.

.... but all of that is scary and is why I believe we should do the
above change on our side.

Cheers,
Benoit

>
>
> --
> Tully Foote
> Systems Engineer
> Willow Garage, Inc.
> tfoote@xxxxxxxxxxxxxxxx
> (650) 475-2827
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/