This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problem compiling in Windows

Tags: None
(comma "," separated)
User avatar
Koldo
Registered Member
Posts
16
Karma
0

Problem compiling in Windows

Tue Aug 11, 2009 7:30 am
Hello all

I get compiling errors using the development branch that do not appear using the stable 2.0.4 in Windows, just compiling the #include <Eigen/Eigen> line:

- Using MinGW 4.4.0
Eigen/Eigen/SVD:25:39: error: src/SVD/Bidiagonalization.h: No such file or directory

- Using MSC 9 (Visual C++ 2008)
eigen\eigen\src/Core/BandMatrix.h(133) : error C2059: syntax error : ')'
eigen\eigen\src/Core/BandMatrix.h(146) : see reference to class template instantiation 'Eigen::BandMatrix<_Scalar,Rows,
Cols,Supers,Subs,Options>::DiagonalIntReturnType<Index>' being compiled
igen\eigen\src/Core/BandMatrix.h(195) : see reference to class template instantiation 'Eigen::BandMatrix<_Scalar,Rows,
Cols,Supers,Subs,Options>' being compiled

Best regards
Koldo
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Problem compiling in Windows

Tue Aug 11, 2009 10:06 am
Oops: the problem with "Bidiagonalization" is my fault, just remove that #include.

I can't fix it at the moment as my root partition got corrupted last night and I need at least a reinstall... if not a new machine :/


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
Koldo
Registered Member
Posts
16
Karma
0

Re: Problem compiling in Windows

Tue Aug 11, 2009 12:07 pm
Hello bjacob

Sorry for your computer.

I have commented that #include but I have got this error using MinGW 4.4.0:

\Eigen/Eigen/src/Core/Assign.h: In static member function 'static void Eigen::ei_assign_traits<Derived, OtherDerived>::d
ebug()':
\Eigen/Eigen/src/Core/Assign.h:100: error: expected ';' before 'EIGEN_DEBUG_VAR'

It is in this struct:

static void debug()
{
EIGEN_DEBUG_VAR(DstIsAligned)
EIGEN_DEBUG_VAR(SrcIsAligned)
EIGEN_DEBUG_VAR(SrcAlignment)
EIGEN_DEBUG_VAR(InnerSize)
EIGEN_DEBUG_VAR(InnerMaxSize)
EIGEN_DEBUG_VAR(PacketSize)
EIGEN_DEBUG_VAR(MightVectorize)
EIGEN_DEBUG_VAR(MayInnerVectorize)
EIGEN_DEBUG_VAR(MayLinearVectorize)
EIGEN_DEBUG_VAR(MaySliceVectorize)
EIGEN_DEBUG_VAR(Vectorization)
EIGEN_DEBUG_VAR(UnrollingLimit)
EIGEN_DEBUG_VAR(MayUnrollCompletely)
EIGEN_DEBUG_VAR(MayUnrollInner)
EIGEN_DEBUG_VAR(Unrolling)
}

It is like it would require ';' after every EIGEN_DEBUG_VAR line.

Best regards
Koldo
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Problem compiling in Windows

Tue Aug 11, 2009 1:07 pm
problems fixed.
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Problem compiling in Windows

Tue Aug 11, 2009 3:33 pm
I dont think that semicolons were missing, rather i think that I forgot to commit the changes in Macros.h

Whats needed is to add this line to Macros.h:

Code: Select all
#define EIGEN_DEBUG_VAR(x) std::cerr << #x << " = " << x << std::endl;


i cant do it at the moment as my computer is down. perhaps in a few hours.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Problem compiling in Windows

Tue Aug 11, 2009 6:12 pm
OK, it's fixed now.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
Koldo
Registered Member
Posts
16
Karma
0

Re: Problem compiling in Windows

Wed Aug 12, 2009 7:59 am
Hello

Thank you for the fast response.

Problem in MinGW has been solved. However the problem with MSC 9 still remains:
Code: Select all
eigen\eigen\src/Core/BandMatrix.h(133) : error C2059: syntax error : ')'
eigen\eigen\src/Core/BandMatrix.h(146) : see reference to class template instantiation 'Eigen::BandMatrix<_Scalar,Rows,
Cols,Supers,Subs,Options>::DiagonalIntReturnType<Index>' being compiled
igen\eigen\src/Core/BandMatrix.h(195) : see reference to class template instantiation 'Eigen::BandMatrix<_Scalar,Rows,
Cols,Supers,Subs,Options>' being compiled

This is the code (marked with 'Error->>' the line 133 with error):
Code: Select all
    template<int Index> struct DiagonalIntReturnType {
      enum {
Error->>        ReturnOpposite = (Options&SelfAdjoint) && (Index>0 && Supers==0 || Index<0 && Subs==0),
        Conjugate = ReturnOpposite && NumTraits<Scalar>::IsComplex,
        ActualIndex = ReturnOpposite ? -Index : Index,
        DiagonalSize = RowsAtCompileTime==Dynamic || ColsAtCompileTime==Dynamic
                     ? Dynamic
                     : ActualIndex<0
                     ? EIGEN_ENUM_MIN(ColsAtCompileTime, RowsAtCompileTime + ActualIndex)
                     : EIGEN_ENUM_MIN(RowsAtCompileTime, ColsAtCompileTime - ActualIndex)
      };

Best regards
Koldo

Last edited by bcooksley on Wed Aug 12, 2009 9:57 am, edited 1 time in total.
Reason: Use [code] bbcode
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Problem compiling in Windows

Wed Aug 12, 2009 12:16 pm
I'm a bit lost, as that code seems valid to me; I have added some parentheses to make it more clear, can you retry, perhaps this is what confused MSVC (but that would be a MSVC bug, the code was valid given the c++ operator priorities).

Does the error occur as soon as this file gets #included or do you actually have code that uses the Bidiagonalization class? In the former case, you can work around the error for now by removing the #include Bidiagonalization.h in the Eigen/Core file...


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
Koldo
Registered Member
Posts
16
Karma
0

Re: Problem compiling in Windows

Thu Aug 13, 2009 7:43 am
Hello bjacob

Does the error occur as soon as this file gets #included

Yes, it appears just in #include <Eigen/Eigen>
you can work around the error for now by removing the #include Bidiagonalization.h in the Eigen/Core file...

Yes, doing that I do not get the compiling error

I have been working on this error and, believe me, this solves the problem:

Code: Select all
ReturnOpposite = (Options&SelfAdjoint) && ((Index>0 && Supers==0) || ((Index)<0 && Subs==0)),

Just putting the right 'Index' between parenthesis the compiling error dissapears :-o .
There could be a problem between Index and '<' ?

Best regards
Koldo
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Problem compiling in Windows

Thu Aug 13, 2009 11:48 am
Great, thanks for debugging this. That's clearly a but in MSVC but that's OK, it's not the first time that we make workarounds. Applying your fix.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
User avatar
Koldo
Registered Member
Posts
16
Karma
0

Re: Problem compiling in Windows

Thu Aug 13, 2009 2:13 pm
Thank you bjacob

The problem is now solved!

Best regards
Koldo


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]