Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon, building pip package ... clang: error: linker command failed with exit code 1 #67473

Open
zepouet opened this issue May 13, 2024 · 1 comment
Assignees
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author subtype:macOS macOS Build/Installation issues TF 2.16 type:bug Bug type:build/install Build and install issues

Comments

@zepouet
Copy link

zepouet commented May 13, 2024

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

2.16.1

Custom code

No

OS platform and distribution

Mac Sonoma 14.4.1

Mobile device

No response

Python version

3.10

Bazel version

No response

GCC/compiler version

Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.4.0

CUDA/cuDNN version

No response

GPU model and memory

M3 MAX

Current behavior?

Hello,

Cannot compile the python library for Apple Silicon about TF Lite

Standalone code to reproduce the issue

Try to compile with and without aarch64 target because of arm64 doesn't succed

PYTHON=python3 tensorflow/lite/tools/pip_package/build_pip_package_with_cmake.sh native

Relevant log output

pybind11::detail::type_caster<bool, void>& pybind11::detail::load_type<bool, void>(pybind11::detail::type_caster<bool, void>&, pybind11::handle const&) in interpreter_wrapper_pybind11.cc.o
      bool pybind11::detail::argument_loader<tflite::interpreter_wrapper::InterpreterWrapper&, int, pybind11::handle&, bool, int>::load_impl_sequence<0ul, 1ul, 2ul, 3ul, 4ul>(pybind11::detail::function_call&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) in interpreter_wrapper_pybind11.cc.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [_pywrap_tensorflow_interpreter_wrapper.dylib] Error 1
make[2]: *** [CMakeFiles/_pywrap_tensorflow_interpreter_wrapper.dir/all] Error 2
make[1]: *** [CMakeFiles/_pywrap_tensorflow_interpreter_wrapper.dir/rule] Error 2
make: *** [_pywrap_tensorflow_interpreter_wrapper] Error 2

make[1]: *** [CMakeFiles/_pywrap_tensorflow_interpreter_wrapper.dir/rule] Error 2
make: *** [_pywrap_tensorflow_interpreter_wrapper] Error 2
@google-ml-butler google-ml-butler bot added the type:bug Bug label May 13, 2024
@zepouet zepouet changed the title Apple Silicon, buiding pip package -> clang: error: linker command failed with exit code 1 Apple Silicon, building pip package ... clang: error: linker command failed with exit code 1 May 13, 2024
@Venkat6871 Venkat6871 added TF 2.16 comp:lite TF Lite related issues labels May 15, 2024
@Venkat6871 Venkat6871 assigned sawantkumar and unassigned Venkat6871 May 16, 2024
@sawantkumar sawantkumar added type:build/install Build and install issues subtype:macOS macOS Build/Installation issues labels May 16, 2024
@sawantkumar sawantkumar assigned pkgoogle and unassigned sawantkumar May 21, 2024
@pkgoogle
Copy link

Hi @zepouet, can you try with Clang from xcode 13.6: https://www.tensorflow.org/install/source#macos ensure your versions are aligned with the compatibility matrix. Thanks.

@pkgoogle pkgoogle added the stat:awaiting response Status - Awaiting response from author label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author subtype:macOS macOS Build/Installation issues TF 2.16 type:bug Bug type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

4 participants