Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43794

iOS library error: no member named 'fetchAndSubOrdered' in 'QAtomicOps<int>'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.4.0
    • Fix Version/s: 5.5.0 Alpha
    • Component/s: Core: Threads
    • Labels:
      None
    • Environment:
      OSX 10.9.5, QtCreator 3.3.0, Qt 5.4.0
    • Platform/s:
      iOS/tvOS/watchOS

      Description

      Building a C++ library that uses QAtomicInt decrement for iOS fails (note: iOS simulator and OSX desktop kits for the same project are fine). Also note that using the 'app' template in qmake seems ok but not the 'lib' template.

      Steps:
      1. QtCreator -> New Project -> Library -> C++ Library (iOS kit)
      2. Use atomic int decrement

      Qt_ios_static_lib::Qt_ios_static_lib()
      {
          QAtomicInt foo(99);
          --foo;
      }
      

      3. Try to compile

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -fvisibility=hidden -fpascal-strings -fmessage-length=0 -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion -fexceptions -fasm-blocks -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion -fvisibility-inlines-hidden -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors  -arch armv7  -arch arm64 -g -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -std=c++11 -stdlib=libc++ -miphoneos-version-min=5.0 -Wall -W -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_IOS_STATIC_LIB_LIBRARY -DQT_CORE_LIB -I../../Qt/5.4/ios/mkspecs/macx-ios-clang -I../qt_ios_static_lib -I/Users/xxxx/Qt/5.4/ios/mkspecs/macx-ios-clang/ios -I../../Qt/5.4/ios/include -I../../Qt/5.4/ios/include/QtCore -Iiphoneos -I. -o iphoneos/qt_ios_static_lib.o ../qt_ios_static_lib/qt_ios_static_lib.cpp
      
      In file included from ../qt_ios_static_lib/qt_ios_static_lib.cpp:1:
      
      In file included from ../qt_ios_static_lib/qt_ios_static_lib.h:4:
      
      In file included from ../qt_ios_static_lib/qt_ios_static_lib_global.h:4:
      
      In file included from ../../Qt/5.4/ios/include/QtCore/qglobal.h:1087:
      
      In file included from ../../Qt/5.4/ios/include/QtCore/qatomic.h:39:
      
      ../../Qt/5.4/ios/include/QtCore/qbasicatomic.h:176:19: error: no member named 'fetchAndSubOrdered' in 'QAtomicOps<int>'
      
          { return Ops::fetchAndSubOrdered(_q_value, valueToAdd); }
      
                        ^
      
      ../../Qt/5.4/ios/include/QtCore/qbasicatomic.h:210:14: note: in instantiation of member function 'QBasicAtomicInteger<int>::fetchAndSubOrdered' requested here
      
          { return fetchAndSubOrdered(1) - 1; }
      
                   ^
      
      ../qt_ios_static_lib/qt_ios_static_lib.cpp:9:5: note: in instantiation of member function 'QBasicAtomicInteger<int>::operator--' requested here
      
          --foo;
      
          ^
      
      1 error generated.
      
      make[1]: *** [iphoneos/qt_ios_static_lib.o] Error 1
      
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            mattbolger Matt Bolger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes