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

Problem with crosscompiled code on ARM

Tags: None
(comma "," separated)
spacemig
Registered Member
Posts
1
Karma
0
Hello all,
I'm using Eigen3 on a cross compiled program using the arm-linux-gnueabihf-g++ (gcc version 4.8 from Linaro). The target platform is a duovero from gumstix using the Poky distribution - ARMv7. When I run the program with the Eigen code I get really strange values on the Eigen objects (see the output example at the end of this post).

I've tried to turn off vectorization, I've played with all these flags
-marm
-mcpu=cortex-a7
-mfpu=neon
-mfloat-abi=hard

but always get the same behavior. If I compile the same code on the duovero it works ok but not when I cross-compile. I've even cross-compiled from different hosts (windows7 and ubuntu 14.04).

Any idea why this is happening?

This is my simple program

Code: Select all
#include <iostream>
using namespace std;

#include <Eigen/Eigen>
#include <Eigen/Dense>
using namespace Eigen;

int main()
{
    cout << "Hello World!" << endl;
    int j =0;
    cout << j << endl << endl; // ok

    Vector3d test1;
    test1 << 1.0, 2.0, 3.0;
    cout << test1 << endl << endl; // not ok

    Vector3d test2(1,2,3);
    cout << test2 << endl; // not ok
    cout << test2(1) << endl; // not ok

    return 0;
}



This is the output I get
Code: Select all
Hello World!
0

-4.52364e-07
-4.52366e-07
-4.52368e-07

-4.52359e-07
-4.52361e-07
-4.52363e-07
3.8852e+68


Bookmarks



Who is online

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