Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS
Forum Updated to NodeBB v4.3 + New Features

Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.9k Views 2 Watching
  • 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 Offline
    P Offline
    patrickkidd
    wrote on 22 Jun 2019, 18:21 last edited by
    #1

    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://alaskafamilysystems.com/

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Jun 2019, 18:38 last edited by
      #2

      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 22 Jun 2019, 18:48
      0
      • S SGaist
        22 Jun 2019, 18:38

        Hi,

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

        P Offline
        P Offline
        patrickkidd
        wrote on 22 Jun 2019, 18:48 last edited by
        #3

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

        https://alaskafamilysystems.com/

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 25 Jun 2019, 18:51 last edited by
          #4

          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 25 Jun 2019, 21:13
          1
          • S SGaist
            25 Jun 2019, 18:51

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

            P Offline
            P Offline
            patrickkidd
            wrote on 25 Jun 2019, 21:13 last edited by
            #5

            @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://alaskafamilysystems.com/

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 26 Jun 2019, 18:57 last edited by
              #6

              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
              0

              1/6

              22 Jun 2019, 18:21

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved