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

iOS builds should not use C++17

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.9
    • 5.9.8
    • Build System
    • None
    • macOS 10.14
      Xcode 10.2.1
    • iOS/tvOS/watchOS
    • 88b1dd29c885aa35255b9ec1c824c5e5d7ba3789 (qt/qtbase/5.9)

    Description

      I tried compiling Qt 5.9.8 for iOS as explained here: https://doc.qt.io/qt-5.9/building-from-source-ios.html

      Here is my configuration command:

      ./configure -opensource -confirm-license -release -nomake tests -nomake examples -skip qtsvg -skip qtactiveqt -skip qtscript -skip qttools -skip qtxmlpatterns -skip qttranslations -skip qtdoc -skip qtlocation -skip qtsensors -skip qtconnectivity -skip qtwayland -skip qt3d -skip qtimageformats -skip qtserialbus -skip qtserialport -skip qtx11extras -skip qtmacextras -skip qtwinextras -skip qtandroidextras -skip qtwebsockets -skip qtwebchannel -skip qtwebengine -skip qtcanvas3d -skip qtwebview -skip qtpurchasing -skip qtcharts -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtgamepad -skip qtscxml -skip qtspeech -skip qtnetworkauth -skip qtremoteobjects -prefix /Users/martin/dev/lib/build/qt/5.9.8/ios -xplatform macx-ios-clang
      

      Unfortunately, I have the following error:

      /Users/martin/Downloads/build/qt-everywhere-opensource-src-5.9.8/qtdeclarative/src/quick/items/qquickgenericshadereffect.cpp
      /Users/martin/Downloads/build/qt-everywhere-opensource-src-5.9.8/qtdeclarative/src/quick/items/qquickshadereffect.cpp:511:20: error: aligned allocation function of type
            'void *(std::size_t, std::align_val_t)' is only available on iOS 11 or newer [-Waligned-allocation-unavailable]
              m_glImpl = new QQuickOpenGLShaderEffect(this, this);
                         ^
      /Users/martin/Downloads/build/qt-everywhere-opensource-src-5.9.8/qtdeclarative/src/quick/items/qquickshadereffect.cpp:511:20: note: if you supply your own aligned allocation functions, use
            -Wno-aligned-allocation-unavailable to silence this diagnostic
      1 error generated.
      make[3]: *** [.obj/qquickshadereffect.o] Error 1
      make[3]: *** Waiting for unfinished jobs....
      make[2]: *** [sub-quick-make_first-ordered] Error 2
      make[1]: *** [sub-src-make_first] Error 2
      make: *** [module-qtdeclarative-make_first] Error 2
      

      It looks like that C++ 17 was automatically detected and used.

      I managed to fix it by adding the following parameter:

      -c++std c++14

      Shouldn't iOS build automatically disable C++ 17?

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            martindelille Martin Delille
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes