-
Notifications
You must be signed in to change notification settings - Fork 107
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
golang: Cannot run in arm64 macOS M1; x86_64 architecture warnings #82
Comments
How are you invoking |
@wamuir I removed GOARCH=arm64 and now I get this:
|
This error is due to your build and installation of libtensorflow. There is an open issue for building libtensorflow on M1 at tensorflow/tensorflow/issues/52160 and I see that you have also commented in that issue and requested assistance. As an initial step, and before attempting to use the Go bindings, verify that you can at least compile and successfully run the libtensorflow example program. |
@wamuir not working :(
|
If I copy the x86 files into /usr/local/lib I got a different error:
|
Let's start here: what are you trying to do? |
@wamuir in this case, I copied the content of the libs provided here from the tutorial. But just to make sure I was also following all the steps in the tutorial. In the prev message, I built TF from source and used those files. |
The binaries that you downloaded are for x86_64, which is a different architecture than that of your system. Presumably, when you built libtensorflow from source you targeted your system's architecture (arm64). You've appeared to mix/intermingle these and likely didn't install them correctly in either case, hence the errors that you are receiving. Do you agree with this? |
@wamuir thanks for the explanation and yes makes sense, but I have also used only the binaries obtained from building from source. Check this. You can see that it is using binaries built from source on my M1 machine:
|
Please provide output from running |
@wamuir sure: go env |
I see the point, I need to reinstall go for arm64 |
@juancresc Did it work ?? |
@saiteja111997 i mean im running TF in a arm64 M1 mac but i dont remember how the hell i installed it. |
I was able to build tensorflow from source but now I cannot build a golang app that uses TF lib in mac with M1 processor:
The text was updated successfully, but these errors were encountered: