mapbox/mapbox-gl-native

Fix build under MacOS Ventura SDK 13.3

thefat32 opened this issue · 0 comments

Platform: MacOS Ventura 13.3.1(a)
Mapbox SDK version: qt-staging (Qt 5.15.9)

Steps to trigger behavior

  1. Build Qt using make

Expected behavior

There is no expected behaviour as Qt5 build against MacOS 13 is not tested

Actual behavior

Build Errors:

include/mbgl/util/unique_any.hpp:51:31: error: no member named 'move' in namespace 'std'
            vtable->move(std::move(rhs.storage), storage);
                         ~~~~~^
include/mbgl/util/unique_any.hpp:69:25: error: no member named 'move' in namespace 'std'
        unique_any(std::move(rhs)).swap(*this);
                   ~~~~~^
include/mbgl/util/unique_any.hpp:91:33: error: no type named 'move' in namespace 'std'
            unique_any tmp(std::move(rhs));
                           ~~~~~^
include/mbgl/util/unique_any.hpp:94:39: error: no member named 'move' in namespace 'std'
                rhs.vtable->move(std::move(storage), rhs.storage);
                                 ~~~~~^
include/mbgl/util/unique_any.hpp:98:35: error: no member named 'move' in namespace 'std'
                vtable->move(std::move(tmp.storage), storage);
                             ~~~~~^
include/mbgl/util/unique_any.hpp:154:41: error: no member named 'move' in namespace 'std'; did you mean simply 'move'?
            new (&dest.stack) ValueType(std::move(reinterpret_cast<ValueType&>(src.stack)));
                                        ^~~~~~~~~
                                        move
include/mbgl/util/unique_any.hpp:153:14: note: 'move' declared here
        void move(Storage&& src, Storage& dest) override {
             ^
include/mbgl/util/unique_any.hpp:257:49: error: no member named 'move' in namespace 'std'
    auto retValue = static_cast<ValueType>(std::move(*temp));
                                           ~~~~~^
include/mbgl/util/unique_any.hpp:259:17: error: no member named 'move' in namespace 'std'
    return std::move(retValue);
           ~~~~~^
8 errors generated.

Command executed by make:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -DNDEBUG -DQT_IMAGE_DECODERS -DQT_BUILD_MAPBOXGL_LIB -DRAPIDJSON_HAS_STDSTRING=1 -DMBGL_USE_GLES2 -D__QT__ -O3 -ftemplate-depth=1024 -fvisibility-inlines-hidden -fvisibility=hidden -DMBGL_VERSION_REV=\"qt-v1.5.0\" -O2 -fPIC -std=c++1y  -arch x86_64  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacosx-version-min=10.13 -w -fvisibility=hidden -fvisibility-inlines-hidden -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_COMPILER_SUPPORTS_SSE2 -DQT_COMPILER_SUPPORTS_NEON -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DGL_SILENCE_DEPRECATION -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I. -Ideps/boost/1.65.1 -Ideps/boost/1.65.1/include -Ideps/earcut/0.12.4 -Ideps/earcut/0.12.4/include -Ideps/geojson/0.4.2 -Ideps/geojson/0.4.2/include -Ideps/geojsonvt/6.5.1 -Ideps/geojsonvt/6.5.1/include -Ideps/geometry/0.9.3 -Ideps/geometry/0.9.3/include -Ideps/kdbush/0.1.1-1 -Ideps/kdbush/0.1.1-1/include -Ideps/optional/f27e7908 -Ideps/optional/f27e7908/include -Ideps/polylabel/1.0.3 -Ideps/polylabel/1.0.3/include -Ideps/protozero/1.5.2 -Ideps/protozero/1.5.2/include -Ideps/rapidjson/1.1.0 -Ideps/rapidjson/1.1.0/include -Ideps/shelf-pack/2.1.1 -Ideps/shelf-pack/2.1.1/include -Ideps/supercluster/0.2.2 -Ideps/supercluster/0.2.2/include -Ideps/tao_tuple/28626e99 -Ideps/tao_tuple/28626e99/include -Ideps/unique_resource/cba309e -Ideps/unique_resource/cba309e/include -Ideps/variant/1.1.4 -Ideps/variant/1.1.4/include -Ideps/vector-tile/1.0.2 -Ideps/vector-tile/1.0.2/include -Ideps/wagyu/0.4.3 -Ideps/wagyu/0.4.3/include -Iinclude -Iplatform/default -Iplatform/qt -Iplatform/qt/include -Isrc -Ivendor/nunicode/include -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtNetwork/5.15.9 -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtNetwork/5.15.9/QtNetwork -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtGui/5.15.9 -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtGui/5.15.9/QtGui -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtSql/5.15.9 -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtSql/5.15.9/QtSql -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtCore/5.15.9 -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtCore/5.15.9/QtCore -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtNetwork -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtGui -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtSql -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/include/QtCore -I.moc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/mkspecs/macx-clang -F/Users/lucas/Projects/github/qt-everywhere-src-5.15.9/qtbase/lib -o .obj/src/mbgl/renderer/layers/render_background_layer.o src/mbgl/renderer/layers/render_background_layer.cpp

Possible solution:

Adding #include <utility> to include/mbgl/util/unique_any.hpp solved the problem and I was able to build Qt 5.15.9 against MacOS Ventura but I don't know the repercussion of adding this for this or any other platforms.