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

Eigen with gcc 4.8.1

Tags: None
(comma "," separated)
stangirala
Registered Member
Posts
4
Karma
0

Eigen with gcc 4.8.1

Sat Aug 31, 2013 10:23 pm
I am having trouble using Eigen with a project on gcc 4.8.1. I keep getting these errors where,
"/Eigen/src/SparseLU/SparseLU.h:222:61: error: expected ‘,’ or ‘...’ before numeric constant bool _solve(const MatrixBase<Rhs> &B, MatrixBase<Dest> &_X) const"

I suspect this has something to do with the _X constant that is being used by gcc. Any hints toward solving this problem is much appreciated!
rogerm
Registered Member
Posts
5
Karma
0

Re: Eigen with gcc 4.8.1

Mon Sep 02, 2013 3:48 pm
Just tried a hg pull and update of Eigen. Then compiled (withgcc 4.9 built on Aug 6 from HEAD)
Code: Select all
...
Eigen::SparseLU<Eigen::SparseMatrix<double, Eigen::RowMajor>, Eigen::COLAMDOrdering<int>> solverLU;
// fill A and b;
// Compute the ordering permutation vector from the structural pattern of A
solverLU.analyzePattern(Aev);
// Compute the numerical factorization
solverLU.factorize(Aev);
//Use the factors to solve the linear system
x = solverLU.solve(ev); //        Eigen::MatrixXd ker = Aev.fullPivLu().kernel();

taken with c++11 and ran it. Make g++ lined looked ike:
Code: Select all
g++ -Wl,--allow-multiple-definition -pthread -fopenmp   -c -O3 -w -DEIGEN_NO_DEBUG -DEIGEN_RUNTIME_NO_MALLOC -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD -DHAVE_OPENCL -I../eigen ... -I../eigen/unsupported -I. -std=c++11 -MMD -MP -MF build/Release-NoMKL/GNU-Linux-x86/tests/tests/gpu_tests.o.d -o build/Release-NoMKL/GNU-Linux-x86/tests/tests/gpu_tests.o tests/gpu_tests.cpp

Now different gcc and the Eigen development HEAD version. Maybe it is already fixed
Mauricio
Registered Member
Posts
1
Karma
0

Re: Eigen with gcc 4.8.1

Wed Feb 05, 2014 2:56 pm
There's a name conflict with some constant in GCC in the latest stable version (3.2.0) with SparseLU that gave me that problem in Windows (with eclipse + cygwin) but not in linux.
It was solved in the latest unstable version.
So, either get the latest unstable or use the stable version but change the name of the variable _X in file Eigen/src/SparseLU/SparseLU.h to anything else you want.


Bookmarks



Who is online

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