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

BUG: Install fails with --no-binary :all: #23

Open
maciejpankanin opened this issue Jan 14, 2025 · 0 comments
Open

BUG: Install fails with --no-binary :all: #23

maciejpankanin opened this issue Jan 14, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@maciejpankanin
Copy link

Describe the issue:

Installation fails when I try:

pip install --no-binary ":all:" --force-reinstall gufo_snmp

This is a really annoying problem, as I cannot easily use gufo_snmp for platforms where no pre-built wheels are available.

The only way for now is installing directly from repository since this works without problems:

pip install git+https://github.com/gufolabs/[email protected]

By the way, could You provide wheels for at least linux/arm64?

Reproduce the code example:

No response

Error message:

error[E0583]: file not found for module `socket`
        --> src/lib.rs:16:1
         |
      16 | mod socket;
         | ^^^^^^^^^^^
         |
         = help: to create the module `socket`, create file "src/socket.rs" or "src/socket/mod.rs"
         = note: if there is a `mod socket` elsewhere in the crate already, import it with `use crate::...` instead
      
      error[E0432]: unresolved imports `crate::auth::AuthKey`, `crate::auth::SnmpAuth`
       --> src/util.rs:8:19
        |
      8 | use crate::auth::{AuthKey, SnmpAuth};
        |                   ^^^^^^^  ^^^^^^^^ no `SnmpAuth` in `auth`
        |                   |
        |                   no `AuthKey` in `auth`
      
      error[E0433]: failed to resolve: could not find `op` in `snmp`
        --> src/lib.rs:43:25
         |
      43 |     m.add_class::<snmp::op::GetIter>()?;
         |                         ^^ could not find `op` in `snmp`
      
      error[E0412]: cannot find type `SnmpV1ClientSocket` in module `socket`
        --> src/lib.rs:40:27
         |
      40 |     m.add_class::<socket::SnmpV1ClientSocket>()?;
         |                           ^^^^^^^^^^^^^^^^^^ not found in `socket`
      
      error[E0412]: cannot find type `SnmpV2cClientSocket` in module `socket`
        --> src/lib.rs:41:27
         |
      41 |     m.add_class::<socket::SnmpV2cClientSocket>()?;
         |                           ^^^^^^^^^^^^^^^^^^^ not found in `socket`
      
      error[E0412]: cannot find type `SnmpV3ClientSocket` in module `socket`
        --> src/lib.rs:42:27
         |
      42 |     m.add_class::<socket::SnmpV3ClientSocket>()?;
         |                           ^^^^^^^^^^^^^^^^^^ not found in `socket`
      
      warning: unexpected `cfg` condition value: `gil-refs`
        --> src/error.rs:78:1
         |
      78 | / create_exception!(
      79 | |     _fast,
      80 | |     PySnmpError,
      81 | |     PyException,
      82 | |     "Base class for Gufo SNMP errors"
      83 | | );
         | |_^
         |
         = note: no expected values for `feature`
         = help: consider adding `gil-refs` as a feature in `Cargo.toml`
         = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
         = note: `#[warn(unexpected_cfgs)]` on by default
         = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unexpected `cfg` condition value: `gil-refs`
        --> src/error.rs:78:1
         |
      78 | / create_exception!(
      79 | |     _fast,
      80 | |     PySnmpError,
      81 | |     PyException,
      82 | |     "Base class for Gufo SNMP errors"
      83 | | );
         | |_^
         |
         = note: no expected values for `feature`
         = help: consider adding `gil-refs` as a feature in `Cargo.toml`
         = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
         = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unexpected `cfg` condition value: `gil-refs`
        --> src/error.rs:84:1
         |
      84 | / create_exception!(
      85 | |     _fast,
      86 | |     PySnmpDecodeError,
      87 | |     PySnmpError,
      88 | |     "Message decoding error"
      89 | | );
         | |_^
         |
         = note: no expected values for `feature`
         = help: consider adding `gil-refs` as a feature in `Cargo.toml`
         = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
         = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unexpected `cfg` condition value: `gil-refs`
        --> src/error.rs:90:1
         |
      90 | / create_exception!(
      91 | |     _fast,
      92 | |     PySnmpEncodeError,
      93 | |     PySnmpError,
      94 | |     "Message encoding error"
      95 | | );
         | |_^
         |
         = note: no expected values for `feature`
         = help: consider adding `gil-refs` as a feature in `Cargo.toml`
         = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
         = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unexpected `cfg` condition value: `gil-refs`
         --> src/error.rs:96:1
          |
      96  | / create_exception!(
      97  | |     _fast,
      98  | |     PyNoSuchInstance,
      99  | |     PySnmpError,
      100 | |     "Requested OID is not found"
      101 | | );
          | |_^
          |
          = note: no expected values for `feature`
          = help: consider adding `gil-refs` as a feature in `Cargo.toml`
          = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
          = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      warning: unexpected `cfg` condition value: `gil-refs`
         --> src/error.rs:102:1
          |
      102 | create_exception!(_fast, PySnmpAuthError, PySnmpError, "Authentication failed");
          | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
          = note: no expected values for `feature`
          = help: consider adding `gil-refs` as a feature in `Cargo.toml`
          = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
          = note: this warning originates in the macro `$crate::impl_exception_boilerplate` which comes from the expansion of the macro `create_exception` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      Some errors have detailed explanations: E0412, E0432, E0433, E0583.
      For more information about an error, try `rustc --explain E0412`.
      warning: `gufo_snmp` (lib) generated 10 warnings (4 duplicates)
      error: could not compile `gufo_snmp` (lib) due to 11 previous errors; 10 warnings emitted
      
      Caused by:
        process didn't exit successfully: `/Users/maciej/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc --crate-name gufo_snmp --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/_fast.cpython-312-darwin.so' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=15d6171dde2cc54f --out-dir /private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps -C strip=debuginfo -L dependency=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps --extern aes=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libaes-a046d0586dbf2ae8.rlib --extern cbc=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libcbc-02485906c0331782.rlib --extern cfb_mode=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libcfb_mode-7f1bfa41b6b6e101.rlib --extern cipher=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libcipher-85342e157b43b538.rlib --extern des=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libdes-0ea1efaaa878a008.rlib --extern digest=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libdigest-2d5e43f5cacece0b.rlib --extern enum_dispatch=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libenum_dispatch-08f79f3ed77e8d59.dylib --extern md5=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libmd5-7e996be842b87ab1.rlib --extern nom=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libnom-95c56ca85b9cf740.rlib --extern pyo3=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libpyo3-3b3f3e03d8fe3cfc.rlib --extern rand=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/librand-9b569dcb26e449f9.rlib --extern sha1=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libsha1-222677d8f92bf2db.rlib --extern socket2=/private/var/folders/28/nm6sx5rd0tnfnxq2bz6vwxlr0000gn/T/pip-install-o8kke4a_/gufo-snmp_d98a8fc8cbf44babb49e86a299d648ed/target/release/deps/libsocket2-7c050bfac5d92099.rlib` (exit status: 1)
      error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib -- -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/_fast.cpython-312-darwin.so'` failed with code 101
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gufo_snmp
Failed to build gufo_snmp

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (gufo_snmp)

Python version information

3.12

Gufo SNMP version information

0.6.0

Operation system version

N/A

@maciejpankanin maciejpankanin added the bug Something isn't working label Jan 14, 2025
@dvolodin7 dvolodin7 self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants