Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Mapbox Android SDK v5.1.0-beta4 build fail #9239

Closed

Description

@ragaisis

Platform: Android
Mapbox SDK version: 5.1.0-beta4 (sha 294f4f8)

I'm having error while trying to build Mapbox SDK 5.1.0-beta4.

Steps to trigger behavior

  1. Run those commands to build Mapbox Android SDK

make distclean
make clean
make aproj
make apackage

Expected behavior

to have .aar file that could be included into the project

Actual behavior

building fails with this error:

  [38/217] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o
  [39/217] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/style/source.cpp.o
  [40/217] Building CXX object CMakeFiles/mbgl-core.dir/src/mbgl/style/source_impl.cpp.o
  FAILED: /Users/jonas/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/jonas/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/jonas/Library/Android/sdk/ndk-bundle/sysroot  -DMBGL_USE_GLES2=1 -DRAPIDJSON_HAS_STDSTRING=1 -DUCHAR_TYPE=char16_t -D_GLIBCXX_USE_CXX11_ABI=0 -I../../../../../../../include -I../../../../../../../src -I../../../../../../../mason_packages/headers/geometry/0.9.0/include -I../../../../../../../mason_packages/headers/variant/1.1.4/include -I../../../../../../../mason_packages/headers/any/8fef1e9/include -I../../../../../../../mason_packages/headers/unique_resource/cba309e/include -I../../../../../../../mason_packages/headers/rapidjson/1.1.0/include -I../../../../../../../mason_packages/headers/boost/1.62.0/include -I../../../../../../../mason_packages/headers/geojson/0.4.0/include -I../../../../../../../mason_packages/headers/geojsonvt/6.2.0/include -I../../../../../../../mason_packages/headers/supercluster/0.2.0-1/include -I../../../../../../../mason_packages/headers/kdbush/0.1.1-1/include -I../../../../../../../mason_packages/headers/earcut/0.12.1/include -I../../../../../../../mason_packages/headers/protozero/1.4.2/include -I../../../../../../../mason_packages/headers/polylabel/1.0.2/include -I../../../../../../../mason_packages/headers/wagyu/0.4.1/include -I../../../../../../default -I../../../../../../../mason_packages/android-arm-v7-9/sqlite/3.14.2/include -I../../../../../../../mason_packages/android-arm-v7-9/nunicode/1.7.1/include -I../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include -I../../../../../../../mason_packages/android-arm-v7-9/icu/58.1-min-size/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions  -std=c++14 -ftemplate-depth=1024 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Werror -Wno-variadic-macros -Wno-unknown-pragmas -O0 -fno-limit-debug-info    -fPIC -fvisibility-inlines-hidden -fvisibility=hidden -ffunction-sections -fdata-sections -std=gnu++14 -MD -MT CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_bucket.cpp.o -MF CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_bucket.cpp.o.d -o CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_bucket.cpp.o -c /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_bucket.cpp
  In file included from /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_bucket.cpp:9:
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:431:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
      std::sort(queue.begin(), queue.end(), [this](const Node* a, const Node* b) {
                                             ^
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:154:40: note: in instantiation of function template specialization 'mapbox::detail::Earcut<unsigned int>::eliminateHoles<mbgl::GeometryCollection>' requested here
      if (points.size() > 1) outerNode = eliminateHoles(points, outerNode);
                                         ^
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:769:5: note: in instantiation of function template specialization 'mapbox::detail::Earcut<unsigned int>::operator()<mbgl::GeometryCollection>' requested here
      earcut(poly);
      ^
  /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_bucket.cpp:84:49: note: in instantiation of function template specialization 'mapbox::earcut<unsigned int, mbgl::GeometryCollection>' requested here
          std::vector<uint32_t> indices = mapbox::earcut(polygon);
                                                  ^
  1 error generated.
  FAILED: /Users/jonas/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/jonas/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/jonas/Library/Android/sdk/ndk-bundle/sysroot  -DMBGL_USE_GLES2=1 -DRAPIDJSON_HAS_STDSTRING=1 -DUCHAR_TYPE=char16_t -D_GLIBCXX_USE_CXX11_ABI=0 -I../../../../../../../include -I../../../../../../../src -I../../../../../../../mason_packages/headers/geometry/0.9.0/include -I../../../../../../../mason_packages/headers/variant/1.1.4/include -I../../../../../../../mason_packages/headers/any/8fef1e9/include -I../../../../../../../mason_packages/headers/unique_resource/cba309e/include -I../../../../../../../mason_packages/headers/rapidjson/1.1.0/include -I../../../../../../../mason_packages/headers/boost/1.62.0/include -I../../../../../../../mason_packages/headers/geojson/0.4.0/include -I../../../../../../../mason_packages/headers/geojsonvt/6.2.0/include -I../../../../../../../mason_packages/headers/supercluster/0.2.0-1/include -I../../../../../../../mason_packages/headers/kdbush/0.1.1-1/include -I../../../../../../../mason_packages/headers/earcut/0.12.1/include -I../../../../../../../mason_packages/headers/protozero/1.4.2/include -I../../../../../../../mason_packages/headers/polylabel/1.0.2/include -I../../../../../../../mason_packages/headers/wagyu/0.4.1/include -I../../../../../../default -I../../../../../../../mason_packages/android-arm-v7-9/sqlite/3.14.2/include -I../../../../../../../mason_packages/android-arm-v7-9/nunicode/1.7.1/include -I../../../../../../../mason_packages/headers/jni.hpp/3.0.0/include -I../../../../../../../mason_packages/android-arm-v7-9/icu/58.1-min-size/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -isystem /Users/jonas/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions  -std=c++14 -ftemplate-depth=1024 -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Werror -Wno-variadic-macros -Wno-unknown-pragmas -O0 -fno-limit-debug-info    -fPIC -fvisibility-inlines-hidden -fvisibility=hidden -ffunction-sections -fdata-sections -std=gnu++14 -MD -MT CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_extrusion_bucket.cpp.o -MF CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_extrusion_bucket.cpp.o.d -o CMakeFiles/mbgl-core.dir/src/mbgl/renderer/fill_extrusion_bucket.cpp.o -c /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_extrusion_bucket.cpp
  In file included from /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_extrusion_bucket.cpp:10:
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:431:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
      std::sort(queue.begin(), queue.end(), [this](const Node* a, const Node* b) {
                                             ^
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:154:40: note: in instantiation of function template specialization 'mapbox::detail::Earcut<unsigned int>::eliminateHoles<mbgl::GeometryCollection>' requested here
      if (points.size() > 1) outerNode = eliminateHoles(points, outerNode);
                                         ^
  ../../../../../../../mason_packages/headers/earcut/0.12.1/include/mapbox/earcut.hpp:769:5: note: in instantiation of function template specialization 'mapbox::detail::Earcut<unsigned int>::operator()<mbgl::GeometryCollection>' requested here
      earcut(poly);
      ^
  /Users/jonas/Projects/mapbox-gl-native/src/mbgl/renderer/fill_extrusion_bucket.cpp:127:49: note: in instantiation of function template specialization 'mapbox::earcut<unsigned int, mbgl::GeometryCollection>' requested here
          std::vector<uint32_t> indices = mapbox::earcut(polygon);
                                                  ^
  1 error generated.
  ninja: build stopped: subcommand failed.

Activity

  1. tobrun commented on Jun 12, 2017

    @tobrun
    Member

    Which NDK version are you using?

  2. ragaisis commented on Jun 12, 2017

    @ragaisis
    Author

    Oh, forgot to mention that today I've just updated Android Studio to 2.3.3

    NDK version that is currently installed 15.0.4075724

  3. tobrun commented on Jun 12, 2017

    @tobrun
    Member

    We are testing that out the newest NDK in #9081. The underlying issue is resolved with mapbox/earcut.hpp#52, though we still need to roll a new release of this external dependency. For now reverting your NDK version will resolve this. I will patch up the warning from gl-native end so we won't have to wait on that external dependency.

  4. added
    Android
    on Jun 12, 2017
  5. tobrun commented on Jun 12, 2017

    @tobrun
    Member

    PR in #9242 is bumping the dependency that is responsible for the warning. This PR is going to be included in the release branch so the 5.1.0 tag can be rebuild with NDK15 if needed.

  6. ragaisis commented on Jun 12, 2017

    @ragaisis
    Author

    Thanks, manually installing previous NDK version solved the problem. Later, after work hours, I'll try to rebuild with NDK15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions