ctu-mrs / mrs_uav_system

The entry point to the MRS UAV system.

Home Page:https://ctu-mrs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

📚 Backward incompatibility: we are no longer bulding with -march=native, please README

klaxalk opened this issue · comments

This is an important notice for everyone using our system. Up until now, we have had our build profiles in catkin workspaces set up with additional flags for compiling with -march=native. We used this for years, so most of you probably have this set automatically. The original motivation was to speed up our software since this flag allows the compiler to optimize the code for each particular architecture of the CPU.

Recently, we conducted a series of rigorous tests that show, that overall, the runtime benefits of this are negligible at best and negative on average. Moreover, using this flag significantly complicates dynamic linking with libraries up to a point, where using nodelets can lead to incompatibility with other pre-installed software. And those incompatibilities show up non-deterministically, are difficult to debug, and impractical to solve.

Therefore, we decided to drop the flag from all our workspaces, such that runtime compatibility with all pre-installed software is maintained. What does it mean for you?

  • Re-running our automated scripts and installers can cause compilation issues on pre-existing installations. The install scripts will update the flags within the mrs_workspace, which will then refuse to compile. Complete cleanup of the workspace is needed.
  • Users of PCL and PCL-related software, beware. We used to compile our own PCL with -march=native. Some of our software still checks for the environment variable PCL_CROSS_COMPILATION. Set this variable to false, or remove it completely from your shell's RC file.
  • Our catkin init alias will no longer set build profiles with --march=native. Therefore, any newly-created workspace might be incompatible with your old workspaces, unless you update and clean your workspaces.
  • We strongly recommend following our How to manage Catkin workspaces guide. Please, use it to verify the state, configuration, and mutual dependencies of your workspaces. We recommend cleaning and recompiling everything without -march=native to prevent future compatibility issues.