From 5b47854077d7e503827dbbecdf49f763e4d0c5fb Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Wed, 1 Jun 2022 09:16:26 +0100 Subject: IVGCVSW-6983 Fix for failing Android P build * Removed ability to use AOSP version of flatbuffers * The version of Flatbuffers shipped with Android P is V1.8.0 but ACL and ArmNN need V1.12.0 or later. Signed-off-by: Mike Kelly Change-Id: I791855ba474c02c119c3353c5195a3ba6d48c3b5 --- setup.sh | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/setup.sh b/setup.sh index 1dc9d8c2..b4d23eda 100755 --- a/setup.sh +++ b/setup.sh @@ -35,33 +35,19 @@ function BuildFlatbuffers { } if [ ! -d flatbuffers ]; then - # Check if the AOSP has a flatbuffers we can use - if [ -d ../../../external/flatbuffers/ ]; then - echo "+++ Using AOSP Flatbufers" - FLATBUFFERS_DIR=$PWD - # Have to make a copy of the AOSP flatbuffers and delete a few files to avoid issues with the android build - cp -r ../../../external/flatbuffers/ flatbuffers - # Remove Android build files to avoid build issues - rm flatbuffers/Android.* + echo "++ Downloading FlatBuffers v1.12.0" - BuildFlatbuffers + FLATBUFFERS_PKG=v1.12.0.tar.gz - # If not then download flatbuffers - else - echo "++ Downloading FlatBuffers v1.12.0" + curl -LOk https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz + AssertZeroExitCode "Downloading FlatBuffers failed" + mkdir -p flatbuffers + tar xzf $FLATBUFFERS_PKG -C flatbuffers --strip-components 1 + AssertZeroExitCode "Unpacking FlatBuffers failed" - FLATBUFFERS_PKG=v1.12.0.tar.gz + BuildFlatbuffers - curl -LOk https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz - AssertZeroExitCode "Downloading FlatBuffers failed" - mkdir -p flatbuffers - tar xzf $FLATBUFFERS_PKG -C flatbuffers --strip-components 1 - AssertZeroExitCode "Unpacking FlatBuffers failed" - - BuildFlatbuffers - - rm -rf $FLATBUFFERS_PKG - fi + rm -rf $FLATBUFFERS_PKG fi if [ ! -d armnn ]; then -- cgit v1.2.1