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

Missing binutils dependency #176917

Closed
padhia opened this issue Jun 8, 2022 · 0 comments
Closed

Missing binutils dependency #176917

padhia opened this issue Jun 8, 2022 · 0 comments

Comments

@padhia
Copy link

padhia commented Jun 8, 2022

Describe the bug

snowflake-connector-python module fails due to missing binutils dependency.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix run --impure --expr 'with builtins.getFlake "nixpkgs"; with legacyPackages.${builtins.currentSystem}; python310.withPackages (ps: with ps; [ snowflake-connector-python ])' <<< "from snowflake.connector import connect;connect(account='xyz', user='user', password='secret')"

Expected behavior

Either a Snowflake connection object or a Python DB API exception

Screenshots

(... truncated)
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/snowflake/connector/ssl_wrap_socket.py", line 78, in ssl_wrap_socket_with_ocsp
    from .ocsp_asn1crypto import SnowflakeOCSPAsn1Crypto as SFOCSP
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/snowflake/connector/ocsp_asn1crypto.py", line 61, in <module>
    from oscrypto import asymmetric
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/asymmetric.py", line 19, in <module>
    from ._asymmetric import _unwrap_private_key_info
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/_openssl/_libcrypto.py", line 9, in <module>
    from ._libcrypto_cffi import (
  File "/nix/store/wdwr18af8bd84x8c6wsnz5jc37wgjq10-python3-3.10.4-env/lib/python3.10/site-packages/oscrypto/_openssl/_libcrypto_cffi.py", line 27, in <module>
    raise LibraryNotFoundError('The library libcrypto could not be found')
oscrypto.errors.LibraryNotFoundError: The library libcrypto could not be found

Additional context

This solution fixed the issue (by installing binutils package).

I don't have a way to directly test the underlying packages to nail down the root cause, but this issue is likely due to the upstream package oscrypto or even further up at the Python interpreter level (because ctypes is a built-in Python module) is missing the binutils dependency.

Notify maintainers

@fabaff @r-ryantm

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.43, NixOS, 22.11 (Raccoon), 22.11.20220530.f1c1676`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.0pre20220512_d354fc3`
 - channels(user): `"home-manager"`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant