wiki:WikiStart/Troubleshooting/EigenDontAlign

Version 2 (modified by christian.rauch, 7 years ago) (diff)

The flag EIGEN_DONT_ALIGN also needs to be added to "base-lib.pc.in"

Trouble-Shooting Eigen on 32bit Architectures

Using Eigen on 32bit architectures can produce the following error:

some_deployment: /path/to/rock/install/include/eigen3/Eigen/src/Core/DenseStorage.h:69: 
Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 16>::plain_array() 
[with T = double, int Size = 16, int MatrixOrArrayOptions = 0]: 
Assertion `(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " 
"http://eigen.tuxfamily.org/dox-devel/TopicUnalignedArrayAssert.html" 
" **** READ THIS WEB PAGE !!! ****"' failed.

This can be solved by rebuilding rock with the EIGEN_DONT_ALIGN flag enabled globally. To do this, one has to add "-DEIGEN_DONT_ALIGN=1" to the Cflags in "rock/base/types/base-types.pc.in" and "rock/base/types/base-lib.pc.in".

The Cflags-line in "base-types.pc.in" and "base-lib.pc.in" should look like this:

Cflags: -I${includedir} -DEIGEN_DONT_ALIGN=1