MOTION suddenly stopped compiling for me after a system update with very weird errors such as
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
This was especially confusing, as I confirmed that g++ is called with std=gnu++20. After much head scratching I noticed that g++ is also called with the -ansi flag, which In C++ mode, it is equivalent to -std=c++98. (man g++).
My best guess is, that an update of cmake lead to the std= and -ansi options being emitted in a different order. For me, -ansi is emitted after std=, which seems to override it (godbolt example). If the order is reversed, it works (godbolt example).
This PR removes the -ansi flag as it does nothing at best, and causes the build to fail at worst.
MOTION suddenly stopped compiling for me after a system update with very weird errors such as
This was especially confusing, as I confirmed that
g++
is called withstd=gnu++20
. After much head scratching I noticed thatg++
is also called with the-ansi
flag, whichIn C++ mode, it is equivalent to -std=c++98.
(man g++
).My best guess is, that an update of
cmake
lead to thestd=
and-ansi
options being emitted in a different order. For me,-ansi
is emitted afterstd=
, which seems to override it (godbolt example). If the order is reversed, it works (godbolt example).This PR removes the
-ansi
flag as it does nothing at best, and causes the build to fail at worst.