Registered Member
|
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" |
Registered Member
|
Looks like the compiler doesn't like your 'using' statement:
Maybe you could try if it works without the using statement (you're using typedef anyway, right?) |
Registered Member
|
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:
Would be great to get some help. Regards Holger
|
Moderator
|
Here is a tentative patch. Please try it and get back to us so that we apply it upstream.
|
Registered Member
|
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 |
Moderator
|
hm, this patch should at least suppress errors like:
What are the remaining errors? |
Registered Member
|
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:
|
Moderator
|
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__. |
Moderator
|
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 |
Registered Member
|
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):
Therefore I commented out: CwiseUnaryView.h
and I got a complete compiler run without errors. Ok, commenting out a line of code is no solution but
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. |
Moderator
|
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! |
Registered Member
|
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
* /src/Core/Random.h line 129 / 148
* /src/Core/GenericPacketMath.h line 186
* /src/Core/util/Macros.h line 193 / 258
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 |
Moderator
|
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. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]