Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

    General and Desktop
    2
    6
    1131
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      patrickkidd last edited by

      I and one other from the qt-interest email list have seen the following compile errors when building a fresh qt source tarball on the latest macOS. Qt-version doesn't seem to matter.

      What is strange is that clearing config.cache and then reconfiguring (using ./config.status) and building seems to succeed reliably. Does anyone have any idea what could be causing this? I am using a couple of build scripts to build qt and it would be nice if it didn't fail.

      The only thing I noticed in my config.log is that it reported that it could not find libatomic the first time around and that it could find lib atomic the second time around. This is very strange. Seems like a bug in the qt build system since nothing changed on my system between configure runs.

      /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>));
                     ^
      

      https://vedanamedia.com/

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        What do you mean by latest macOS ?
        What version of Xcode are you using ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        P 1 Reply Last reply Reply Quote 0
        • P
          patrickkidd @SGaist last edited by

          @SGaist Latest stable macOS (10.14.5) and Xcode (10.2.1).

          https://vedanamedia.com/

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Do you have any rogue .qmake.conf file lying in or around your build folder ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply Reply Quote 1
            • P
              patrickkidd @SGaist last edited by

              @SGaist said in Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS:

              Do you have any rogue .qmake.conf file lying in or around your build folder ?

              Shoot, you know I had a .qmake.stash file three folders up. I deleted that and now it totally works. I very vaguely remember something about this. Do you know how these files work???

              https://vedanamedia.com/

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                And it was the .stash file that I was thinking about.

                AFAIK, they keep track of some configuration like the macOS SDK configured for building Qt however I haven't search precisely how and when that file is generated.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post