tink icon indicating copy to clipboard operation
tink copied to clipboard

M1 / Apple Silicon support

Open eriktelepovsky opened this issue 3 years ago • 24 comments

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.

pip install tink                                          

Collecting tink
  Using cached tink-1.6.1.tar.gz (174 kB)
  Preparing metadata (setup.py) ... done

Requirement already satisfied: absl-py in /Users/erik/env/swida/lib/python3.9/site-packages (from tink) (1.0.0)
Requirement already satisfied: protobuf in /Users/erik/env/swida/lib/python3.9/site-packages (from tink) (3.19.1)
Requirement already satisfied: six in /Users/erik/env/swida/lib/python3.9/site-packages (from tink) (1.16.0)
Building wheels for collected packages: tink

  Building wheel for tink (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/erik/env/swida/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-wheel-01mwf4n3
       cwd: /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/
  Complete output (240 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11-arm64-3.9
  creating build/lib.macosx-11-arm64-3.9/tink
  copying tink/tink_config.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/cleartext_keyset_handle.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_writer_test.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_handle.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_handle_test.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/__init__.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_reader_test.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/cleartext_keyset_handle_test.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_writer.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/tink_config_test.py -> build/lib.macosx-11-arm64-3.9/tink
  copying tink/_keyset_reader.py -> build/lib.macosx-11-arm64-3.9/tink
  creating build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_signature_wrappers.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_raw_jwt_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_validator_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_signature_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_error.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_public_key_verify.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_mac.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_validator.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_hmac_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_mac_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_hmac_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_signature_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_verified_jwt.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_verified_jwt_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_mac_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_public_key_sign.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_format.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_format_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_jwt_signature_wrappers_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  copying tink/jwt/_raw_jwt.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
  creating build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_kms_envelope_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_kms_envelope_aead.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  copying tink/aead/_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/aead
  creating build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_set_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_set.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_set_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  copying tink/prf/_prf_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/prf
  creating build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_crypto_format.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_primitive_set.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_registry_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_registry.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_primitive_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_crypto_format_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_tink_error.py -> build/lib.macosx-11-arm64-3.9/tink/core
  copying tink/core/_primitive_set_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
  creating build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_decrypting_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_decrypting_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_raw_streaming_aead.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_encrypting_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_file_object_adapter.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_rewindable_input_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_file_object_adapter_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_encrypting_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_rewindable_input_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  copying tink/streaming_aead/_streaming_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
  creating build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_gcm_siv_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/ecdsa_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_ctr_hmac_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/common_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_gcm_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_cmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_ctr_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/kms_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/hpke_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/cached_dek_envelope_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_ctr_hmac_streaming_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/jwt_rsa_ssa_pkcs1_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/test_proto_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/empty_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/jwt_hmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/tink_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_eax_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/hkdf_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/rsa_ssa_pkcs1_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_gcm_hkdf_streaming_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/prf_based_deriver_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/ecies_aead_hkdf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/cached_dek_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/jwt_ecdsa_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/config_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/hmac_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/ed25519_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/hmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_cmac_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/jwt_rsa_ssa_pss_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/rsa_ssa_pss_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/xchacha20_poly1305_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/aes_siv_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/kms_envelope_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  copying tink/proto/chacha20_poly1305_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
  creating build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_public_key_verify.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_public_key_sign.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  copying tink/signature/_signature_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/signature
  creating build/lib.macosx-11-arm64-3.9/tink/integration
  copying tink/integration/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration
  creating build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/fake_kms.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/helper_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/bytes_io_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/keyset_builder_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/keyset_builder.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/helper.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/bytes_io.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  copying tink/testing/fake_kms_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
  creating build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  copying tink/mac/_mac_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/mac
  creating build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  copying tink/daead/_deterministic_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/daead
  creating build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_decrypt.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  copying tink/hybrid/_hybrid_encrypt.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
  creating build/lib.macosx-11-arm64-3.9/tink/integration/awskms
  copying tink/integration/awskms/_aws_kms_client.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
  copying tink/integration/awskms/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
  copying tink/integration/awskms/_aws_kms_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
  copying tink/integration/awskms/_aws_kms_client_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
  creating build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
  copying tink/integration/gcpkms/_gcp_kms_client_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
  copying tink/integration/gcpkms/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
  copying tink/integration/gcpkms/_gcp_kms_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
  copying tink/integration/gcpkms/_gcp_kms_client.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
  running build_ext
  bazel clean --expunge
  Starting local Bazel server and connecting to it...
  INFO: Starting clean.
  bazel build //tink/cc/pybind:tink_bindings --compilation_mode=opt --incompatible_linkopts_to_linklibs
  Starting local Bazel server and connecting to it...
  Loading:
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  Loading: 0 packages loaded
  INFO: SHA256 (https://github.com/google/tink/archive/master.zip) = 7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6
  Loading: 0 packages loaded
  DEBUG: Rule 'tink_base' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6"
  DEBUG: Repository tink_base instantiated at:
    /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:5:13: in <toplevel>
  Repository rule http_archive defined at:
    /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
  DEBUG: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
  Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
  DEBUG: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 4.2.1 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"], "3.2.0": ["11.0.0"], "3.3.0": ["11.0.0"], "3.3.1": ["11.0.0"], "3.4.1": ["11.0.0"], "3.5.0": ["11.0.0"], "3.5.1": ["11.0.0"], "3.6.0": ["11.0.0"], "3.7.0": ["11.0.0"], "3.7.1": ["11.0.0"], "3.7.2": ["11.0.0"], "4.0.0": ["11.0.0"]}
  Loading: 0 packages loaded
  INFO: SHA256 (https://github.com/google/tink/archive/master.zip) = 7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6
  DEBUG: Rule 'tink_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6"
  DEBUG: Repository tink_cc instantiated at:
    /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:12:13: in <toplevel>
  Repository rule http_archive defined at:
    /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
  Loading: 0 packages loaded
  Analyzing: target //tink/cc/pybind:tink_bindings (1 packages loaded, 0 targets configured)
  Analyzing: target //tink/cc/pybind:tink_bindings (10 packages loaded, 13 targets configured)
  Analyzing: target //tink/cc/pybind:tink_bindings (21 packages loaded, 104 targets configured)
  Analyzing: target //tink/cc/pybind:tink_bindings (21 packages loaded, 104 targets configured)
  Analyzing: target //tink/cc/pybind:tink_bindings (41 packages loaded, 227 targets configured)
  Analyzing: target //tink/cc/pybind:tink_bindings (79 packages loaded, 4316 targets configured)
  ERROR: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/curl/BUILD.bazel:17:11: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
  Conditions checked:
   @curl//:mac_x86_64
   @curl//:linux_x86_64
  INFO: Repository aws_checksums instantiated at:
    /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:36:13: in <toplevel>
    /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/tink_cc/tink_cc_deps.bzl:80:21: in tink_cc_deps
  Repository rule http_archive defined at:
    /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
  ERROR: Analysis of target '//tink/cc/pybind:tink_bindings' failed; build aborted: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/curl/BUILD.bazel:17:11: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
  Conditions checked:
   @curl//:mac_x86_64
   @curl//:linux_x86_64
  INFO: Elapsed time: 45.011s
  INFO: 0 processes.
  FAILED: Build did NOT complete successfully (83 packages loaded, 4874 targets configured)
  FAILED: Build did NOT complete successfully (83 packages loaded, 4874 targets configured)
  error: command '/opt/homebrew/bin/bazel' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for tink
  Running setup.py clean for tink
Failed to build tink
Installing collected packages: tink
    Running setup.py install for tink ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/erik/env/swida/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-record-xlr6i9kq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/erik/env/swida/include/site/python3.9/tink
         cwd: /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/
    Complete output (243 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-11-arm64-3.9
    creating build/lib.macosx-11-arm64-3.9/tink
    copying tink/tink_config.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/cleartext_keyset_handle.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_writer_test.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_handle.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_handle_test.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/__init__.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_reader_test.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/cleartext_keyset_handle_test.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_writer.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/tink_config_test.py -> build/lib.macosx-11-arm64-3.9/tink
    copying tink/_keyset_reader.py -> build/lib.macosx-11-arm64-3.9/tink
    creating build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_signature_wrappers.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_raw_jwt_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_validator_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_signature_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_error.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_public_key_verify.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_mac.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_validator.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_hmac_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_mac_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_hmac_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_signature_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_verified_jwt.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_verified_jwt_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_mac_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_public_key_sign.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_format.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_format_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_jwt_signature_wrappers_test.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    copying tink/jwt/_raw_jwt.py -> build/lib.macosx-11-arm64-3.9/tink/jwt
    creating build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_kms_envelope_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_kms_envelope_aead.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    copying tink/aead/_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/aead
    creating build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_set_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_set.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_set_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    copying tink/prf/_prf_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/prf
    creating build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_crypto_format.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_primitive_set.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_registry_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_registry.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_primitive_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_crypto_format_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_tink_error.py -> build/lib.macosx-11-arm64-3.9/tink/core
    copying tink/core/_primitive_set_test.py -> build/lib.macosx-11-arm64-3.9/tink/core
    creating build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_decrypting_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_decrypting_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_raw_streaming_aead.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_encrypting_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_file_object_adapter.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_rewindable_input_stream.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_file_object_adapter_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_encrypting_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_rewindable_input_stream_test.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    copying tink/streaming_aead/_streaming_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/streaming_aead
    creating build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_gcm_siv_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/ecdsa_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_ctr_hmac_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/common_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_gcm_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_cmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_ctr_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/kms_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/hpke_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/cached_dek_envelope_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_ctr_hmac_streaming_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/jwt_rsa_ssa_pkcs1_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/test_proto_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/empty_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/jwt_hmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/tink_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_eax_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/hkdf_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/rsa_ssa_pkcs1_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_gcm_hkdf_streaming_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/prf_based_deriver_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/ecies_aead_hkdf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/cached_dek_aead_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/jwt_ecdsa_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/config_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/hmac_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/ed25519_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/hmac_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_cmac_prf_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/jwt_rsa_ssa_pss_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/rsa_ssa_pss_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/xchacha20_poly1305_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/aes_siv_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/kms_envelope_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    copying tink/proto/chacha20_poly1305_pb2.py -> build/lib.macosx-11-arm64-3.9/tink/proto
    creating build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_public_key_verify.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_public_key_sign.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    copying tink/signature/_signature_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/signature
    creating build/lib.macosx-11-arm64-3.9/tink/integration
    copying tink/integration/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration
    creating build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/fake_kms.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/helper_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/bytes_io_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/keyset_builder_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/keyset_builder.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/helper.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/bytes_io.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    copying tink/testing/fake_kms_test.py -> build/lib.macosx-11-arm64-3.9/tink/testing
    creating build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    copying tink/mac/_mac_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/mac
    creating build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    copying tink/daead/_deterministic_aead_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/daead
    creating build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_key_manager.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_wrapper_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_decrypt.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_key_templates.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_key_templates_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_key_manager_test.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_wrapper.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    copying tink/hybrid/_hybrid_encrypt.py -> build/lib.macosx-11-arm64-3.9/tink/hybrid
    creating build/lib.macosx-11-arm64-3.9/tink/integration/awskms
    copying tink/integration/awskms/_aws_kms_client.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
    copying tink/integration/awskms/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
    copying tink/integration/awskms/_aws_kms_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
    copying tink/integration/awskms/_aws_kms_client_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/awskms
    creating build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
    copying tink/integration/gcpkms/_gcp_kms_client_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
    copying tink/integration/gcpkms/__init__.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
    copying tink/integration/gcpkms/_gcp_kms_aead_test.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
    copying tink/integration/gcpkms/_gcp_kms_client.py -> build/lib.macosx-11-arm64-3.9/tink/integration/gcpkms
    running build_ext
    bazel clean --expunge
    INFO: Starting clean.
    bazel build //tink/cc/pybind:tink_bindings --compilation_mode=opt --incompatible_linkopts_to_linklibs
    Starting local Bazel server and connecting to it...
    Loading:
    Loading: 0 packages loaded
    Loading: 0 packages loaded
    Loading: 0 packages loaded
    Loading: 0 packages loaded
    INFO: SHA256 (https://github.com/google/tink/archive/master.zip) = 7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6
    DEBUG: Rule 'tink_base' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6"
    DEBUG: Repository tink_base instantiated at:
      /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:6:13: in <toplevel>
    Repository rule http_archive defined at:
      /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
    Loading: 0 packages loaded
    DEBUG: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_toolchains/rules/rbe_repo/version_check.bzl:68:14:
    Current running Bazel is ahead of bazel-toolchains repo. Please update your pin to bazel-toolchains repo in your WORKSPACE file.
    DEBUG: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:125:14: rbe_default not using checked in configs; Bazel version 4.2.1 was picked/selected but no checked in config was found in map {"0.20.0": ["8.0.0"], "0.21.0": ["8.0.0"], "0.22.0": ["8.0.0", "9.0.0"], "0.23.0": ["8.0.0", "9.0.0"], "0.23.1": ["8.0.0", "9.0.0"], "0.23.2": ["9.0.0"], "0.24.0": ["9.0.0"], "0.24.1": ["9.0.0"], "0.25.0": ["9.0.0"], "0.25.1": ["9.0.0"], "0.25.2": ["9.0.0"], "0.26.0": ["9.0.0"], "0.26.1": ["9.0.0"], "0.27.0": ["9.0.0"], "0.27.1": ["9.0.0"], "0.28.0": ["9.0.0"], "0.28.1": ["9.0.0"], "0.29.0": ["9.0.0"], "0.29.1": ["9.0.0", "10.0.0"], "1.0.0": ["9.0.0", "10.0.0"], "1.0.1": ["10.0.0"], "1.1.0": ["10.0.0"], "1.2.0": ["10.0.0"], "1.2.1": ["10.0.0"], "2.0.0": ["10.0.0"], "2.1.0": ["10.0.0"], "2.1.1": ["10.0.0", "11.0.0"], "2.2.0": ["11.0.0"], "3.0.0": ["11.0.0"], "3.1.0": ["11.0.0"], "3.2.0": ["11.0.0"], "3.3.0": ["11.0.0"], "3.3.1": ["11.0.0"], "3.4.1": ["11.0.0"], "3.5.0": ["11.0.0"], "3.5.1": ["11.0.0"], "3.6.0": ["11.0.0"], "3.7.0": ["11.0.0"], "3.7.1": ["11.0.0"], "3.7.2": ["11.0.0"], "4.0.0": ["11.0.0"]}
    Loading: 0 packages loaded
    Loading: 0 packages loaded
    Loading: 0 packages loaded
    INFO: SHA256 (https://github.com/google/tink/archive/master.zip) = 7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6
    DEBUG: Rule 'tink_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "7d8f7cc8db1e223124aeb1a35b7d32cb8ee43dc273acb85e3c78c36a237fb1d6"
    DEBUG: Repository tink_cc instantiated at:
      /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:13:13: in <toplevel>
    Repository rule http_archive defined at:
      /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
    Loading: 0 packages loaded
    Analyzing: target //tink/cc/pybind:tink_bindings (1 packages loaded)
    Analyzing: target //tink/cc/pybind:tink_bindings (1 packages loaded, 0 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (10 packages loaded, 13 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (21 packages loaded, 104 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (21 packages loaded, 104 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (36 packages loaded, 190 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (78 packages loaded, 3598 targets configured)
    Analyzing: target //tink/cc/pybind:tink_bindings (79 packages loaded, 4316 targets configured)
    ERROR: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/curl/BUILD.bazel:17:11: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
    Conditions checked:
     @curl//:mac_x86_64
     @curl//:linux_x86_64
    INFO: Repository aws_checksums instantiated at:
      /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/WORKSPACE:37:13: in <toplevel>
      /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/tink_cc/tink_cc_deps.bzl:80:21: in tink_cc_deps
    Repository rule http_archive defined at:
      /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
    ERROR: Analysis of target '//tink/cc/pybind:tink_bindings' failed; build aborted: /private/var/tmp/_bazel_erik/ba71eca2ca2341464a3df7dfb1a5c3ec/external/curl/BUILD.bazel:17:11: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
    Conditions checked:
     @curl//:mac_x86_64
     @curl//:linux_x86_64
    INFO: Elapsed time: 27.748s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (83 packages loaded, 4874 targets configured)
    FAILED: Build did NOT complete successfully (83 packages loaded, 4874 targets configured)
    error: command '/opt/homebrew/bin/bazel' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/erik/env/swida/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"'; __file__='"'"'/private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-install-xhh7o6ah/tink_08a10896b45c429b9b4b93f0bebbd482/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/y9/h9b8b4yd6zd135l4rvnmv20m0000gp/T/pip-record-xlr6i9kq/install-record.txt --single-version-externally-managed --compile --install-headers /Users/erik/env/swida/include/site/python3.9/tink Check the logs for full command output.

Version information

  • Language: Python
  • Version: 1.6.1
  • Environment: Python 3.9.7, bazel 4.2.1, Apple Silicon with M1 chip, MacOS Big Sur

I tried to install bazel both using homebrew and from binary. Didn't help.

eriktelepovsky avatar Nov 15 '21 17:11 eriktelepovsky

@kste

thaidn avatar Nov 17 '21 18:11 thaidn

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.

kste avatar Nov 18 '21 14:11 kste

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.

sethfri avatar Nov 22 '21 05:11 sethfri

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?

damienrj avatar Nov 23 '21 22:11 damienrj

Hi @kste @thaidn, any update on this? Our entire team of 80 engineers just got M1 machines, and our app won't build correctly until Tink supports Apple Silicon without extensive hacks

sethfri avatar Jan 18 '22 06:01 sethfri

@juergw is working on this. Based on his comment and the progress he's made I think this should be fixed very soon, at least for Tink at HEAD.

@chuckx this should be included in 1.7.

thaidn avatar Jan 20 '22 18:01 thaidn

@thaidn Thanks!

@juergw Will this also include distribution as an xcframework via CocoaPods as well?

sethfri avatar Jan 20 '22 20:01 sethfri

Hi @juergw @thaidn, want to follow up on this. Any update on the "very soon" fix and whether it will include xcframework distribution via CocoaPods? :)

sethfri avatar Feb 02 '22 15:02 sethfri

Hi @sethfri, Sorry for the delay. I have a fix, but it is not yet synced with github. Once that's done, you should be able to build it with bazel from head. I guess pip install will only be fixed with the next release. But I can't give you and answer about xcframework. Sorry.

juergw avatar Feb 02 '22 16:02 juergw

Thanks for the quick reply @juergw!

Sorry for the delay. I have a fix, but it is not yet synced with github

Is there an ETA on when it will be synced with GitHub? 🙏🏻

But I can't give you and answer about xcframework. Sorry.

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?

sethfri avatar Feb 02 '22 16:02 sethfri

I hope I can do it tomorrow.

For xcframework: yes, it think it is better to open a separate issue.

juergw avatar Feb 02 '22 18:02 juergw

It has now been synced with GitHub. I tried some examples in C++, Java and Python, and they worked.

juergw avatar Feb 03 '22 14:02 juergw

Thanks @juergw! I'm not able to test this on iOS because Obj-C source builds are broken: https://github.com/google/tink/issues/529

I opened an issue for XCFramework support here: https://github.com/google/tink/issues/583

sethfri avatar Feb 03 '22 20:02 sethfri

Golang should now also work.

juergw avatar Mar 21 '22 09:03 juergw

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?

pvparuchuri avatar Mar 29 '22 16:03 pvparuchuri

How are you guys doing this currently? On 1.6.1 and no luck

jgod avatar May 06 '22 23:05 jgod

@pvparuchuri The solution we're using is pretty iOS specific, but it's outlined in this blog post from Bogo Giertler:

https://bogo.wtf/arm64-to-sim.html

sethfri avatar May 06 '22 23:05 sethfri

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 avatar May 12 '22 17:05 ottothorntonsilver-noyo

@ottothorntonsilver-noyo , at the moment the only feasible solution is to build the python binaries from ~head with either bazel, and move the ./tink folder to their intended paths (.venv/**/lib/python3.*/site-packages for example), or to do a pip install . (the easiest one) both of them from within the ./python folder on the repo. Until the team releases a new package version, that is.

IanMejia avatar May 19 '22 04:05 IanMejia

I get the following error when I try to build the current master branch.. Any ideas on how to fix this? Mac M1 and Python 3.9.11

/private/var/tmp/bazel/e5f685bb1808e408607ebd9846c8cd4f/external/build_bazel_rules_swift/swift/internal/swift_clang_module_aspect.bzl:262:5: nested functions are not allowed. Move the function to the top level.

jyothiyzen avatar May 20 '22 18:05 jyothiyzen

Are you using Bazel 5.1.1?

The master branch was recently updated to utilize Bazel 5.1.1 throughout the project (https://github.com/google/tink/commit/b92090c4f3a83115a18df1bbabdbad75f74fff42). This is done via .bazelversion files, which is the convention used by tools such as Bazelisk.

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).

chuckx avatar May 20 '22 20:05 chuckx

I did not notice the bazel version upgrade. It worked with 5.1.1. Thank you @chuckx

jyothiyzen avatar May 20 '22 20:05 jyothiyzen

I was able to build with bazel build ... but when I try to install using pip install .. I get the following error. Any ideas?

Processing /Users/user/Downloads/tink/python
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/user/Downloads/tink/python/setup.py", line 345, in <module>
          main()
        File "/Users/user/Downloads/tink/python/setup.py", line 311, in main
          _generate_proto(protoc_command, proto_file)
        File "/Users/user/Downloads/tink/python/setup.py", line 87, in _generate_proto
          subprocess.run(args=protoc_args, check=True)
        File "/Users/user/.pyenv/versions/3.9.11/lib/python3.9/subprocess.py", line 505, in run
          with Popen(*popenargs, **kwargs) as process:
        File "/Users/user/.pyenv/versions/3.9.11/lib/python3.9/subprocess.py", line 951, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Users/user/.pyenv/versions/3.9.11/lib/python3.9/subprocess.py", line 1696, in _execute_child
          and os.path.dirname(executable)
        File "/Users/user/.pyenv/versions/3.9.11/lib/python3.9/posixpath.py", line 152, in dirname
          p = os.fspath(p)
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      Generating tink/proto/aes_gcm_siv_pb2.py...
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I was able to figure out the issue. I needed to install protobuf.

jyothiyzen avatar May 23 '22 14:05 jyothiyzen

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 pyproject.toml

tink =   { git = "https://github.com/google/tink", tag = "v1.7.0", subdirectory = "python" }

This allowed me to install without issue for Python 3.10

cofin avatar Sep 09 '22 14:09 cofin

Hello, do you have a workaround?

Thanks

4sushi avatar Oct 06 '22 09:10 4sushi

Checking to see of this fix is available through iOS cocoapods ?

oianmol avatar Dec 01 '22 17:12 oianmol

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 pyproject.toml

tink =   { git = "https://github.com/google/tink", tag = "v1.7.0", subdirectory = "python" }

This allowed me to install without issue for Python 3.10

You were able to run 1.7.0 on M1/ARM64?

747project avatar Feb 02 '23 20:02 747project

@747project I had issues with using the 1.7.0 tag on M1/ARM64. Got it to build by removing the tag, like so:

tink = { git = "https://github.com/google/tink", subdirectory = "python" }

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.

kschulst avatar Feb 06 '23 10:02 kschulst

I've added this on tink-crypto/tink#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. :/ Adding a builder sidecar docker container with a more modern linux distribution that already ships an arm version of bazel. Possible, also more involved than I'd like, but maybe necessary? Search for someone to provide a repo that provides bazel builds for arm already… Haven't found anything yet, but pointers would be welcome. If there are other possible workarounds, especially if they involve less work, that would be most welcome.

dwt avatar Feb 07 '23 16:02 dwt

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 avatar Feb 08 '23 06:02 chuckx