ethz-asl / maplab_dependencies

A repository holding submodules of maplab dependencies
https://github.com/ethz-asl/maplab
Apache License 2.0
20 stars 37 forks source link

Update to Eigen 3.3 (if system Eigen is new enough) #121

Closed eggerk closed 7 years ago

eggerk commented 7 years ago

This should hopefully work with everything and make Eigen 3.3 available on 16.04.

Depends on:

Swe, lc and ba is still working, will do a multiarch build of maplab after this is merged.

What were the issues?

1. gtsam using its own Eigen version

This was easily fixed by setting gtsam to use system-Eigen.

2. PCL being compiled with -march=native

This was more tricky to find. It only affected loop closure, which segfaulted during descriptor projection while trying to execute _mm256_store_ps. This, however, is an AVX vectorization instruction (which we don't have enabled) and which expects the matrices to be 32-byte-aligned (which they weren't). Forcing Eigen to use 32 bytes as alignment for the matrices solved the issue, as did enabling AVX instructions (but this just moved the segfault elsewhere as other libraries were still not compiled with AVX instructions). Both of these solutions are more hacks than anything proper, so compiling PCL with the right flags is the way to go.