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

Port to TI tms470 compiler for BeagleBone

Tags: None
(comma "," separated)
johnqpublic
Registered Member
Posts
1
Karma
0
Hey,

I'm interested in using Eigen for an application running on a BeagleBone (TI AM335x/ARM Cortex A8 processor). I'm currently using TI's TMS470 C/C++ compiler and have run into some compile issues with Eigen. The one that has me stumped is an error message "class member designated by a using-declaration must be visible in a direct base class detected during instantiation of class". The line of code that's triggering the error is

Pp = A * P * A.transpose() + Q;

where all the matrices are 19x19 square, but I'm getting the same error anytime I use the transpose operator. The different matrices were all defined using "typedef Matrix<double, NSTATES, NSTATES> StateMatrix;" where NSTATES is a constant, 19.

The error appears to be related to using an = operator in a derived class that isn't visible in the base class. It is pointing to the line:

EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose)

in src/Core/Transpose.h. Unfortunately, I'm new to Eigen and the nested templates are making it hard for me track down exactly what the problem is.

Anyone have any suggestions or pointers? I've included all the detailed error messages below.

Regards, Gil


"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 94: warning #21-D: type qualifiers are meaningless in this declaration
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during:
instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 237 of "..\Modules\..\Eigen\Eigen\src/Core/util/BlasUtil.h"
instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 92 of "..\Modules\..\Eigen\Eigen\src/Core/ProductBase.h"
instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>, 5>, Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 393 of "..\Modules\..\Eigen\Eigen\src/Core/products/GeneralMatrixMatrix.h"
instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during:
instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 237 of "..\Modules\..\Eigen\Eigen\src/Core/util/BlasUtil.h"
instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 92 of "..\Modules\..\Eigen\Eigen\src/Core/ProductBase.h"
instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>, 5>, Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 393 of "..\Modules\..\Eigen\Eigen\src/Core/products/GeneralMatrixMatrix.h"
instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during:
instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 237 of "..\Modules\..\Eigen\Eigen\src/Core/util/BlasUtil.h"
instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 92 of "..\Modules\..\Eigen\Eigen\src/Core/ProductBase.h"
instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>, 5>, Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 393 of "..\Modules\..\Eigen\Eigen\src/Core/products/GeneralMatrixMatrix.h"
instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during:
instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 237 of "..\Modules\..\Eigen\Eigen\src/Core/util/BlasUtil.h"
instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 92 of "..\Modules\..\Eigen\Eigen\src/Core/ProductBase.h"
instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>, 5>, Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 393 of "..\Modules\..\Eigen\Eigen\src/Core/products/GeneralMatrixMatrix.h"
instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::GeneralProduct<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>, 5>, Rhs=Eigen::Transpose<Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"
manuels
Registered Member
Posts
47
Karma
0
Looks like the compiler doesn't like your 'using' statement:
Code: Select all
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class


Maybe you could try if it works without the using statement (you're using typedef anyway, right?)
holgergaus
Registered Member
Posts
5
Karma
0
Any news here?

I am trying to port to TI C6000 DSP using the cgt6x_7_4_2 compiler/linker getting kind of the same compiler error. The corresponding source code looks like this:

Eigen::MatrixXd Q = P * P.transpose();

No compiler handling in file Macros.h works for me:

Code: Select all
#if defined(_MSC_VER) && (!defined(__INTEL_COMPILER))
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
  using Base::operator =;
#elif defined(__clang__) // workaround clang bug (see viewtopic.php?f=74&t=102653)
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
  using Base::operator =; \
  EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \
  template <typename OtherDerived> \
  EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
#else
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
  using Base::operator =; \
  EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \
  { \
    Base::operator=(other); \
    return *this; \
  }
#endif


Would be great to get some help.

Regards
Holger

Code: Select all
**** Build of configuration Debug for project eabi ****

/opt/ti/ccsv5/utils/bin/gmake -k all
Building file: ../algorithms/source/Ausgleichsgerade.cpp
Invoking: C6000 Compiler
"/opt/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6740 -g --preproc_with_compile --preproc_with_line --include_path="/opt/ti/ccsv5/tools/compiler/c6000/include" --include_path="/home/developer/Arbeitsordner/eabi/" --include_path="/home/developer/Arbeitsordner/eabi/algorithms/include" --display_error_number --diag_warning=225 --abi=eabi --obj_directory="algorithms/source"  "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/Memory.h", line 83: warning #69-D: integer conversion resulted in a change of sign
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/products/Parallelizer.h", line 20: warning #552-D: variable "m_maxThreads" was set but never used
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 199
            instantiation of "Eigen::Transpose<Derived> Eigen::DenseBase<Derived>::transpose() [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 199
            instantiation of "Eigen::Transpose<Derived> Eigen::DenseBase<Derived>::transpose() [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 199
            instantiation of "Eigen::Transpose<Derived> Eigen::DenseBase<Derived>::transpose() [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 199
            instantiation of "Eigen::Transpose<Derived> Eigen::DenseBase<Derived>::transpose() [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 228 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/BlasUtil.h"
            instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 79 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/ProductBase.h"
            instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>, 5>, Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 379 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/products/GeneralMatrixMatrix.h"
            instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 572 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/GeneralProduct.h"
            instantiation of "const Eigen::ProductReturnType<Derived, OtherDerived, Eigen::internal::product_type<Derived, OtherDerived>::value>::Type Eigen::MatrixBase<Derived>::operator*(const Eigen::MatrixBase<OtherDerived> &) const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 228 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/BlasUtil.h"
            instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 79 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/ProductBase.h"
            instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>, 5>, Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 379 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/products/GeneralMatrixMatrix.h"
            instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 572 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/GeneralProduct.h"
            instantiation of "const Eigen::ProductReturnType<Derived, OtherDerived, Eigen::internal::product_type<Derived, OtherDerived>::value>::Type Eigen::MatrixBase<Derived>::operator*(const Eigen::MatrixBase<OtherDerived> &) const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 228 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/BlasUtil.h"
            instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 79 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/ProductBase.h"
            instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>, 5>, Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 379 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/products/GeneralMatrixMatrix.h"
            instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 572 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/GeneralProduct.h"
            instantiation of "const Eigen::ProductReturnType<Derived, OtherDerived, Eigen::internal::product_type<Derived, OtherDerived>::value>::Type Eigen::MatrixBase<Derived>::operator*(const Eigen::MatrixBase<OtherDerived> &) const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/Transpose.h", line 67: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=const Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 228 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/BlasUtil.h"
            instantiation of class "Eigen::internal::blas_traits<Eigen::Transpose<Derived>> [with NestedXpr=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 79 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/ProductBase.h"
            instantiation of class "Eigen::ProductBase<Derived, Lhs, Rhs> [with Derived=Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>, 5>, Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 379 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/products/GeneralMatrixMatrix.h"
            instantiation of class "Eigen::GeneralProduct<Lhs, Rhs, 5> [with Lhs=Eigen::Matrix<double, -1, -1, 0, -1, -1>, Rhs=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 572 of "/home/developer/Arbeitsordner/eabi/Eigen/src/Core/GeneralProduct.h"
            instantiation of "const Eigen::ProductReturnType<Derived, OtherDerived, Eigen::internal::product_type<Derived, OtherDerived>::value>::Type Eigen::MatrixBase<Derived>::operator*(const Eigen::MatrixBase<OtherDerived> &) const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Transpose<Eigen::Matrix<double, -1, -1, 0, -1, -1>>]" at line 50 of "../algorithms/source/Ausgleichsgerade.cpp"
8 errors detected in the compilation of "../algorithms/source/Ausgleichsgerade.cpp".

>> Compilation failure
gmake: *** [algorithms/source/Ausgleichsgerade.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Here is a tentative patch. Please try it and get back to us so that we apply it upstream.

Code: Select all
diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h
--- a/Eigen/src/Core/Transpose.h
+++ b/Eigen/src/Core/Transpose.h
@@ -99,16 +99,17 @@ struct TransposeImpl_base<MatrixType, fa
 
 template<typename MatrixType> class TransposeImpl<MatrixType,Dense>
   : public internal::TransposeImpl_base<MatrixType>::type
 {
   public:
 
     typedef typename internal::TransposeImpl_base<MatrixType>::type Base;
     EIGEN_DENSE_PUBLIC_INTERFACE(Transpose<MatrixType>)
+    EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TransposeImpl)
 
     inline Index innerStride() const { return derived().nestedExpression().innerStride(); }
     inline Index outerStride() const { return derived().nestedExpression().outerStride(); }
 
     typedef typename internal::conditional<
                        internal::is_lvalue<MatrixType>::value,
                        Scalar,
                        const Scalar
holgergaus
Registered Member
Posts
5
Karma
0
The patch does not work for me. It seams to be a compiler parser problem of TI. If someone is interested in this ticket follow here:
http://e2e.ti.com/support/development_tools/compiler/f/343/p/272233/952549.aspx#952549

Thanks for the quick feedback and the patch.
Regards
Holger
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
hm, this patch should at least suppress errors like:

Code: Select all
"..\Modules\..\Eigen\Eigen\src/Core/Transpose.h", line 80: error #1055: class member designated by a using-declaration must be visible in a direct base class
detected during instantiation of class "Eigen::Transpose<MatrixType> [with MatrixType=Eigen::Matrix<Eigen::MatrixBase<Eigen::Matrix<double, 19, 1, 0, 19, 1>>::Scalar, 19, 19, 0, 19, 19>]" at line 281 of "../Modules/StateEstimatorEigen.cpp"


What are the remaining errors?
holgergaus
Registered Member
Posts
5
Karma
0
Sorry for my delayed reply. I was out of office.

I missed to say I am on the beta branch of eigen (3.2.0-beta1) but the compiler output for the actual stable (3.1.3) was the same in this case.
Applying your patch creates this compiler output:

Code: Select all
**** Build of configuration Debug for project eabi ****

/opt/ti/ccsv5/utils/bin/gmake -k all
Building file: ../algorithms/source/Ausgleichsgerade.cpp
Invoking: C6000 Compiler
"/opt/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6740 -g --relaxed_ansi --preproc_with_compile --preproc_with_line --include_path="/opt/ti/ccsv5/tools/compiler/c6000/include" --include_path="/home/developer/Arbeitsordner/eabi/" --include_path="/home/developer/Arbeitsordner/eabi/algorithms/include" --display_error_number --diag_warning=225 --abi=eabi --obj_directory="algorithms/source"  "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/Memory.h", line 83: warning #69-D: integer conversion resulted in a change of sign
"/tmp/05377P7jkmB", ERROR!   at line 55234: [E0003] Only labels and comments may
                                                    begin in the first column.
                                                    Make sure that the label
                                                    name is not a reserved
                                                    keyword.
   #EIGEN PRODUCT PACK LHS

"/tmp/05377P7jkmB", ERROR!   at line 55234: [E0002] Illegal mnemonic specified
   #EIGEN PRODUCT PACK LHS

"/tmp/05377P7jkmB", ERROR!   at line 56089: [E0003] Only labels and comments may
                                                    begin in the first column.
                                                    Make sure that the label
                                                    name is not a reserved
                                                    keyword.
   #EIGEN PRODUCT PACK RHS ROWMAJOR

"/tmp/05377P7jkmB", ERROR!   at line 56089: [E0002] Illegal mnemonic specified
   #EIGEN PRODUCT PACK RHS ROWMAJOR

"/tmp/05377P7jkmB", ERROR!   at line 57109: [E0003] Only labels and comments may
                                                    begin in the first column.
                                                    Make sure that the label
                                                    name is not a reserved
                                                    keyword.
   #mybegin2

"/tmp/05377P7jkmB", ERROR!   at line 57109: [E0002] Illegal mnemonic specified
   #mybegin2

"/tmp/05377P7jkmB", ERROR!   at line 57605: [E0003] Only labels and comments may
                                                    begin in the first column.
                                                    Make sure that the label
                                                    name is not a reserved
                                                    keyword.
   #myend

"/tmp/05377P7jkmB", ERROR!   at line 57605: [E0002] Illegal mnemonic specified
   #myend


Errors in Source - Assembler Aborted
8 Assembly Errors, No Assembly Warnings

>> Compilation failure
gmake: *** [algorithms/source/Ausgleichsgerade.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
That's a totally different error. Here the problem is on the assembly level. It seems it does not like the way we put ASM comments. You can workaround by defining:

#define EIGEN_ASM_COMMENT(X)

before including Eigen. Could you give us a preprocessor token that we can use to identify your compiler because it clearly defines __GNUC__.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
should be fixed:

https://bitbucket.org/eigen/eigen/commits/977b5b5eeef3/
Changeset: 977b5b5eeef3
User: ggael
Date: 2013-06-21 17:49:36
Summary: Disable ASM comments on non x86 architecture and do not redfine if EIGEN_ASM_COMMENT is already defined
holgergaus
Registered Member
Posts
5
Karma
0
The preprocessor token is "__TI_COMPILER_VERSION__". The Texas Instruments tool chain supports cross compiling on a dual core (ARM and C6000 DSP)

Successful compiler run by using your patch and an additional one of mine! :)

For a different test code (using the "CwiseUnaryView") I got this compiler error (with your patch):
Code: Select all
**** Build of configuration Debug for project eabi ****

/opt/ti/ccsv5/utils/bin/gmake -k all
Building file: ../algorithms/source/Ausgleichsgerade.cpp
Invoking: C6000 Compiler
"/opt/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6740 -g --relaxed_ansi --preproc_with_compile --preproc_with_line --include_path="/opt/ti/ccsv5/tools/compiler/c6000/include" --include_path="/home/developer/Arbeitsordner/eabi/" --include_path="/home/developer/Arbeitsordner/eabi/algorithms/include" --display_error_number --diag_warning=225 --abi=eabi --obj_directory="algorithms/source"  "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/util/Memory.h", line 83: warning #69-D: integer conversion resulted in a change of sign
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/CwiseUnaryView.h", line 70: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during instantiation of class "Eigen::CwiseUnaryView<ViewOp, MatrixType> [with ViewOp=Eigen::internal::scalar_real_ref_op<Eigen::MatrixBase<Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1>>::Scalar>, MatrixType=Eigen::Block<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, -1, 1, true>]" at line 84 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/CwiseUnaryView.h", line 70: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during instantiation of class "Eigen::CwiseUnaryView<ViewOp, MatrixType> [with ViewOp=Eigen::internal::scalar_real_ref_op<Eigen::MatrixBase<Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1>>::Scalar>, MatrixType=Eigen::Block<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, -1, 1, true>]" at line 84 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/CwiseUnaryView.h", line 70: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during instantiation of class "Eigen::CwiseUnaryView<ViewOp, MatrixType> [with ViewOp=Eigen::internal::scalar_real_ref_op<Eigen::MatrixBase<Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1>>::Scalar>, MatrixType=Eigen::Block<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, -1, 1, true>]" at line 84 of "../algorithms/source/Ausgleichsgerade.cpp"
"/home/developer/Arbeitsordner/eabi/Eigen/src/Core/CwiseUnaryView.h", line 70: error #1055: class member designated by a using-declaration must be visible in a direct base class
          detected during instantiation of class "Eigen::CwiseUnaryView<ViewOp, MatrixType> [with ViewOp=Eigen::internal::scalar_real_ref_op<Eigen::MatrixBase<Eigen::Matrix<std::complex<double>, -1, 1, 0, -1, 1>>::Scalar>, MatrixType=Eigen::Block<Eigen::Matrix<std::complex<double>, -1, -1, 0, -1, -1>, -1, 1, true>]" at line 84 of "../algorithms/source/Ausgleichsgerade.cpp"
4 errors detected in the compilation of "../algorithms/source/Ausgleichsgerade.cpp".

>> Compilation failure
gmake: *** [algorithms/source/Ausgleichsgerade.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****


Therefore I commented out:
CwiseUnaryView.h

Code: Select all
template<typename ViewOp, typename MatrixType, typename StorageKind>
class CwiseUnaryViewImpl;

template<typename ViewOp, typename MatrixType>
class CwiseUnaryView : internal::no_assignment_operator,
  public CwiseUnaryViewImpl<ViewOp, MatrixType, typename internal::traits<MatrixType>::StorageKind>
{
  public:

    typedef typename CwiseUnaryViewImpl<ViewOp, MatrixType,typename internal::traits<MatrixType>::StorageKind>::Base Base;
    EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryView)

    inline CwiseUnaryView(const MatrixType& mat, const ViewOp& func = ViewOp())
      : m_matrix(mat), m_functor(func) {}

    //EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView)

    EIGEN_STRONG_INLINE Index rows() const { return m_matrix.rows(); }
    EIGEN_STRONG_INLINE Index cols() const { return m_matrix.cols(); }


and I got a complete compiler run without errors. Ok, commenting out a line of code is no solution but
Code: Select all
class CwiseUnaryView : internal::no_assignment_operator,
gave me the idea that
Code: Select all
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView)
is probably unwanted here.

Next step is to run the code on the target and see what the missing line of source code takes effect. :<

Thanks for your help (quite impressive) and please give feed back if the line of code I dropped should be kept.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
It's rather the opposite, remove the no_assignment_operator base class as, for instance, mat.imag() is assignable. Copy/paste mistake. Fixed in devel/3.1 branches:

https://bitbucket.org/eigen/eigen/commits/1e6d2684d0b5/
Changeset: 1e6d2684d0b5
User: ggael
Date: 2013-06-24 13:45:33
Summary: CwiseUnaryView should not inherit no_assignment_operator!
holgergaus
Registered Member
Posts
5
Karma
0
The Texas Instruments compiler works with some patches based on eigen version 3.2.0.
Where can I place the merged files to follow the license? A quick search on the eigen homepage did not give me the answer.

Patched files:
* /core line 142
Code: Select all
// MSVC for windows mobile does not have the errno.h file
#if !(defined(_MSC_VER) && defined(_WIN32_WCE)) && !defined(__ARMCC_VERSION) && !defined(__TI_COMPILER_VERSION__)
#define EIGEN_HAS_ERRNO
#endif


* /src/Core/Random.h line 129 / 148
Code: Select all
template<typename Derived>
EIGEN_STRONG_INLINE Derived&
PlainObjectBase<Derived>::setRandom(Index newSize)
{
  resize(newSize);
  return DenseBase<Derived>::setRandom();
//  return setRandom();
}

Code: Select all
template<typename Derived>
EIGEN_STRONG_INLINE Derived&
PlainObjectBase<Derived>::setRandom(Index nbRows, Index nbCols)
{
  resize(nbRows, nbCols);
  return DenseBase<Derived>::setRandom();
//  return setRandom();
}


* /src/Core/GenericPacketMath.h line 186
Code: Select all
/** \internal tries to do cache prefetching of \a addr */
template<typename Scalar> inline void prefetch(const Scalar* addr)
{
#if (!defined(_MSC_VER)) && (!defined(__TI_COMPILER_VERSION__))
__builtin_prefetch(addr);
#endif
}


* /src/Core/util/Macros.h line 193 / 258
Code: Select all
    namespace Eigen {
    namespace internal {
    // trivial function copying a bool. Must be EIGEN_DONT_INLINE, so we implement it after including Eigen headers.
    // see bug 89.
    namespace {
    EIGEN_DONT_INLINE bool copy_bool(bool b) { return b; }
    }
    inline void assert_fail(const char *condition, const char *function, const char *file, int line)
    {
      std::cerr << "assertion failed: " << condition << " in function " << function << " at " << file << ":" << line << std::endl;
      std::abort();
    }
    }
    }

Code: Select all
/* EIGEN_ALIGN_TO_BOUNDARY(n) forces data to be n-byte aligned. This is used to satisfy SIMD requirements.
 * However, we do that EVEN if vectorization (EIGEN_VECTORIZE) is disabled,
 * so that vectorization doesn't affect binary compatibility.
 *
 * If we made alignment depend on whether or not EIGEN_VECTORIZE is defined, it would be impossible to link
 * vectorized and non-vectorized code.
 */
#if (defined __GNUC__) || (defined __PGI) || (defined __IBMCPP__) || (defined __ARMCC_VERSION) || (defined __TI_COMPILER_VERSION__)
  #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
#elif (defined _MSC_VER)
  #define EIGEN_ALIGN_TO_BOUNDARY(n) __declspec(align(n))
#elif (defined __SUNPRO_CC)
  // FIXME not sure about this one:
  #define EIGEN_ALIGN_TO_BOUNDARY(n) __attribute__((aligned(n)))
#else
  #error Please tell me what is the equivalent of __attribute__((aligned(n))) for your compiler
#endif


I did the patches on eigen 3.2.0 b1 and merged them to the latest release v3.2.0 but did not test so far.

Regards Holger
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
the best would be to generate a true patch with:
hg commit -m "bla"
hg export tip > filename.patch
and send it to us to have the fixes upstream.

See http://eigen.tuxfamily.org/index.php?title=Mercurial for a very quick starting guide with hg.


Bookmarks



Who is online

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