Wiki

Clone wiki

scl-manips-v2 / howdoi / app_32bitdbg

Compiling on 32 bit Linux in debug mode

  • Eigen will throw an error about some fixed size matrix not being aligned. This is out of our control
  • There is a hacky fix, which involves disabling fixed size vector/matrix vectorization.
  • Add this to your CMakeLists.txt
  # Disable vectorization on 32 bit DEBUG mode. Doesn't work yet. Eigen problem
  #NOTE : Checks for 32 vs. 64 bit machine.
  if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
    SET(CMAKE_CXX_FLAGS_DEBUG "<All your existing cmake debug flags>")
  elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" )
    SET(CMAKE_CXX_FLAGS_DEBUG "<All your existing cmake debug flags> -DEIGEN_DONT_ALIGN_STATICALLY")
  endif()

Updated