-
Notifications
You must be signed in to change notification settings - Fork 654
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
Improving MIPS and MIPSEL support (regarding AtomicU64 and Rust Version) #1460
Comments
Feel free to open a PR with these changes. Sounds like nothing major and it seems somewhere
We recently bumped the MSRV to |
First of all thanks for opening my eyes to who and why is using Just to throw it out there, in CamilaDSP style we could also introduce a |
Hi @photovoltex , hi @roderickvd , thank you for the quick reply. > Feel free to open a PR with these changes. > Does rust-version > 1.74 block compiling all together, or what exactly is the current state of things there? > CamilaDSP style we could also introduce a |
Ugh, what a bummer. Well I did a look into the work that needs to be done:
|
FYI - I suggested to remove MIPS target from the Docker image used to cross-compile at #1299. At that time I had issues even with 1.73. |
Wouldn't that mean |
Hi, yes, version
And this is more or less what I submitted as a PR 3 days ago. Previous versions (e.g. |
I'm referring to the rust-version downgrade that you suggested so that we could compile for MIPS again. If it's, as @starypatyk pointed out, and even |
Hi, I have no issues compiling versions
Compiling version |
Hi,
up to including version 0.6. libresport can be compiled for MIPS and MIPSEL targets (to be more precise: mips-unknown-linux-musl and mipsel-unknown-linux-musl). This is useful for routers running OpenWRT, since many of them are based on these targets.
However, there are 2 issues that make it difficult to compile:
1) AtomicU64: MIPS and MIPSEL [and PowerPC (?)] don't support this, since they are 32 bit. However, there is a crate that provides shims for these platforms. When it detects it is running on unsupported platforms, it fallbacks to the shim implementation, using crossbeam Mutex. For supported platforms, there should be no change.
This can easily be implemented by changing the 1st line in
./playback/src/mixer/softmixer.rs
fromuse std::sync::atomic::{AtomicU64, Ordering};
to
use atomic_shim::AtomicU64;
use std::sync::atomic::{Ordering};
2) Rust Version: librespot v0.6. defaults to Rust version 1.75. However, in this version both MIPS and MIPSEL were moved to Tier 3. librespot v0.6 still builds fine with Rust version 1.74 -- so I suggest sticking to this version for a bit longer. I know, sounds like a big decision, but this will keep librespot viable for OpenWRT routers for a longer period of time.
This can easily be implemented by changing the 4th line in
./Cargo.toml
fromrust-version = "1.75"
to
rust-version = "1.74"
FYI: There is one more thing: OpenSSL headers are missing for MIPS, but this is currently being fixed somewhere else, see
aws/aws-lc#2143
I didn't create a patch or similar since only 2 lines of code need to be changed (and since I don't really know the proper way of doing this).
The text was updated successfully, but these errors were encountered: