Search code examples
c++gcceigenzynq

Using Eigen C++ library on ARM Zynq ( baremetal )


After failing to cross compile GNU Scientific library for Zynq baremetal ( Cross compile GNU Scientific Library for ARM Zynq ( baremetal ) ), I tried to use Eigen C++ instead.

So i download it then unzip it and include it's header like below

-I/home/wizard/Desktop/eigen

The code works fine on my PC ( which is x64 Ubuntu ) But as soon as i change the compiler from gcc to arm-xilinx-eabi-gcc & g++ to arm-xilinx-eabi-g++ the code gives me the following errors :

invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 244, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 247, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 259, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'const int*' to 'const int32_t* {aka const long int*}' [-fpermissive]   test4       line 260, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 265, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 268, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem
invalid conversion from 'int*' to 'int32_t* {aka long int*}' [-fpermissive] test4       line 309, external location: /home/wizard/Desktop/eigen/Eigen/src/Core/arch/NEON/PacketMath.h   C/C++ Problem

What should I do ?


Solution

  • Finally able to solve the problem. Refer to https://forum.kde.org/viewtopic.php?f=74&t=138964 "Compiling Eigen3 on Zynq baremetal" for solution.