Selectively build TFLite frameworks failed！
Hi @chenyingchao, can you share "migan_8bit_a3.tflite" or where I can download it? Thanks! [Uploading migan_8bit_new.tflite.zip…]()
@pkgoogle  Hi @chenyingchao, it appears that link just links back to this issue, perhaps that is not the right link? Thanks for your help. [migan_8bit_0.tflite.zip](https://github.com/tensorflow/tensorflow/files/14784018/migan_8bit_0.tflite.zip)
@pkgoogle please try this. Thanks @chenyingchao, I was able to replicate with the same results:

On MacOS:
```
bash tensorflow/lite/ios/build_frameworks.sh --input_models=migan_8bit_0.tflite --target_archs=x86_64,armv7,arm64
Starting local Bazel server and connecting to it...
INFO: Reading 'startup' options from /Users/xxxxxx/git/tensorflow/.bazelrc: --windows_enable_symlinks
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=192
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --features=-force_no_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/Users/xxxxxx/miniforge3/envs/python3dot9/bin/python3 --action_env PYTHON_LIB_PATH=/Users/xxxxxx/miniforge3/envs/python3dot9/lib/python3.9/site-packages --python_path=/Users/xxxxxx/miniforge3/envs/python3dot9/bin/python3 --action_env ANDROID_NDK_HOME=/Users/xxxxxx/Library/Android/sdk/ndk/21.4.7075529 --action_env ANDROID_NDK_API_LEVEL=26 --action_env ANDROID_BUILD_TOOLS_VERSION=34.0.0 --action_env ANDROID_SDK_API_LEVEL=34 --action_env ANDROID_SDK_HOME=/Users/xxxxxx/library/Android/Sdk
INFO: Found applicable config definition build:short_logs in file /Users/xxxxxx/git/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/xxxxxx/git/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:ios in file /Users/xxxxxx/git/tensorflow/.bazelrc: --apple_platform_type=ios --apple_bitcode=embedded --copt=-fembed-bitcode --copt=-Wno-c++11-narrowing --noenable_platform_specific_config --copt=-w --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --define=with_xla_support=false
INFO: Analyzed target //tensorflow/lite/ios/tmp:TensorFlowLiteC_framework (150 packages loaded, 7433 targets configured).
INFO: Found 1 target...
Target //tensorflow/lite/ios/tmp:TensorFlowLiteC_framework up-to-date:
  bazel-bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip
INFO: Elapsed time: 214.692s, Critical Path: 24.21s
INFO: 2032 processes: 366 internal, 1666 local.
INFO: Build completed successfully, 2032 total actions
INFO: Reading 'startup' options from /Users/xxxxxx/git/tensorflow/.bazelrc: --windows_enable_symlinks
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=192
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --features=-force_no_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/xxxxxx/git/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/Users/xxxxxx/miniforge3/envs/python3dot9/bin/python3 --action_env PYTHON_LIB_PATH=/Users/xxxxxx/miniforge3/envs/python3dot9/lib/python3.9/site-packages --python_path=/Users/xxxxxx/miniforge3/envs/python3dot9/bin/python3 --action_env ANDROID_NDK_HOME=/Users/xxxxxx/Library/Android/sdk/ndk/21.4.7075529 --action_env ANDROID_NDK_API_LEVEL=26 --action_env ANDROID_BUILD_TOOLS_VERSION=34.0.0 --action_env ANDROID_SDK_API_LEVEL=34 --action_env ANDROID_SDK_HOME=/Users/xxxxxx/library/Android/Sdk
INFO: Found applicable config definition build:short_logs in file /Users/xxxxxx/git/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/xxxxxx/git/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:monolithic in file /Users/xxxxxx/git/tensorflow/.bazelrc: --define framework_shared_object=false --define tsl_protobuf_header_only=false --experimental_link_static_libraries_once=false
INFO: Found applicable config definition build:macos in file /Users/xxxxxx/git/tensorflow/.bazelrc: --apple_platform_type=macos --copt=-DGRPC_BAZEL_BUILD --features=archive_param_file --copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=no_tfrt
INFO: Found applicable config definition build:no_tfrt in file /Users/xxxxxx/git/tensorflow/.bazelrc: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/ir,tensorflow/compiler/mlir/tfrt/ir/mlrt,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ifrt,tensorflow/compiler/mlir/tfrt/tests/mlrt,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/compiler/mlir/tfrt/transforms/mlrt,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/runtime_fallback/test,tensorflow/core/runtime_fallback/test/gpu,tensorflow/core/runtime_fallback/test/saved_model,tensorflow/core/runtime_fallback/test/testdata,tensorflow/core/tfrt/stubs,tensorflow/core/tfrt/tfrt_session,tensorflow/core/tfrt/mlrt,tensorflow/core/tfrt/mlrt/attribute,tensorflow/core/tfrt/mlrt/kernel,tensorflow/core/tfrt/mlrt/bytecode,tensorflow/core/tfrt/mlrt/interpreter,tensorflow/compiler/mlir/tfrt/translate/mlrt,tensorflow/compiler/mlir/tfrt/translate/mlrt/testdata,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug,tensorflow/core/tfrt/saved_model/python,tensorflow/core/tfrt/graph_executor/python,tensorflow/core/tfrt/saved_model/utils
INFO: Build options --apple_bitcode, --apple_platform_type, --copt, and 2 more have changed, discarding analysis cache.
INFO: Analyzed target //tensorflow/lite/tools:list_flex_ops_no_kernel_main (9 packages loaded, 1402 targets configured).
INFO: Found 1 target...
Target //tensorflow/lite/tools:list_flex_ops_no_kernel_main up-to-date:
  bazel-bin/tensorflow/lite/tools/list_flex_ops_no_kernel_main
INFO: Elapsed time: 22.719s, Critical Path: 9.28s
INFO: 206 processes: 7 internal, 199 local.
INFO: Build completed successfully, 206 total actions
Output can be found here:
ls: /Users/xxxxxx/git/tensorflow/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip: No such file or directory
```
Similarly opening the .zip file is as you described, something seems wrong/off.

Hi @yishuangP, can you please take a look? Thanks. @chenyingchao i encountered exactly the same error as you! 

"'builtin_ops.h' file not found"

However，after I have selectively built the libraries with Tensorflow r2.9, the error goes away

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

2.16.1

### Custom code

Yes

### OS platform and distribution

13.5

### Mobile device

_No response_

### Python version

3.12.2

### Bazel version

6.5.0

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

bash tensorflow/lite/ios/build_frameworks.sh \
  --input_models=migan_8bit_a3.tflite \
  --target_archs=x86_64,armv7,arm64

There were no errors after executing the script, but no such file or directory occurred。

ls: /Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip: No such file or directory

<img width="1342" alt="image" src="https://github.com/tensorflow/tensorflow/assets/20237703/46de32ea-2a05-4cfe-a22a-845e804aba2b">

but，I found the framework in the “/Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip” path

I opened the framework and found that its files seemed to be incorrect, Only five files.

![b80526270dda8b60c190a06cbfd18b3d](https://github.com/tensorflow/tensorflow/assets/20237703/a9389c59-7bd7-477e-b2d5-b21de3e36e9b)

![c8f3d0cab9921bd96b65c38c7fcfe671](https://github.com/tensorflow/tensorflow/assets/20237703/47a8567a-643e-4a3d-a684-d33ea5cc76b0)

last，when I build， Xcode show error，not found "builtin_ops. h"




### Standalone code to reproduce the issue

```shell
bash tensorflow/lite/ios/build_frameworks.sh \
  --input_models=migan_8bit_a3.tflite \
  --target_archs=x86_64,armv7,arm64
```


### Relevant log output

```shell
ls: /Users/xxx/Desktop/tensorflow-2.16.1/bazel-out/applebin_ios-ios_sim_arm64-opt-ST-7b90815cfaca/bin/tensorflow/lite/ios/tmp/TensorFlowLiteC_framework.zip: No such file or directory


when I build Xcode，it show error，not found "builtin_ops. h"
```
