This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Android builds failing on Bitrise on release-ios-v3.5.0-android-v5.0.0 branch #8528
Copy link
Copy link
Closed
Labels
Description
Android builds on Bitrise on the release-ios-v3.5.0-android-v5.0.0 branch started failing over the weekend with an error that seems to be related to the generated code for runtime styling:
FAILED: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/opt/android-ndk/platforms/android-9/arch-arm -DMBGL_USE_GLES2=1 -DRAPIDJSON_HAS_STDSTRING=1 -DUCHAR_TYPE=char16_t -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/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../../../platform/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/android-arm-v7-9/libzip/1.1.3/include -I../../../mason_packages/android-arm-v7-9/libzip/1.1.3/lib/libzip/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 /opt/android-ndk/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk/sources/android/support/include -isystem /opt/android-ndk/sources/cxx-stl/llvm-libc++abi/include -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 -Werror -Wno-variadic-macros -Wno-unknown-pragmas -O0 -fno-limit-debug-info -DCI_BUILD=1 -fPIC -fvisibility-inlines-hidden -fvisibility=hidden -ffunction-sections -fdata-sections -std=gnu++14 -MD -MT CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o -MF CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o.d -o CMakeFiles/mbgl-core.dir/src/mbgl/style/parser.cpp.o -c /bitrise/src/src/mbgl/style/parser.cpp
In file included from /bitrise/src/src/mbgl/style/parser.cpp:6:
In file included from ../../../include/mbgl/style/conversion/layer.hpp:11:
In file included from ../../../include/mbgl/style/conversion/constant.hpp:6:
../../../include/mbgl/util/enum.hpp:22:32: error: instantiation of variable 'mbgl::Enum<mbgl::style::TranslateAnchorType>::begin' required here, but no definition is available [-Werror,-Wundefined-var-template]
auto it = std::find_if(begin, end, [&] (const auto& v) { return s == v.second; });
^
../../../include/mbgl/style/conversion/constant.hpp:61:38: note: in instantiation of member function 'mbgl::Enum<mbgl::style::TranslateAnchorType>::toEnum' requested here
const auto result = Enum<T>::toEnum(*string);
^
../../../include/mbgl/style/conversion.hpp:90:12: note: in instantiation of function template specialization 'mbgl::style::conversion::Converter<mbgl::style::TranslateAnchorType, void>::operator()<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
return Converter<T>()(value, std::forward<Args>(args)...);
^
../../../include/mbgl/style/conversion/property_value.hpp:25:34: note: in instantiation of function template specialization 'mbgl::style::conversion::convert<mbgl::style::TranslateAnchorType, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>>' requested here
Result<T> constant = convert<T>(value);
^
../../../include/mbgl/style/conversion.hpp:90:12: note: in instantiation of function template specialization 'mbgl::style::conversion::Converter<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, void>::operator()<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
return Converter<T>()(value, std::forward<Args>(args)...);
^
../../../include/mbgl/style/conversion/property_setter.hpp:45:40: note: in instantiation of function template specialization 'mbgl::style::conversion::convert<mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>>' requested here
Result<PropertyValue> typedValue = convert<PropertyValue>(value);
^
../../../include/mbgl/style/conversion/make_property_setters.hpp:89:40: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperty<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator>, mbgl::style::FillLayer, mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType>, &mbgl::style::FillLayer::setFillTranslateAnchor>' requested here
result["fill-translate-anchor"] = &setPaintProperty<V, FillLayer, PropertyValue<TranslateAnchorType>, &FillLayer::setFillTranslateAnchor>;
^
../../../include/mbgl/style/conversion/layer.hpp:52:20: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperty<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
return setPaintProperty(layer, k, v, klass);
^
/bitrise/src/src/mbgl/style/parser.cpp:223:21: note: in instantiation of function template specialization 'mbgl::style::conversion::setPaintProperties<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::CrtAllocator> >' requested here
conversion::setPaintProperties(*layer, value);
^
../../../include/mbgl/util/enum.hpp:27:25: note: forward declaration of template entity is here
static const Value* begin;
^
../../../include/mbgl/util/enum.hpp:22:32: note: add an explicit instantiation declaration to suppress this warning if 'mbgl::Enum<mbgl::style::TranslateAnchorType>::begin' is explicitly instantiated in another translation unit
auto it = std::find_if(begin, end, [&] (const auto& v) { return s == v.second; });
^
1 error generated.
ninja: build stopped: subcommand failed.
Makefile:588: recipe for target 'android-lib-arm-v7' failed
make: *** [android-lib-arm-v7] Error 1
Example failing builds:
- https://www.bitrise.io/build/925e9055808e302c
- https://www.bitrise.io/build/a782e6f7d69e65fc
This issue doesn’t reproduce on any other platform.
/cc @mapbox/android @jfirebaugh
Activity
1ec5 commentedon Mar 26, 2017
This issue is blocking iOS SDK v3.5.1 and and macOS SDK v0.4.0.
/cc @boundsj
jfirebaugh commentedon Mar 27, 2017
Previously #7702, fixed in the
masterbranch with 42ad77a. We could easily cherry pick that commit. But I'm curious why this started cropping up on the release branch. Did we switch compilers?jfirebaugh commentedon Mar 27, 2017
Found it: bitrise-io/android-ndk@3865c07. This was a change to Bitrise's
android-ndkDocker image, not mentioned in the CHANGELOG, that would have gone out this past weekend.To minimize the chances of this type of issue recurring, we should not set the build image to
:latestand instead use a pinned version.There's an additional problem, which is that the Bitrise build image is an app-wide setting rather than per-branch. There's no way to ensure that historical branches remain buildable; any image changes that require corresponding code changes must be applied simultaneously on all active branches in order to avoid breakage. This is an issue that we have repeatedly raised with Bitrise.