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

Compiling problems with GCC 4.5.1 on Sun OS 5.10

Tags: None
(comma "," separated)
sh584
Registered Member
Posts
2
Karma
0
Hello

I am trying to use Eigen 3.0.0 and I am having issues using it on Sun OS 5.10 using sparc. The Sun compiler just throws tons of errors due to its issues with templates so I am trying to compile using both gcc4.5.1 and gcc4.1. They both give the following errors twice using a program that compiled and ran perfectly with the same compilers in a linux environment.

error: invalid character (0x0a)
error: statement syntax

Both errors occur on the same line of a tmp linker file.

By the way the program is basically just running the example Cholesky llt solve routine:
Code: Select all
typedef Matrix<float,Dynamic,2> DataMatrix;
// let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise)
DataMatrix samples = DataMatrix::Random(12,2);
VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1;
// and let's solve samples * [x y]^T = elevations in least square sense:
Matrix<float,2,1> xy
 = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations));
cout << xy << endl;


Any guidance on how to make this compile properly would be greatly appreciated.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
the Sun compiler is indeed not working with Eigen, but gcc should work fine. Can you paste the complete errors obtained with GCC.
sh584
Registered Member
Posts
2
Karma
0
/usr/bin/as: "/var/tmp//cc0itqQP.s", line 62598: error: invalid character (0x0a)
/usr/bin/as: "/var/tmp//cc0itqQP.s", line 62598: error: statement syntax
/usr/bin/as: "/var/tmp//cc0itqQP.s.s", line 62964: error: invalid character (0x0a)
/usr/bin/as: "/var/tmp//cc0itqQP.s", line 62964: error: statement syntax

cc0itqQP.s changes ever time but the line number is consistent for each compiler. Those line numbers are for gcc4.1 and gcc4.5.1 has line numbers 40753 and 41121


It looks like it is actually an issue with the Sun assembler
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
hm maybe this is something very stupid. Could you edit the file Eigen/src/Core/util/Macros.h, search for EIGEN_ASM_COMMENT and comment the lines such that you only have:

#define EIGEN_ASM_COMMENT(X)


Bookmarks



Who is online

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