Registered Member
|
Hello ,
I'm trying to compile Eigen3 library on Zynq. I first test library on my computer ( Ubuntu x64 ) which works fine. But when i want to compile it for Zynq, it gives me the following errors :
Also the following Infos are shown :
And if i use Eigen2 which doesn't contain NEON codes, it works fine without problem. What should i do ? |
Moderator
|
You can disable explicit vectorization with -DEIGEN_DONT_VECTORIZE. You might also try to update your toolchain to a more recent gcc version as the root of the problem seems to come from the fact that int32_t is defined as a long int, which is wrong on 64 bits systems.
|
Registered Member
|
Thanks for quick response.
My gcc versions are : The C compiler identification is GNU 4.9.2 -- The CXX compiler identification is GNU 4.9.2 -- The ASM compiler identification is GNU Does these versions OK ? And i have another question too, I try to compile it in baremetal which means i don't have any Operating system. Does Eigen library is standalone or it needs some functions from OS ( Linux ) ? |
Moderator
|
gcc 4.9 is fine for a normal usage, but the error you get rather strange and seems to be unrelated to Eigen at first. Eigen's need malloc/free/realloc from the libC for dynamic allocation. If you use fixed sizes only, you can provide empty versions of them to prevent linking errors.
|
Registered Member
|
Thanks for reply
We have malloc/calloc/free in baremetal. So it's no problem I don't know if it's related to Eigen or not but the problem is that for example in line 244 of PacketMath.h there is a following code :
Pay attention to const int*. but in arm_neon.h for vld1q_s32 we have :
So it needs const int32_t* as argument not const int*. Similar problem goes with "vst1q_s32(int32_t*, int32x4_t)" and "vld1_dup_s32(const int32_t*)". I double check arm_neon.h with the latest one and "vld1q_s32" needs const int32_t*. Isn't that Eigen library problem ? |
Moderator
|
ok, now I get your compiler messages. On your system sizeof(int)==2 and thus int32_t has to be a typedef to "long int"... I did not expected to find systems with NEON and 16 bytes int. Sadly, int32_t is C++11 only but that should be manageable.
|
Registered Member
|
|
Moderator
|
Try the devel branch: https://bitbucket.org/eigen/eigen/commits/96e0f73a35de/ If that works for you I'll backport it to 3.3.
|
Registered Member
|
Errors are gone & Example code builds successfully !
Thanks |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]