heinrich5991 / libtw2

Some Teeworlds stuff in Rust.™
Apache License 2.0
49 stars 17 forks source link

huffman: python package fails on ``proc_macro_span_shrink`` in nightly #87

Closed ChillerDragon closed 8 months ago

ChillerDragon commented 8 months ago

https://github.com/dtolnay/proc-macro2/pull/348#issuecomment-1258260927

$ pip install libtw2-huffman --break-system-packages --no-cache                                                                                          
Defaulting to user installation because normal site-packages is not writeable
Collecting libtw2-huffman
  Downloading libtw2_huffman-0.2.0.tar.gz (29 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: libtw2-huffman
  Building wheel for libtw2-huffman (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for libtw2-huffman (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off`
      🔗 Found uniffi bindings
         Compiling proc-macro2 v1.0.59
         Compiling unicode-ident v1.0.9
         Compiling quote v1.0.28
         Compiling serde v1.0.163
         Compiling thiserror v1.0.40
         Compiling semver v1.0.17
         Compiling serde_json v1.0.96
         Compiling camino v1.1.4
         Compiling memchr v2.5.0
         Compiling anyhow v1.0.71
         Compiling log v0.4.18
         Compiling version_check v0.9.4
         Compiling syn v1.0.109
         Compiling paste v1.0.12
         Compiling minimal-lexical v0.2.1
         Compiling mime v0.3.17
         Compiling ryu v1.0.13
         Compiling itoa v1.0.6
         Compiling once_cell v1.17.2
         Compiling unicase v2.6.0
         Compiling bytes v1.4.0
         Compiling static_assertions v1.1.0
      error[E0635]: unknown feature `proc_macro_span_shrink`
        --> /home/chiller/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
         |
      92 |     feature(proc_macro_span, proc_macro_span_shrink)
         |                              ^^^^^^^^^^^^^^^^^^^^^^

         Compiling plain v0.2.3
         Compiling fs-err v2.9.0
         Compiling siphasher v0.3.10
         Compiling askama_escape v0.10.3
      For more information about this error, try `rustc --explain E0635`.
      error: could not compile `proc-macro2` (lib) due to 1 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 "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-epylzuge/libtw2-huffman_3e2d95b30d654202b1a63197dab4ade0/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--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 libtw2-huffman
Failed to build libtw2-huffman
ERROR: Could not build wheels for libtw2-huffman, which is required to install pyproject.toml-based projects
$ rustc --version
rustc 1.77.0-nightly (5d3d3479d 2024-01-23)
$ python --version
Python 3.10.6
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
$ uname -a
Linux debian 6.1.0-16-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.67-1 (2023-12-12) x86_64 GNU/Linux
ChillerDragon commented 8 months ago

Okay this did the trick for me :shrug:

$ rustup default stable

seems like nightly is not supported