Closed TanJinKiat closed 1 year ago
Hi @TanJinKiat
When building with bazel:
ERROR: C:/users/User/tink-1.7.0/WORKSPACE:5:17: fetching local_repository rule //external:tink_cc: java.io.IOException: Could not create symlink to repository "/tmp/tink/python/../cc" (absolute path: "/tmp/tink/cc"): Cannot create junction (name=C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, target=\tmp\tink\cc): ERROR: src/main/native/windows/file-jni.cc(122): nativeCreateJunction(\\?\C:\users\User\_bazel_marcus\ure6mkuv\external\tink_cc, \\?\\tmp\tink\cc): ERROR: src/main/native/windows/file.cc(231): CreateJunction(\\?\\tmp\tink\cc): expected an absolute Windows path for junction_target ERROR: Error computing the main repository mapping: no such package '@tink_cc//': Could not create symlink to repository "/tmp/tink/python/../cc" (absolute path: "/tmp/tink/cc"): Cannot create junction (name=C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, target=\tmp\tink\cc): ERROR: src/main/native/windows/file-jni.cc(122): nativeCreateJunction(\\?\C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, \\?\\tmp\tink\cc): ERROR: src/main/native/windows/file.cc(231): CreateJunction(\\?\\tmp\tink\cc): expected an absolute Windows path for junction_target Loading:
There is currently an issue with the sdist
for v1.7.0
, see https://github.com/google/tink/issues/621#issuecomment-1580855453.
Also note that Windows is not currently supported for Tink Python. We've recently added some support for Windows to Tink C++ (https://github.com/tink-crypto/tink-cc/releases/tag/v2.0.0), but not yet tested this with Tink Python.
Thank you @morambro for the prompt reply.
Any idea when I can expect to be able to run Tink Python on Windows, or if there are any workarounds for this issue? This seems like a major issue for Windows OS users that isn't communicated across properly in documentation
Also, I understand that tink is only supported for Python versions 3.7 till 3.9. I have tried running the install within a Docker container set to Python 3.9, and that only resulted in multiple conflicts with protobuf. Downgrading to protobuf 3.20 seemed to help, but it does not seem like a long term, sustainable solution. Are there any workarounds for this issue? Thanks.
3.10 is also supported. The requirement on protobuf
is indeed restrictive (see https://github.com/google/tink/issues/695). We will probably fix this (alongside the sdist
I mentioned in https://github.com/google/tink/issues/700#issuecomment-1590752304) in a patch release.
Any idea when I can expect to be able to run Tink Python on Windows, or if there are any workarounds for this issue? This seems like a major issue for Windows OS users that isn't communicated across properly in documentation
Thanks for the feedback. I haven't looked at Windows support yet so unfortunately I don't have a timeline for it.
Noted, thanks for the clarification.
I downloaded the source files for tink from PyPI and opened the folder to install using the commands
bazel build .
andpip3 install .
. Both commands failed with the following errors:When building with bazel:
ERROR: C:/users/User/tink-1.7.0/WORKSPACE:5:17: fetching local_repository rule //external:tink_cc: java.io.IOException: Could not create symlink to repository "/tmp/tink/python/../cc" (absolute path: "/tmp/tink/cc"): Cannot create junction (name=C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, target=\tmp\tink\cc): ERROR: src/main/native/windows/file-jni.cc(122): nativeCreateJunction(\\?\C:\users\User\_bazel_marcus\ure6mkuv\external\tink_cc, \\?\\tmp\tink\cc): ERROR: src/main/native/windows/file.cc(231): CreateJunction(\\?\\tmp\tink\cc): expected an absolute Windows path for junction_target ERROR: Error computing the main repository mapping: no such package '@tink_cc//': Could not create symlink to repository "/tmp/tink/python/../cc" (absolute path: "/tmp/tink/cc"): Cannot create junction (name=C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, target=\tmp\tink\cc): ERROR: src/main/native/windows/file-jni.cc(122): nativeCreateJunction(\\?\C:\users\User\_bazel_User\ure6mkuv\external\tink_cc, \\?\\tmp\tink\cc): ERROR: src/main/native/windows/file.cc(231): CreateJunction(\\?\\tmp\tink\cc): expected an absolute Windows path for junction_target Loading:
When building with pip:
`Building wheels for collected packages: tink Building wheel for tink (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [205 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.10 creating build\lib.win-amd64-3.10\tink copying tink\cleartext_keyset_handle.py -> build\lib.win-amd64-3.10\tink copying tink\cleartext_keyset_handle_test.py -> build\lib.win-amd64-3.10\tink copying tink\secret_key_access.py -> build\lib.win-amd64-3.10\tink copying tink\secret_key_access_test.py -> build\lib.win-amd64-3.10\tink copying tink\tink_config.py -> build\lib.win-amd64-3.10\tink copying tink\tink_config_test.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_handle.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_handle_test.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_reader.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_reader_test.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_writer.py -> build\lib.win-amd64-3.10\tink copying tink_keyset_writer_test.py -> build\lib.win-amd64-3.10\tink copying tink__init.py -> build\lib.win-amd64-3.10\tink creating build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_key_manager.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_key_manager_test.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_key_templates.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_key_templates_test.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_wrapper.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_aead_wrapper_test.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_kms_envelope_aead.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead_kms_envelope_aead_test.py -> build\lib.win-amd64-3.10\tink\aead copying tink\aead__init.py -> build\lib.win-amd64-3.10\tink\aead creating build\lib.win-amd64-3.10\tink\core copying tink\core_crypto_format.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_crypto_format_test.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_key_manager.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_primitive_set.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_primitive_set_test.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_primitive_wrapper.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_registry.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_registry_test.py -> build\lib.win-amd64-3.10\tink\core copying tink\core_tink_error.py -> build\lib.win-amd64-3.10\tink\core copying tink\core__init.py -> build\lib.win-amd64-3.10\tink\core creating build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_key_manager.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_key_manager_test.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_key_templates.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_key_templates_test.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_wrapper.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead_deterministic_aead_wrapper_test.py -> build\lib.win-amd64-3.10\tink\daead copying tink\daead__init.py -> build\lib.win-amd64-3.10\tink\daead creating build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_decrypt.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_encrypt.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_key_manager.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_key_manager_test.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_key_templates.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_key_templates_test.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_wrapper.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid_hybrid_wrapper_test.py -> build\lib.win-amd64-3.10\tink\hybrid copying tink\hybrid__init.py -> build\lib.win-amd64-3.10\tink\hybrid creating build\lib.win-amd64-3.10\tink\integration copying tink\integration__init.py -> build\lib.win-amd64-3.10\tink\integration creating build\lib.win-amd64-3.10\tink\internal copying tink\internal\big_integer_util.py -> build\lib.win-amd64-3.10\tink\internal copying tink\internal\big_integer_util_test.py -> build\lib.win-amd64-3.10\tink\internal copying tink\internal__init.py -> build\lib.win-amd64-3.10\tink\internal creating build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_json_util.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_json_util_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwk_set_converter.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwk_set_converter_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_error.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_format.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_format_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_hmac_key_manager.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_hmac_key_manager_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_key_templates.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_key_templates_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_mac.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_mac_wrapper.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_mac_wrapper_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_public_key_sign.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_public_key_verify.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_signature_key_manager.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_signature_key_manager_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_signature_wrappers.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_signature_wrappers_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_validator.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_jwt_validator_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_raw_jwt.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_raw_jwt_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_verified_jwt.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt_verified_jwt_test.py -> build\lib.win-amd64-3.10\tink\jwt copying tink\jwt__init__.py -> build\lib.win-amd64-3.10\tink\jwt creating build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_key_manager.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_key_manager_test.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_key_templates.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_key_templates_test.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_wrapper.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac_mac_wrapper_test.py -> build\lib.win-amd64-3.10\tink\mac copying tink\mac\init__.py -> build\lib.win-amd64-3.10\tink\mac creating build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_key_manager.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_key_manager_test.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_key_templates.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_set.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_set_wrapper.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf_prf_set_wrapper_test.py -> build\lib.win-amd64-3.10\tink\prf copying tink\prf\init.py -> build\lib.win-amd64-3.10\tink\prf creating build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_cmac_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_cmac_prf_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_ctr_hmac_aead_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_ctr_hmac_streaming_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_ctr_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_eax_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_gcm_hkdf_streaming_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_gcm_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_gcm_siv_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\aes_siv_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\cached_dek_aead_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\cached_dek_envelope_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\chacha20_poly1305_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\common_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\config_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\ecdsa_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\ecies_aead_hkdf_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\ed25519_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\empty_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\hkdf_prf_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\hmac_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\hmac_prf_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\hpke_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\jwt_ecdsa_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\jwt_hmac_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\jwt_rsa_ssa_pkcs1_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\jwt_rsa_ssa_pss_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\kms_aead_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\kms_envelope_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\prf_based_deriver_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\rsa_ssa_pkcs1_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\rsa_ssa_pss_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\test_proto_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\tink_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\xchacha20_poly1305_pb2.py -> build\lib.win-amd64-3.10\tink\proto copying tink\proto\init__.py -> build\lib.win-amd64-3.10\tink\proto creating build\lib.win-amd64-3.10\tink\signature copying tink\signature_public_key_sign.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_public_key_verify.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_signature_key_manager.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_signature_key_manager_test.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_signature_key_templates.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_signature_wrapper.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature_signature_wrapper_test.py -> build\lib.win-amd64-3.10\tink\signature copying tink\signature\init__.py -> build\lib.win-amd64-3.10\tink\signature creating build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_decrypting_stream.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_decrypting_stream_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_encrypting_stream.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_encrypting_stream_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_file_object_adapter.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_file_object_adapter_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_pybind11_python_file_object_adapter_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_raw_streaming_aead.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_rewindable_input_stream.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_rewindable_input_stream_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_key_manager.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_key_manager_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_key_templates.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_key_templates_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_wrapper.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead_streaming_aead_wrapper_test.py -> build\lib.win-amd64-3.10\tink\streaming_aead copying tink\streaming_aead\init__.py -> build\lib.win-amd64-3.10\tink\streaming_aead creating build\lib.win-amd64-3.10\tink\testing copying tink\testing\bytes_io.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\bytes_io_test.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\fake_kms.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\fake_kms_test.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\helper.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\helper_test.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\keyset_builder.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\keyset_builder_test.py -> build\lib.win-amd64-3.10\tink\testing copying tink\testing\init__.py -> build\lib.win-amd64-3.10\tink\testing creating build\lib.win-amd64-3.10\tink\integration\awskms copying tink\integration\awskms_aws_kms_aead_test.py -> build\lib.win-amd64-3.10\tink\integration\awskms copying tink\integration\awskms_aws_kms_client.py -> build\lib.win-amd64-3.10\tink\integration\awskms copying tink\integration\awskms_aws_kms_client_test.py -> build\lib.win-amd64-3.10\tink\integration\awskms copying tink\integration\awskms\init__.py -> build\lib.win-amd64-3.10\tink\integration\awskms creating build\lib.win-amd64-3.10\tink\integration\gcpkms copying tink\integration\gcpkms_gcp_kms_aead_test.py -> build\lib.win-amd64-3.10\tink\integration\gcpkms copying tink\integration\gcpkms_gcp_kms_client.py -> build\lib.win-amd64-3.10\tink\integration\gcpkms copying tink\integration\gcpkms_gcp_kms_client_test.py -> build\lib.win-amd64-3.10\tink\integration\gcpkms copying tink\integration\gcpkms\init__.py -> build\lib.win-amd64-3.10\tink\integration\gcpkms running build_ext bazelisk clean --expunge Starting local Bazel server and connecting to it... INFO: Starting clean. bazelisk build //tink/cc/pybind:tink_bindings --compilation_mode=opt --incompatible_linkopts_to_linklibs Starting local Bazel server and connecting to it... ERROR: --incompatible_linkopts_to_linklibs :: Unrecognized option: --incompatible_linkopts_to_linklibs error: command 'C:\ProgramData\chocolatey\bin\bazelisk.exe' failed with exit code 2 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tink Running setup.py clean for tink Failed to build tink`
Version Information
Also, I understand that tink is only supported for Python versions 3.7 till 3.9. I have tried running the install within a Docker container set to Python 3.9, and that only resulted in multiple conflicts with protobuf. Downgrading to protobuf 3.20 seemed to help, but it does not seem like a long term, sustainable solution. Are there any workarounds for this issue? Thanks.