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

Can't build from source on M1 #971

Closed
dlwh opened this issue Jul 24, 2022 · 5 comments
Closed

Can't build from source on M1 #971

dlwh opened this issue Jul 24, 2022 · 5 comments

Comments

@dlwh
Copy link

dlwh commented Jul 24, 2022

Hi,

I'm on an M1 back. I've installed tensorflow-macos and would like to build this from scratch, which I think should be possible (as per #756). However, I'm getting issues building dependencies namely com_google_sentencepiece:

ERROR: /private/var/tmp/_bazel_dlwh/5b5343ed274731dd03bb9e218576ebef/external/com_google_sentencepiece/BUILD.bazel:51:11: Compiling src/model_interface.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 70 arguments skipped)
external/com_google_sentencepiece/src/model_interface.cc:20:10: error: module @com_google_sentencepiece//:sentencepiece_processor does not depend on a module exporting 'absl/strings/str_format.h'
#include "absl/strings/str_format.h"

Due to a race I sometimes get errors about not depending on darts_clone instead. I've tried master and v2.9.0

Am I doing something wrong?

@sun1638650145
Copy link
Contributor

Here is my pre-compiled whl file, and you can check if yours is different from the tutorial. There has been a problem similar to yours, and you can discuss it here.

@dlwh
Copy link
Author

dlwh commented Jul 25, 2022 via email

@dlwh dlwh closed this as completed Jul 25, 2022
@xleviator
Copy link

Did anyone get this to work on a more recent tree or with Python 3.10? tensorflow_text-2.9.0-cp310-cp310-macosx_11_0_arm64.whl - I didn't try a recent tree with Python 3.9.

ImportError: dlopen(...python3.10/site-packages/tensorflow_text/core/pybinds/tflite_registrar.so, 0x0002): tried: '...lib/python3.10/site-packages/tensorflow_text/core/pybinds/tflite_registrar.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

@vedmant
Copy link

vedmant commented Mar 1, 2023

I have the same issue:

 from tensorflow_text.core.pybinds import tflite_registrar
ImportError: dlopen(/Users/vedmant/miniconda3/lib/python3.10/site-packages/tensorflow_text/core/pybinds/tflite_registrar.so, 0x0002): tried: '/Users/vedmant/miniconda3/lib/python3.10/site-packages/tensorflow_text/core/pybinds/tflite_registrar.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

Any clear way how to fix this?

@sun1638650145
Copy link
Contributor

@xleviator @vedmant Please update macOS and Xcode, then you compile according to the new tutorial or can use my pre-compiled tensorflow-text 2.12.0. But I am not sure whether the new version of Xcode can solve the problem on 2.10.0 and 2.11.0, further confirmation is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants