RE: [eigen] Compiling errors in Nuttx environment

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


Christoph,

Looks like that the commit, relative to isfinite(), didn't fixed all the problems.

When trying to compile:

/home/nuno/dev_px4/apply_eigen_math/Firmware/src/modules/position_estimator_inav/position_estimator_inav_main.cpp:421:11: fatal error: no matching function for call to
      'isfinite'
                                                if (isfinite(sensor.baro_alt_meter)) {
                                                    ^~~~~~~~
/home/nuno/dev_px4/apply_eigen_math/Firmware//src/lib/eigen/Eigen/src/Core/GlobalFunctions.h:66:36: note: candidate template ignored: could not match
      'ArrayBase<type-parameter-0-0>' against 'float'
  EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isfinite,scalar_isfinite_op)
                                   ^
/home/nuno/dev_px4/apply_eigen_math/Firmware//src/lib/eigen/Eigen/src/Core/GlobalFunctions.h:17:4: note: expanded from macro 'EIGEN_ARRAY_DECLARE_GLOBAL_UNARY'
  (NAME)(const Eigen::ArrayBase<Derived>& x) { \
   ^


The only option I found was adding:

#ifdef __cplusplus
#ifndef isfinite
#define isfinite std::isfinite
#endif
#endif

But it completely breaks other isfinite() implementations of the PX4 Firmware.

How can this be solved? I'm in a delicate process of migrating the Firmware math to Eigen and every detail and help counts.

Thanks! Best regards,

---
Nuno Marques
Tenente Aluno de Transmissões (Eng)

+351 912 090 991
Azambuja | Portugal

As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...

Follow me in:
   

This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.



From: n.marques21@xxxxxxxxxxx
To: eigen@xxxxxxxxxxxxxxxxxxx
Subject: RE: [eigen] Compiling errors in Nuttx environment
Date: Mon, 17 Aug 2015 15:58:17 +0100

Yes it does fix! Many thanks once again!

Best regards,

---
Nuno Marques
Tenente Aluno de Transmissões (Eng)

+351 912 090 991
Azambuja | Portugal

As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...

Follow me in:
   

This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.


> Subject: Re: [eigen] Compiling errors in Nuttx environment
> To: eigen@xxxxxxxxxxxxxxxxxxx
> From: chtz@xxxxxxxxxxxxxxxxxxxxxxxx
> Date: Mon, 17 Aug 2015 16:47:19 +0200
>
> Can you check if my latest commit solves the issue?
>
> On 17.08.2015 at 16:28, Nuno Marques wrote:
> > Hi Christoph,
> > Just to say that https://bitbucket.org/eigen/eigen/pull-requests/132/refactoring-of-alignment-control-handling/activity, still doesn't solve the problem I focused on the EIGEN_MAX_STATIC_ALIGN_BYTES macro. Remembering the error:
> > In file included from /home/nuno/dev_px4/upgrade_eigen/Firmware/src/lib/eigen/Eigen/Core:298:0, from /home/nuno/dev_px4/upgrade_eigen/Firmware/src/lib/px4_eigen.h:49, from /home/nuno/dev_px4/upgrade_eigen/Firmware/src/systemcmds/tests/test_eigen.cpp:43:/home/nuno/dev_px4/upgrade_eigen/Firmware/src/lib/eigen/Eigen/src/Core/util/XprHelper.h:183:66: error: 'EIGEN_MAX_STATIC_ALIGN_BYTES' was not declared in this scope enum { value = compute_default_alignment_helper<Size*sizeof(T),EIGEN_MAX_STATIC_ALIGN_BYTES>::value }; ^compilation terminated due to -Wfatal-errors.make[2]: *** [test_eigen.cpp.o] Error 1
> > Is there a way to fix this besides the workaround?
> > Thanks in advance!
> > Best,
> >
> > ---Nuno MarquesTenente Aluno de Transmissões (Eng)
> > +351 912 090 991Azambuja | Portugal
> > As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...
> > Follow me in: This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.
> >
> > From: n.marques21@xxxxxxxxxxx
> > To: eigen@xxxxxxxxxxxxxxxxxxx
> > Subject: RE: [eigen] Compiling errors in Nuttx environment
> > Date: Fri, 14 Aug 2015 18:50:30 +0100
> >
> >
> >
> >
> >> This commit should solve the problem:
> >> https://bitbucket.org/eigen/eigen/commits/4daca6ab6a
> > Yes it fixes! :D Thanks!
> >> The fix will be rather trivial, but I'd prefer having Gael first merge
> >> this pull request:
> >> https://bitbucket.org/eigen/eigen/pull-requests/132/
> >>
> >> Please bear with the workaround for a short time.
> > OK I will stay with the workaround for now. Please let me know when this is pushed to main code.
> > Thank you so much! I appreciate your help.
> > Best regards,
> >
> > ---Nuno MarquesTenente Aluno de Transmissões (Eng)
> > +351 912 090 991Azambuja | Portugal
> > As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...
> > Follow me in: This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.
> >
> >> Subject: Re: [eigen] Compiling errors in Nuttx environment
> >> To: eigen@xxxxxxxxxxxxxxxxxxx
> >> From: chtz@xxxxxxxxxxxxxxxxxxxxxxxx
> >> Date: Fri, 14 Aug 2015 17:44:39 +0200
> >>
> >> On 14.08.2015 at 16:45, Nuno Marques wrote:
> >>> Hi Christoph,
> >>>
> >>> Thanks for the feedback.
> >>>
> >>> > Could you check if
> >>> > #define EIGEN_MAX_STATIC_ALIGN_BYTES 16
> >>> > before including Eigen works around that problem? There are some pending
> >>> > refactorings on the vectorization logic, which should solve this issue
> >>> > in the near future.
> >>>
> >>> Yep that solved the problem. But then this a temporary solution right.
> >>> Are you planning to launch a fix in the near future.
> >>
> >> The fix will be rather trivial, but I'd prefer having Gael first merge
> >> this pull request:
> >> https://bitbucket.org/eigen/eigen/pull-requests/132/
> >>
> >> Please bear with the workaround for a short time.
> >>
> >>>
> >>> > Regarding the isfinite problem: Can you check if protecting all calls
> >>> > and definitions of isfinite by braces solves the issue, as well?
> >>> >
> >>> > I.e., replace
> >>> > return numext::isfinite(numext::real(x)) &&
> >>> > numext::isfinite(numext::imag(x));
> >>> > by
> >>> > return (numext::isfinite)(numext::real(x)) &&
> >>> > (numext::isfinite)(numext::imag(x));
> >>> >
> >>> > etc...
> >>>
> >>> It partially solved the problem. Now I get:
> >>> [...]
> >>
> >> This commit should solve the problem:
> >> https://bitbucket.org/eigen/eigen/commits/4daca6ab6a
> >>
> >>
> >> Christoph
> >>
> >> --
> >> ----------------------------------------------
> >> Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
> >> Cartesium 0.049
> >> Universität Bremen
> >> Enrique-Schmidt-Straße 5
> >> 28359 Bremen
> >>
> >> Tel: +49 (421) 218-64252
> >> ----------------------------------------------
> >>
> >>
> >
> >
>
>
> --
> ----------------------------------------------
> Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
> Cartesium 0.049
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: +49 (421) 218-64252
> ----------------------------------------------
>
>


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