-
Notifications
You must be signed in to change notification settings - Fork 1.2k
M1 / Apple Silicon support #554
Comments
At the moment we don't support/test any build for arm64, so this is kind of expected. The specific issue here is that the curl dependency has no build support for arm64 (this would have to be added in https://github.com/google/tink/blob/master/cc/third_party/curl.BUILD.bazel). However, I would not be surprised if there is more friction when trying to build Tink on arm64. |
It would be great too as part of this work if Tink could be vended as an xcframework instead of a framework. xcframeworks are Apple's format for distributing binary frameworks, introduced in 2019. |
Given that that the intel macs are going away and new hires will need to have use Apple Silicon any plans to support tink on arm64? |
Hi @sethfri, |
Thanks for the quick reply @juergw!
Is there an ETA on when it will be synced with GitHub? 🙏🏻
So for iOS, Tink is currently distributed as a CocoaPod and as a regular Cocoa Touch .framework. You can read the Tink docs on this here. In order to properly support Apple Silicon on iOS, it needs to be built as an xcframework — which is Apple's native binary format — and the Tink podspec then needs to be updated. Should I open a separate issue for this? |
I hope I can do it tomorrow. For xcframework: yes, it think it is better to open a separate issue. |
It has now been synced with GitHub. I tried some examples in C++, Java and Python, and they worked. |
Thanks @juergw! I'm not able to test this on iOS because Obj-C source builds are broken: #529 I opened an issue for XCFramework support here: https://github.com/google/tink/issues/583 |
Golang should now also work. |
We have been trying to get this running on M1 machines. We have been trying various hacks to get it to work with no luck. @sethfri you mentioned that you had to do some extensive hacks to get it to work. Would you mind sharing them? |
How are you guys doing this currently? On 1.6.1 and no luck |
@pvparuchuri The solution we're using is pretty iOS specific, but it's outlined in this blog post from Bogo Giertler: |
Hi All, my team is also running into this issue. Any updates on progress or any suggested workarounds to facilitate development in the meantime? |
@ottothorntonsilver-noyo , at the moment the only feasible solution is to build the python binaries from ~head with either bazel, and move the |
I get the following error when I try to build the current master branch.. Any ideas on how to fix this?
|
Are you using Bazel 5.1.1? The master branch was recently updated to utilize Bazel 5.1.1 throughout the project (b92090c). This is done via That error is due to a transitive dependency using a feature introduced in Bazel 5.0 (see the fourth bullet point in https://blog.bazel.build/2022/01/19/bazel-5.0.html#highlights). |
I did not notice the bazel version upgrade. It worked with 5.1.1. Thank you @chuckx |
I was able to figure out the issue. I needed to install protobuf. |
If anyone is using poetry and would like to use the latest release that hasn't been published to pypi, you can use this entry in your tink = { git = "https://github.com/google/tink", tag = "v1.7.0", subdirectory = "python" } This allowed me to install without issue for Python 3.10 |
Hello, do you have a workaround? Thanks |
Checking to see of this fix is available through iOS cocoapods ? |
You were able to run 1.7.0 on M1/ARM64? |
@747project I had issues with using the 1.7.0 tag on M1/ARM64. Got it to build by removing the tag, like so:
Using the latest and greatest from master is of course not a good idea. It would be so nice if someone™ could publish 1.7.0 to PyPI. |
I've added this on #674, which seems to duplicate this Is your feature request related to a problem? I want to use tink inside a linux docker container running on apple silicon. This is problematic because there are no prebuilt binaries of tink for that plattform available on pypi. Ordinarily this wouldn't be a problem, because pip will just download and build the wheel on demand. However, if bazel is not available in that linux plattform (in my case centos7) that fails. This makes it fairly hard to use tink. What sort of feature would you like to see? I would like to see prebuilt binaries for tink for arm / apple silicon on pypi to ease and speed up usage of tink in docker, especially on apple silicon. Have you considered any alternative solutions? Building bazel myself to then build tink later: Possible, but involved. I may need to go that route though. :/ |
When I last investigated this issue, I was running into problems with achieving a reliably reproducible build across platforms. I'll revisit it this week to see what changes need to be backported from the master branch to the 1.7 branch to get it into a releasable state for PyPI. This will probably necessitate a patch release (i.e. 1.7.1). I'll provide updates as I work through it. |
@chuckx Is there anything I can maybe help with? Testing? Feedback? |
@chuckx are there any plans to get 1.7 onto cocoapods? |
@chuckx Any updates for Cocoapods? |
@chuckx :-) I'd still like to help, I would like to use this library on ubuntu recalcitrant ramses*, so it's a bit hard to compile everything. *name changed to protect the innocent. Ok, it's a really old distribution. |
Binary wheels and a source distribution have been uploaded to PyPI. See https://pypi.org/project/tink/1.7.0/. Regarding Cocoapods, keep an eye on tink-crypto/tink-objc#5. |
Describe the bug
Hello. I am trying to install tink using pip on M1 / Apple Silicon device but without success. Can anybody help me to solve the issue please?
To Reproduce
pip install tink
Expected behavior
Install tink successfully
Error messages, stack traces, etc.
Version information
I tried to install bazel both using homebrew and from binary. Didn't help.
The text was updated successfully, but these errors were encountered: