Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.8k stars 444 forks source link

Failed to install `ipv8-rust-tunnels` #7922

Closed drew2a closed 7 months ago

drew2a commented 7 months ago

Describe the bug I've updated to the most recent main branch, saw a notification about the necessity to install new packages, tried to install them, but encountered an error.

To Reproduce

  1. Checkout the most recent main branch
  2. Install requirements.txt

Desktop (please complete the following information):

Additional context

Collecting ipv8-rust-tunnels==0.1.15
  Using cached ipv8_rust_tunnels-0.1.15.tar.gz (38 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: ipv8-rust-tunnels
  Building wheel for ipv8-rust-tunnels (pyproject.toml): started
  Building wheel for ipv8-rust-tunnels (pyproject.toml): finished with status 'error'
Failed to build ipv8-rust-tunnels

  error: subprocess-exited-with-error

  × Building wheel for ipv8-rust-tunnels (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [86 lines of output]
      Running `maturin pep517 build-wheel -i /Users/drew2a/Projects/github.com/Tribler/tribler/venv/bin/Python --compatibility off`
      📦 Including license file "/private/var/folders/mg/7124pd9x7q545c5zphg6q2cc0000gn/T/pip-install-qtb1iaid/ipv8-rust-tunnels_3092e3477f384d11adb9268f4c8224e9/LICENSE"
      🍹 Building a mixed python/rust project
      🔗 Found pyo3 bindings
      🐍 Found CPython 3.9 at /Users/drew2a/Projects/github.com/Tribler/tribler/venv/bin/Python
      📡 Using build options features from pyproject.toml
      💻 Using `MACOSX_DEPLOYMENT_TARGET=10.7` for x86_64-apple-darwin by default
         Compiling libc v0.2.153
         Compiling cfg-if v1.0.0
         Compiling proc-macro2 v1.0.78
         Compiling unicode-ident v1.0.12
         Compiling target-lexicon v0.12.13
         Compiling version_check v0.9.4
         Compiling typenum v1.17.0
         Compiling autocfg v1.1.0
         Compiling parking_lot_core v0.9.9
         Compiling once_cell v1.19.0
         Compiling scopeguard v1.2.0
         Compiling smallvec v1.13.1
         Compiling memchr v2.7.1
         Compiling thiserror v1.0.57
         Compiling async-trait v0.1.77
         Compiling heck v0.4.1
         Compiling pin-project-lite v0.2.13
         Compiling bytes v1.5.0
         Compiling regex-syntax v0.8.2
         Compiling subtle v2.5.0
         Compiling zeroize v1.7.0
         Compiling cpufeatures v0.2.12
         Compiling opaque-debug v0.3.0
         Compiling ppv-lite86 v0.2.17
         Compiling unindent v0.2.3
         Compiling termcolor v1.4.1
         Compiling indoc v2.0.4
         Compiling generic-array v0.14.7
         Compiling log v0.4.20
         Compiling lock_api v0.4.11
         Compiling aho-corasick v1.1.2
         Compiling memoffset v0.9.0
         Compiling humantime v2.1.0
         Compiling arc-swap v1.6.0
         Compiling map-macro v0.2.6
         Compiling quote v1.0.35
         Compiling syn v2.0.49
         Compiling getrandom v0.2.12
         Compiling socket2 v0.5.5
         Compiling mio v0.8.10
         Compiling signal-hook-registry v1.4.1
         Compiling num_cpus v1.16.0
         Compiling is-terminal v0.4.12
         Compiling rand_core v0.6.4
         Compiling regex-automata v0.4.5
         Compiling pyo3-build-config v0.20.2
         Compiling rand_chacha v0.3.1
         Compiling rand v0.8.5
         Compiling parking_lot v0.12.1
         Compiling crypto-common v0.1.6
         Compiling inout v0.1.3
         Compiling universal-hash v0.5.1
         Compiling aead v0.5.2
         Compiling cipher v0.4.4
         Compiling poly1305 v0.8.0
         Compiling pyo3-ffi v0.20.2
         Compiling pyo3 v0.20.2
         Compiling chacha20 v0.9.1
         Compiling chacha20poly1305 v0.10.1
         Compiling regex v1.10.3
         Compiling env_logger v0.10.2
         Compiling pyo3-macros-backend v0.20.2
         Compiling thiserror-impl v1.0.57
         Compiling tokio-macros v2.2.0
         Compiling tokio v1.36.0
         Compiling pyo3-macros v0.20.2
         Compiling socks5-proto v0.4.0
      error: `std::net::SocketAddr::new` is not yet stable as a const fn
        --> /Users/drew2a/.cargo/registry/src/github.com-1ecc6299db9ec823/socks5-proto-0.4.0/src/address.rs:98:32
         |
      98 |         Address::SocketAddress(SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0))
         |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      error: could not compile `socks5-proto` due to previous error
      warning: build failed, waiting for other jobs to finish...
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO MACOSX_DEPLOYMENT_TARGET="10.7" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.9-64bit" PYO3_PYTHON="/Users/drew2a/Projects/github.com/Tribler/tribler/venv/bin/Python" PYTHON_SYS_EXECUTABLE="/Users/drew2a/Projects/github.com/Tribler/tribler/venv/bin/Python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/private/var/folders/mg/7124pd9x7q545c5zphg6q2cc0000gn/T/pip-install-qtb1iaid/ipv8-rust-tunnels_3092e3477f384d11adb9268f4c8224e9/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/ipv8_rust_tunnels.rust_endpoint.cpython-39-darwin.so"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/Users/drew2a/Projects/github.com/Tribler/tribler/venv/bin/Python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ipv8-rust-tunnels
ERROR: Could not build wheels for ipv8-rust-tunnels, which is required to install pyproject.toml-based projects
egbertbouman commented 7 months ago

Strange, it builds just fine on the mac builder. Sounds like this could be a versioning problem. To avoid having to troubleshoot random build problems, I'll add Python 3.8 - 3.10 MacOS binaries to PyPi.