[Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

Patrick Stinson patrickkidd at gmail.com
Fri Jun 21 19:00:45 CEST 2019


(NOTE: I have started a new thread about this from an old one incorrectly associating this problem with “make -jn”)

I am having a hard time pinning down the source of this error. I am getting it sporadically on Qt-5.12.0 - Qt-5.13.0. using make -jn flags or not using make -jn flags doesn’t seem to have an effect. Any ideas?



/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -include.pch/Qt5Core/c++_x86_64 -pipe -stdlib=libc++ -O3 -fPIC -std=c++1y -fapplication-extension  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.12 -fvisibility=hidden -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -Wall -W -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -I. -I../3rdparty/zlib/src -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd -I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore -I../../include/QtCore/5.13.0 -I../../include/QtCore/5.13.0/QtCore -I.moc -I.tracegen -I../3rdparty/pcre2/src -I/Users/patrick/dev/vendor/sysroot-masos-64/include -I../../mkspecs/macx-clang -o .obj/qatomic.o thread/qatomic.cpp
thread/qatomic.cpp:1624:4: error: "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
#  error "Q_ATOMIC_INT64_IS_SUPPORTED must be defined on a 64-bit platform"
   ^
In file included from thread/qatomic.cpp:1:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/global/qt_pch.h:56:
In file included from ../../include/QtCore/../../src/corelib/global/qglobal.h:1224:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qatomic.h:1:
In file included from thread/qatomic.h:46:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qbasicatomic.h:1:
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: error: static_assert failed due to requirement 'bool(QAtomicOpsSupport<sizeof(long)>::IsSupported)' "template parameter is an integral of a size not supported on this platform"
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:121:49: note: expanded from macro 'Q_STATIC_ASSERT_X'
#  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                ^             ~~~~~~~~~~~~~~~
thread/qatomic.h:55:31: note: in instantiation of template class 'QBasicAtomicInteger<long>' requested here
class QAtomicInteger : public QBasicAtomicInteger<T>
                              ^
thread/qatomic.cpp:1631:17: note: in instantiation of template class 'QAtomicInteger<long>' requested here
Q_STATIC_ASSERT(sizeof(QAtomicInteger<long>));
                ^
In file included from thread/qatomic.cpp:1:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/global/qt_pch.h:56:
In file included from ../../include/QtCore/../../src/corelib/global/qglobal.h:1224:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qatomic.h:1:
In file included from thread/qatomic.h:46:
In file included from /Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/qbasicatomic.h:1:
/Users/patrick/dev/vendor/sysroot-masos-64/build/qt-everywhere-src-5.13.0/qtbase/src/corelib/../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:97:5: error: static_assert failed due to requirement 'bool(QAtomicOpsSupport<sizeof(unsigned long)>::IsSupported)' "template parameter is an integral of a size not supported on this platform"
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/global/qglobal.h:121:49: note: expanded from macro 'Q_STATIC_ASSERT_X'
#  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                ^             ~~~~~~~~~~~~~~~
thread/qatomic.h:55:31: note: in instantiation of template class 'QBasicAtomicInteger<unsigned long>' requested here
class QAtomicInteger : public QBasicAtomicInteger<T>
                              ^
thread/qatomic.cpp:1632:17: note: in instantiation of template class 'QAtomicInteger<unsigned long>' requested here
Q_STATIC_ASSERT(sizeof(QAtomicInteger<unsigned long>));
                ^




More information about the Interest mailing list