title: Unable to cross-compile Qt 5.14.2 for Raspberry PI zero w because it “requires a C++11 compiler”
body: <p>This problem has already been encountered for previous versions of Qt5 : <a href="https://stackoverflow.com/q/38232461/12870756">Stack-overflow post </a>(non-answered yet). I'm having the same problem with a more recent version and I have followed several tutorials online :</p>
  <ul>
  <li><a href="https://www.raspberrypi.org/forums/viewtopic.php?t=204529" rel="nofollow noreferrer">https://www.raspberrypi.org/forums/viewtopic.php?t=204529</a></li>
  <li><a href="https://wiki.qt.io/RaspberryPi2EGLFS" rel="nofollow noreferrer">https://wiki.qt.io/RaspberryPi2EGLFS</a></li>
  </ul>
  <p>Even if all these tutorials are outdated, the methodology for cross compiling Qt5 stays the same. My target board is a Raspberry pi zero w running Raspbian Buster. The configuration steps have worked fine (there weren't any errors).</p>
  <p>I'm getting the following errors while executing make :</p>
  <pre><code>~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:61:4: error: #error &quot;Qt requires C++11 support&quot;
   #  error &quot;Qt requires C++11 support&quot;
      ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:94:13: error: ‘QAtomicOps’ does not name a type
       typedef QAtomicOps&lt;T&gt; Ops;
               ^
  In file included from ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/qglobal.h:1:0,
                   from ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/src/corelib/global/qt_pch.h:56:
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:23: error: ‘QAtomicOpsSupport’ was not declared in this scope
       Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, &quot;template parameter is an integral of a size not supported on this platform&quot;);
                         ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
   #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                      ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:51: error: ‘::IsSupported’ has not been declared
       Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, &quot;template parameter is an integral of a size not supported on this platform&quot;);
                                                     ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:68: note: in definition of macro ‘Q_STATIC_ASSERT_X’
   #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                      ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:49: error: non-constant condition for static assertion
   #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                   ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
       Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, &quot;template parameter is an integral of a size not supported on this platform&quot;);
       ^
  ~/Documents/Raspbian/raspi/qt-everywhere-src-5.14.2/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97: confused by earlier errors, bailing out
  make[3]: *** [Makefile:1836: .pch/Qt5Core.gch/c++] Error 1
  make[3]: Leaving directory '~/Documents/Raspbian/raspi/qt5build/qtbase/src/corelib'
  make[2]: *** [Makefile:228: sub-corelib-make_first] Error 2
  make[2]: Leaving directory '~/Documents/Raspbian/raspi/qt5build/qtbase/src'
  make[1]: *** [Makefile:51: sub-src-make_first] Error 2
  make[1]: Leaving directory '~/Documents/Raspbian/raspi/qt5build/qtbase'
  make: *** [Makefile:88: module-qtbase-make_first] Error 2
  </code></pre>