Tflite benchmark app build issues
Hi @mescoulan-gpsw Thanks for reporting the issue.

I was able to successfully build the benchmark model with r2.12 version on MacOS with Bazel 5.3.0 as per the instructions given [here](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/benchmark#on-android). Please find the screenshot below.

<img width="564" alt="Screenshot 2023-04-03 at 11 20 26 PM" src="https://user-images.githubusercontent.com/118897289/229589801-6d19df8a-7147-4ce2-815a-49bda86f5d45.png">


The `configure` options are given for your reference.


<img width="593" alt="Screenshot 2023-04-03 at 11 21 22 PM" src="https://user-images.githubusercontent.com/118897289/229589829-e21515dd-2361-4289-aa46-fb306d83ba99.png">


Can you try you using r2.12 and using [this](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/benchmark#on-android) and let us know if the issue still exists?

Thanks.
 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60188">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60188">No</a>
 Hello @pjpratik , sorry for late reply.
By using r2.12, bazel 5.3.0 and the exact same configure options as you I was able to build successfully. Thank you !
<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.8

### Custom Code

Yes

### OS Platform and Distribution

macos

### Mobile device

_No response_

### Python version

3.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
Trying to build the android benchmark app from source using bazel

I did the configuration setup as follow:

➜  tensorflow git:(master) ✗ ./configure                                                                                                         
You have bazel 5.3.0 installed.
Please specify the location of python. [Default is /Library/Frameworks/Python.framework/Versions/3.8/bin/python3]: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3


Found possible Python library paths:
  /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Please input the desired Python library path to use.  Default is [/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages]

Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: n
No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: n
Clang will not be downloaded.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]: 


Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: y
Searching for NDK and SDK installations.

Please specify the home path of the Android NDK to use. [Default is /library/Android/Sdk/ndk-bundle]: /Library/Android/sdk/ndk/21.4.7075529


Please specify the (min) Android NDK API level to use. [Available levels: ['16', '17', '18', '19', '21', '22', '23', '24', '26', '27', '28', '29', '30']] [Default is 26]: 21


Please specify the home path of the Android SDK to use. [Default is /library/Android/Sdk]: /library/Android/Sdk


Please specify the Android SDK API level to use. [Available levels: ['23', '28', '33', '33-ext5']] [Default is 33-ext5]: 28


Please specify an Android build tools version to use. [Available versions: ['28.0.3', '30.0.0', '33.0.2']] [Default is 33.0.2]: 30.0.0


Do you wish to build TensorFlow with iOS support? [y/N]: n
No iOS support will be enabled for TensorFlow.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
	--config=mkl         	# Build with MKL support.
	--config=mkl_aarch64 	# Build with oneDNN and Compute Library for the Arm Architecture (ACL).
	--config=monolithic  	# Config for mostly static monolithic build.
	--config=numa        	# Build with NUMA support.
	--config=dynamic_kernels	# (Experimental) Build kernels into separate shared objects.
	--config=v1          	# Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
	--config=nogcp       	# Disable GCP support.
	--config=nonccl      	# Disable NVIDIA NCCL support.
Configuration finished
```


### Standalone code to reproduce the issue

```shell
bazel build -c opt --config=android_arm64 tensorflow/lite/tools/benchmark/android:benchmark_model --verbose_failures
```


### Relevant log output

```shell
# Execution platform: @local_execution_config_platform//:platform
tensorflow/lite/delegates/gpu/delegate.cc:796:7: error: use of undeclared identifier 'AHardwareBuffer_acquire'; did you mean 'AHardwareBuffer_Plane'?
      AHardwareBuffer_acquire(ahwb);
      ^
external/androidndk/ndk/sysroot/usr/include/android/hardware_buffer.h:320:3: note: 'AHardwareBuffer_Plane' declared here
} AHardwareBuffer_Plane;
  ^
tensorflow/lite/delegates/gpu/delegate.cc:804:9: error: use of undeclared identifier 'AHardwareBuffer_release'; did you mean 'AHardwareBuffer_Plane'?
        AHardwareBuffer_release(b);
        ^
external/androidndk/ndk/sysroot/usr/include/android/hardware_buffer.h:320:3: note: 'AHardwareBuffer_Plane' declared here
} AHardwareBuffer_Plane;
  ^
tensorflow/lite/delegates/gpu/delegate.cc:812:7: error: use of undeclared identifier 'AHardwareBuffer_describe'
      AHardwareBuffer_describe(uptr_ahwb.get(), &desc_ahwb);
      ^
tensorflow/lite/delegates/gpu/delegate.cc:1194:18: error: use of undeclared identifier 'AHardwareBuffer_lock'
          return AHardwareBuffer_lock(buffer, this->usage_, -1 /* fence */,
                 ^
tensorflow/lite/delegates/gpu/delegate.cc:1221:24: error: use of undeclared identifier 'AHardwareBuffer_unlock'
                return AHardwareBuffer_unlock(buffer, nullptr /* fence */);
                       ^
5 errors generated.
Target //tensorflow/lite/tools/benchmark/android:benchmark_model failed to build
INFO: Elapsed time: 306.142s, Critical Path: 27.97s
INFO: 648 processes: 17 internal, 631 local.
FAILED: Build did NOT complete successfully
```
</details>