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

g++-4.01 OSX compile error while g++4.4 works

Tags: None
(comma "," separated)
linello
Registered Member
Posts
56
Karma
0
OS
Hi, maybe I found a compiler issue for the Hyperplane class.

I'm trying to compile the following:

Foo.h
Code: Select all
#include <Eigen/Core>
#include <Eigen/Geometry>

using namespace Eigen;

class Foo
{
  public:
      Foo();
  private:
      AngleAxis<double> aaLeft, aaRight;
     
};



Foo.cpp

Code: Select all
#include "Foo.h"


Foo::Foo()
{
   
}



Compiling it with g++-4.01, I get this error:
Code: Select all
../eigen/Eigen/src/Core/DiagonalMatrix.h: In instantiation of 'Eigen::DiagonalBase<Eigen::DiagonalMatrix<double, 3, 3> >':
../eigen/Eigen/src/Core/DiagonalMatrix.h:133:   instantiated from 'Eigen::DiagonalMatrix<double, 3, 3>'
../eigen/Eigen/src/Core/PlainObjectBase.h:89:   instantiated from 'Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >'
../eigen/Eigen/src/Core/Matrix.h:139:   instantiated from 'Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Geometry/AngleAxis.h:79:   instantiated from 'Eigen::AngleAxis<double>'
Ciccio.h:11:   instantiated from here
../eigen/Eigen/src/Core/DiagonalMatrix.h:35: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h:39: error: incomplete type 'Eigen::Matrix<double, 3, 1, 0, 3, 1>' used in nested name specifier
../eigen/Eigen/src/Core/DiagonalMatrix.h:39: error: incomplete type 'Eigen::Matrix<double, 3, 1, 0, 3, 1>' used in nested name specifier
../eigen/Eigen/src/Core/DiagonalMatrix.h:39: error: incomplete type 'Eigen::Matrix<double, 3, 1, 0, 3, 1>' used in nested name specifier
../eigen/Eigen/src/Core/DiagonalMatrix.h:39: error: incomplete type 'Eigen::Matrix<double, 3, 1, 0, 3, 1>' used in nested name specifier
../eigen/Eigen/src/Core/DiagonalMatrix.h:48: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h:49: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h:50: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h:55: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h:76: error: no type named 'Scalar' in 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Core/DiagonalMatrix.h: In instantiation of 'Eigen::DiagonalMatrix<double, 3, 3>':
../eigen/Eigen/src/Core/PlainObjectBase.h:89:   instantiated from 'Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >'
../eigen/Eigen/src/Core/Matrix.h:139:   instantiated from 'Eigen::Matrix<double, 3, 1, 0, 3, 1>'
../eigen/Eigen/src/Geometry/AngleAxis.h:79:   instantiated from 'Eigen::AngleAxis<double>'
Ciccio.h:11:   instantiated from here
../eigen/Eigen/src/Core/DiagonalMatrix.h:145: error: 'Eigen::DiagonalMatrix<_Scalar, SizeAtCompileTime, MaxSizeAtCompileTime>::m_diagonal' has incomplete type
../eigen/Eigen/src/Core/Matrix.h:139: error: declaration of 'class Eigen::Matrix<double, 3, 1, 0, 3, 1>'
make: *** [Ciccio.o] Error 1


But when I try with g++-4.4 I get no errors at all.

My version of Eigen is 3.0beta3

Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
wow this one is fantastic ! I've opened a bug report there:

http://eigen.tuxfamily.org/bz/show_bug.cgi?id=199

with some funny findings...
linello
Registered Member
Posts
56
Karma
0
OS
After updating to Eigen 3.0beta4 I get this message now:
With g++4.01

../eigen/Eigen/src/Geometry/Quaternion.h: In instantiation of 'Eigen::Quaternion<double, 0>':
../eigen/Eigen/src/Core/PlainObjectBase.h:93: instantiated from 'Eigen::PlainObjectBase<Eigen::Matrix<double, 4, 1, 0, 4, 1> >'
../eigen/Eigen/src/Core/Matrix.h:142: instantiated from 'Eigen::Matrix<double, 4, 1, 0, 4, 1>'
../eigen/Eigen/src/Geometry/Hyperplane.h:277: instantiated from 'Eigen::Hyperplane<double, 3, 0>'
CoordinatesExtractor.h:121: instantiated from here
../eigen/Eigen/src/Geometry/Quaternion.h:274: error: 'Eigen::Quaternion<Scalar, Options>::m_coeffs' has incomplete type
../eigen/Eigen/src/Core/Matrix.h:142: error: declaration of 'class Eigen::Matrix<double, 4, 1, 0, 4, 1>'


While with g++-4.4 I've no problem at all...

Weird...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
do you really have to use this old and **** gcc 4.0.1 compiler? I'm getting sick of working around compiler bugs!!
linello
Registered Member
Posts
56
Karma
0
OS
Ok, no problem!

For the interested OSX 10.5.8 leopard with this fuc*** compiler installed, read how to update it at http://hpc.sourceforge.net/ and download the latest version of g++ http://prdownloads.sourceforge.net/hpc/gcc-leopard-intel-bin.tar.gz?download

I'm sorry ggael :(


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora