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

No longer compiles (stable, beta and nightly) #1025

Open
mucinoab opened this issue Sep 24, 2022 · 4 comments
Open

No longer compiles (stable, beta and nightly) #1025

mucinoab opened this issue Sep 24, 2022 · 4 comments

Comments

@mucinoab
Copy link
Contributor

I think is due the the changes in the memory layout of SocketAddrV4 ( Rust-1.64, compatibility-notes).

Updating some of our dependencies should fix it.

image

❯ rustc --version --verbose

rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: x86_64-unknown-linux-gnu
release: 1.64.0
LLVM version: 14.0.6

@siris
Copy link

siris commented Nov 5, 2022

I have confirmed this is also impacting spotify-tui compilations with Rust 1.65.0 (as expected) that was just released:

cargo build
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
   --> /home/ss/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.12/src/sockaddr.rs:176:9
    |
176 |         mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
    |
    |
    = note: source type: `SocketAddrV4` (48 bits)
    = note: target type: `sockaddr_in` (128 bits)

This fix is quite simple: the socket2 crate just needs to be updated:

cargo update -p socket2
    Updating crates.io index
    Updating socket2 v0.3.12 -> v0.3.19

Once that is done I have confirmed cargo build work fine the latest HEAD commit of spotify-tui:

cargo build
  Downloaded socket2 v0.3.19
  Downloaded 1 crate (33.8 KB) in 0.33s
   Compiling spotify-tui v0.25.0 (/home/ss/Repos/spotify-tui)
    Finished dev [unoptimized + debuginfo] target(s) in 20.26s

To further confirm running a cargo install --path . on the latest HEAD commit also works:

cargo install --path .
 Installing spotify-tui v0.25.0 (/home/ss/Repos/spotify-tui)
  Installing /home/ss/.cargo/bin/spt
   Installed package `spotify-tui v0.25.0 (/home/ss/Repos/spotify-tui)` (executable `spt`)

spt --version
spotify-tui 0.25.0

A quick PR with this Cargo.lock update along with a new patch release should fix this fully for Rust 1.64.0 and beyond.

@siris
Copy link

siris commented Nov 5, 2022

@Rigellute this is a pretty critical issue as compilations of spotify-tui are completely broken on Rust 1.64.0 and beyond. This breaks any Linux distro or user trying to compile it as part of package management systems or directly from git.

I have tested and verified the fix above and it looks like an automated Cargo.lock PR #990 already is opened with the required fix.

When possible can that PR be merged and a new patch Crate version be released of spotify-tui (v0.25.1) to resolve this?

@siris
Copy link

siris commented Nov 5, 2022

Reference Funtoo Linux Bug tracking this: https://bugs.funtoo.org/browse/FL-10687

@siris
Copy link

siris commented Nov 21, 2022

@Rigellute bump on this issue. Is there any possibility of someone reviewing PR #990, getting it merged and doing a quick patch version release of spotify-tui so it can successfully compile with Rust 1.64.0 and beyond?

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Jul 12, 2023
Doesn't build with Rust >= 1.64
Rigellute/spotify-tui#1025

Dead upstream (236 open issues, among which #1025 and #1000,
40 open PRs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants