Registered Member
|
Could anyone tell me how I can solve this erorr?
error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available I use g++ 3.4.1 on PetaLinux. My code and the error message are pasted below. Also I have looked at a previous post at viewtopic.php?f=74&t=101046&p=218147&hilit=alloca#p218147 I tried -DEIGEN_ALLOCA=aligned_malloc which resulted in segmentation fault in the compiler. Any suggestion is appreciated. Thanks. //////////////////////////////// #include <Eigen/Dense> using Eigen::Matrix3f; int main() { Matrix3f m; m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); } ///////////////////////////// In file included from ./Eigen/Core:321, from ./Eigen/Dense:1, from main.cpp:3: ./Eigen/src/Core/products/GeneralMatrixMatrix.h: In static member function `static void Eigen::internal::general_matrix_matrix_product<Index, LhsScalar, LhsStorageOrder, ConjugateLhs, RhsScalar, RhsStorageOrder, ConjugateRhs, 0>::run(Index, Index, Index, const LhsScalar*, Index, const RhsScalar*, Index, typename Eigen::internal::scalar_product_traits<LhsScalar, RhsScalar>::ReturnType*, Index, typename Eigen::internal::scalar_product_traits<LhsScalar, RhsScalar>::ReturnType, Eigen::internal::level3_blocking<LhsScalar, RhsScalar>&, Eigen::internal::GemmParallelInfo<Index>*)': ./Eigen/src/Core/products/GeneralMatrixMatrix.h:156: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/GeneralMatrixMatrix.h:156: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ./Eigen/src/Core/products/GeneralMatrixMatrix.h:157: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/GeneralMatrixMatrix.h:158: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available In file included from ./Eigen/Core:323, from ./Eigen/Dense:1, from main.cpp:3: ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h: In static member function `static void Eigen::internal::general_matrix_matrix_triangular_product<Index, LhsScalar, LhsStorageOrder, ConjugateLhs, RhsScalar, RhsStorageOrder, ConjugateRhs, 0, UpLo, Version>::run(Index, Index, const LhsScalar*, Index, const RhsScalar*, Index, typename Eigen::internal::scalar_product_traits<LhsScalar, RhsScalar>::ReturnType*, Index, typename Eigen::internal::scalar_product_traits<LhsScalar, RhsScalar>::ReturnType)': ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h:76: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available In file included from ./Eigen/Core:325, from ./Eigen/Dense:1, from main.cpp:3: ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h: In static member function `static void Eigen::internal::product_selfadjoint_matrix<Scalar, Index, LhsStorageOrder, true, ConjugateLhs, RhsStorageOrder, false, ConjugateRhs, 0>::run(Index, Index, const Scalar*, Index, const Scalar*, Index, Scalar*, Index, Scalar)': ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h:256: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h: In static member function `static void Eigen::internal::product_selfadjoint_matrix<Scalar, Index, LhsStorageOrder, false, ConjugateLhs, RhsStorageOrder, true, ConjugateRhs, 0>::run(Index, Index, const Scalar*, Index, const Scalar*, Index, Scalar*, Index, Scalar)': ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h:333: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available In file included from ./Eigen/Core:329, from ./Eigen/Dense:1, from main.cpp:3: ./Eigen/src/Core/products/TriangularMatrixMatrix.h: In static member function `static void Eigen::internal::product_triangular_matrix_matrix<Scalar, Index, Mode, true, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, 0, Version>::run(Index, Index, Index, const Scalar*, Index, const Scalar*, Index, Scalar*, Index, Scalar, Eigen::internal::level3_blocking<Scalar, Scalar>&)': ./Eigen/src/Core/products/TriangularMatrixMatrix.h:117: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularMatrixMatrix.h:118: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularMatrixMatrix.h:119: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularMatrixMatrix.h: In static member function `static void Eigen::internal::product_triangular_matrix_matrix<Scalar, Index, Mode, false, LhsStorageOrder, ConjugateLhs, RhsStorageOrder, ConjugateRhs, 0, Version>::run(Index, Index, Index, const Scalar*, Index, const Scalar*, Index, Scalar*, Index, Scalar, Eigen::internal::level3_blocking<Scalar, Scalar>&)': ./Eigen/src/Core/products/TriangularMatrixMatrix.h:246: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularMatrixMatrix.h:247: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularMatrixMatrix.h:248: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available In file included from ./Eigen/Core:330, from ./Eigen/Dense:1, from main.cpp:3: ./Eigen/src/Core/products/TriangularSolverMatrix.h: In static member function `static void Eigen::internal::triangular_solve_matrix<Scalar, Index, 1, Mode, Conjugate, TriStorageOrder, 0>::run(Index, Index, const Scalar*, Index, Scalar*, Index, Eigen::internal::level3_blocking<Scalar, Scalar>&)': ./Eigen/src/Core/products/TriangularSolverMatrix.h:64: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularSolverMatrix.h:65: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularSolverMatrix.h:66: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularSolverMatrix.h: In static member function `static void Eigen::internal::triangular_solve_matrix<Scalar, Index, 2, Mode, Conjugate, TriStorageOrder, 0>::run(Index, Index, const Scalar*, Index, Scalar*, Index, Eigen::internal::level3_blocking<Scalar, Scalar>&)': ./Eigen/src/Core/products/TriangularSolverMatrix.h:207: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularSolverMatrix.h:208: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available ./Eigen/src/Core/products/TriangularSolverMatrix.h:209: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available main.cpp:14:2: warning: no newline at end of file /home/iai/Desktop/axel-petalinux/software/petalinux-dist/../../../STLport/stl/_alloc.h:267: confused by earlier errors, bailing out make: *** [main.o] Error 1 |
Moderator
|
gcc 3.4 is pretty old and not supported anymore. Cannot you use a newer version?
|
Registered Member
|
Thanks for your comment. I'll try a newer compiler, but I am not sure if I can since I am working on not-latest embedded environment.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]