<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64]]></title><description><![CDATA[<p dir="auto">I'm cross compiling Qt for Debian aarch64.</p>
<p dir="auto">I installed the compilers using <code>sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu</code></p>
<p dir="auto">aarch64-linux-gnu-g++ version is <code>9.3.0</code></p>
<p dir="auto">when I run make I encounter this error:</p>
<pre><code>/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: template parameter is an integral of a size not supported on this platform
  121 | #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
      |                                                               ^~~~~~~~~~~~~~~
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
   97 |     Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, "template parameter is an integral of a size not supported on this platform");
      |     ^~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:23936: .obj/qatomic.o] Error 1
</code></pre>
<p dir="auto">I've tried <code>-std=c++2a</code> but the error persists.</p>
<p dir="auto">this is my qmake.conf file:</p>
<pre><code>include(../common/linux_device_pre.conf)

QMAKE_LIBS_EGL         += -lEGL
QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL

QMAKE_CFLAGS            = -march=armv8-a -mtune=cortex-a72
QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS

DISTRO_OPTS            += aarch64 deb-aarch64

EGLFS_DEVICE_INTEGRATION = eglfs_kms

include(../common/linux_device_post.conf)

load(qt_config)
</code></pre>
<p dir="auto">complete error log:</p>
<pre><code>/home/ali/Qt/5.15.2/Src/qtbase/src/corelib/thread/qatomic.cpp:1747:4: error: #error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
 1747 | #  error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
      |    ^~~~~
In file included from /home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/qglobal.h:1,
                 from /home/ali/Qt/5.15.2/Src/qtbase/src/corelib/global/qt_pch.h:56:
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h: In instantiation of ‘class QBasicAtomicInteger&lt;long int&gt;’:
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qatomic.h:59:7:   required from ‘class QAtomicInteger&lt;long int&gt;’
/home/ali/Qt/5.15.2/Src/qtbase/src/corelib/thread/qatomic.cpp:1754:1:   required from here
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: template parameter is an integral of a size not supported on this platform
  121 |   define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
      |                                                              ^~~~~~~~~~~~~~~

/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
   97 |     Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, "template parameter is an integral of a size not supported on this platform");
      |     ^~~~~~~~~~~~~~~~~
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h: In instantiation of ‘class QBasicAtomicInteger&lt;long unsigned int&gt;’:
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qatomic.h:59:7:   required from ‘class QAtomicInteger&lt;long unsigned int&gt;’
/home/ali/Qt/5.15.2/Src/qtbase/src/corelib/thread/qatomic.cpp:1755:1:   required from here
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: template parameter is an integral of a size not supported on this platform
  121 |   define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
      |                                                              ^~~~~~~~~~~~~~~

/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
   97 |     Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, "template parameter is an integral of a size not supported on this platform");
      |     ^~~~~~~~~~~~~~~~~
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h: In instantiation of ‘class QBasicAtomicInteger&lt;long long unsigned int&gt;’:
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qatomic.h:59:7:   required from ‘class QAtomicInteger&lt;long long unsigned int&gt;’
/home/ali/Qt/5.15.2/Src/qtbase/src/corelib/thread/qatomic.cpp:1756:1:   required from here
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: template parameter is an integral of a size not supported on this platform
  121 |   define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
      |                                                              ^~~~~~~~~~~~~~~

/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
   97 |     Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, "template parameter is an integral of a size not supported on this platform");
      |     ^~~~~~~~~~~~~~~~~
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h: In instantiation of ‘class QBasicAtomicInteger&lt;long long int&gt;’:
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qatomic.h:59:7:   required from ‘class QAtomicInteger&lt;long long int&gt;’
/home/ali/Qt/5.15.2/Src/qtbase/src/corelib/thread/qatomic.cpp:1757:1:   required from here
/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:121:63: error: static assertion failed: template parameter is an integral of a size not supported on this platform
  121 |   define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
      |                                                              ^~~~~~~~~~~~~~~

/home/ali/Qt/5.15.2/Src/qtbase/include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
   97 |     Q_STATIC_ASSERT_X(QAtomicOpsSupport&lt;sizeof(T)&gt;::IsSupported, "template parameter is an integral of a size not supported on this platform");
      |     ^~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:23936: .obj/qatomic.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase/src/corelib'
make[2]: *** [Makefile:198: sub-corelib-make_first] Error 2
make[2]: *** Waiting for unfinished jobs....
g++ -Wl,-O1 -Wl,--gc-sections -o ../../../bin/qdbuscpp2xml .obj/moc.o .obj/preprocessor.o .obj/generator.o .obj/parser.o .obj/token.o .obj/collectjson.o .obj/qdbuscpp2xml.o   /home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase/lib/libQt5BootstrapDBus.a /home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase/lib/libQt5Bootstrap.a -lpthread   
make[3]: Leaving directory '/home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase/src/tools/qdbuscpp2xml'
make[2]: Leaving directory '/home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase/src'
make[1]: *** [Makefile:51: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/ali/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/build/qtbase'
make: *** [Makefile:86: module-qtbase-make_first] Error 2
</code></pre>
]]></description><link>https://forum.qt.io/topic/131007/template-parameter-is-an-integral-of-a-size-not-supported-on-this-platform-q_static_assert_x-aarch64</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Apr 2026 01:39:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131007.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Oct 2021 06:00:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64 on Wed, 13 Oct 2021 05:53:45 GMT]]></title><description><![CDATA[<p dir="auto">because that's not for aarch64 target</p>
]]></description><link>https://forum.qt.io/post/684803</link><guid isPermaLink="true">https://forum.qt.io/post/684803</guid><dc:creator><![CDATA[Ali 0]]></dc:creator><pubDate>Wed, 13 Oct 2021 05:53:45 GMT</pubDate></item><item><title><![CDATA[Reply to template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64 on Tue, 12 Oct 2021 20:40:24 GMT]]></title><description><![CDATA[<p dir="auto">Why not use the <a href="https://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-rasp-pi4-v3d-g++?h=5.15.2" target="_blank" rel="noopener noreferrer nofollow ugc">linux-rasp-pi4-v3d</a> mkspec ?</p>
]]></description><link>https://forum.qt.io/post/684756</link><guid isPermaLink="true">https://forum.qt.io/post/684756</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 12 Oct 2021 20:40:24 GMT</pubDate></item><item><title><![CDATA[Reply to template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64 on Tue, 12 Oct 2021 08:04:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a><br />
Hi Thank you!</p>
<pre><code>~/Qt/5.15.2/Src/configure -release -opengl es2 -eglfs \
-device rpi4-64 -device-option CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- \
-sysroot ~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot \
-prefix /usr/local/qt5.15.2 -extprefix ~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/qt5.15.2 \
-opensource -confirm-license -skip qtscript -skip qtwayland -skip qtwebengine -nomake tests -make libs -pkg-config -no-use-gold-linker -v -recheck \
-L~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/lib/aarch64-linux-gnu \
-I~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/aarch64-linux-gnu
</code></pre>
]]></description><link>https://forum.qt.io/post/684623</link><guid isPermaLink="true">https://forum.qt.io/post/684623</guid><dc:creator><![CDATA[Ali 0]]></dc:creator><pubDate>Tue, 12 Oct 2021 08:04:42 GMT</pubDate></item><item><title><![CDATA[Reply to template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64 on Mon, 11 Oct 2021 19:44:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Can you share the configure command you use ?</p>
]]></description><link>https://forum.qt.io/post/684542</link><guid isPermaLink="true">https://forum.qt.io/post/684542</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 11 Oct 2021 19:44:12 GMT</pubDate></item><item><title><![CDATA[Reply to template parameter is an integral of a size not supported on this platform | Q_STATIC_ASSERT_X | aarch64 on Mon, 11 Oct 2021 06:48:00 GMT]]></title><description><![CDATA[<p dir="auto">this is the first line of the error log:</p>
<p dir="auto"><code>#error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"</code></p>
<p dir="auto">there must be a config to tell the Qt that its aarch64, right?</p>
]]></description><link>https://forum.qt.io/post/684425</link><guid isPermaLink="true">https://forum.qt.io/post/684425</guid><dc:creator><![CDATA[Ali 0]]></dc:creator><pubDate>Mon, 11 Oct 2021 06:48:00 GMT</pubDate></item></channel></rss>