dheijl / swyh-rs

Stream What You Hear written in rust, inspired by SWYH.
MIT License
364 stars 15 forks source link

IM confused asf i need linux rpi 5 version for ubuntu #155

Open jamieduk opened 3 hours ago

jamieduk commented 3 hours ago

IM confused asf I need linux rpi 5 (ARM 64 Bit) version for Ubuntu and you not named anything descriptive its meaningless names on your files be explicit what is what! re do your releases then reply when done so I can go and see,

I dont use app image I use binary or source or script only not app images they are no good for Ubuntu on rpi 5 i dont have a clue about that stuff! thank you!

To clarify I expect to see releases in format of what its intended for by name like for example

Windows 64 Bit Binary Linux Ubuntu 64 Bit Binary Linux ARM 64 Bit (RPI 5) Binary Linux Source Code

etc etc simple asf please do this asap! reply when done!

Also supply meaningful install instructions for linux for the source please, I cant find instructions anywhere assume im dumb asf and give clear step by step instructions TY. (Im not a mind reader).

I expect to know where to put the files first of all it go in web folder ? then tell me commands to install it along with options if any that are needed!

Then explain how to start as a stand alone (one off to try it) or as a service (so it auto starts) would be helpful too.

So far assuming some things i running like this, is this correct?

root@jnetreloaded:/var/www/radio# ./buildall

error: no such command: fmt

sudo apt install -y fmt [sudo] password for jay: Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package fmt

cargo search cargo-fmt Updating crates.io index cargo-fmt = "0.0.0" # Allows rustfmt to be called through cargo prettythanks = "0.1.0" # A simple frontend to dtolnay/prettyplease library rustfmt-unstable = "1.0.0" # A wrapper around cargo fmt or rustfmt for parsing a config file and passing it as cli args inste… commitment = "0.2.3" # Simplify your Git pre-commit hooks harbor = "0.1.0" # Project manager for CoreOS fleets. tiny-media-server = "0.1.0" # media server for your videos cargo-fmtq = "0.1.0" # Squatting this crate because I have ideas. Contact me if you have ideas too jay@jnetreloaded:~/Documents/Scripts/PYTHON/yt-dl$

jamieduk commented 2 hours ago
error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:1:37 1 use std::sync::{atomic::AtomicBool, LazyLock}; ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:19:21 19 pub static CLIENTS: LazyLock<RwLock<HashMap<String, ChannelStream>>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:22:24 22 ...L: LazyLock<RwLock<(Sender, Receiver)>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:25:20 25 pub static CONFIG: LazyLock<RwLock> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

For more information about this error, try rustc --explain E0658. error: could not compile swyh-rs (lib) due to 10 previous errors Downloaded paste v1.0.15 Downloaded ttf-parser v0.25.0 Downloaded cmk v0.1.2 Downloaded fltk v1.4.35 Downloaded fltk-theme v0.7.3 Downloaded fltk-sys v1.4.35 Downloaded 6 crates (9.7 MB) in 8.09s (largest was fltk-sys at 9.3 MB) Compiling cmk v0.1.2 Compiling paste v1.0.15 Compiling ttf-parser v0.25.0 Compiling swyh-rs v1.12.0 (/var/www/radio) Compiling fltk-sys v1.4.35 Compiling fltk v1.4.35 Compiling fltk-theme v0.7.3 error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:1:37 1 use std::sync::{atomic::AtomicBool, LazyLock}; ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:19:21 19 pub static CLIENTS: LazyLock<RwLock<HashMap<String, ChannelStream>>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:22:24 22 ...L: LazyLock<RwLock<(Sender, Receiver)>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:25:20 25 pub static CONFIG: LazyLock<RwLock> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

For more information about this error, try rustc --explain E0658. error: could not compile swyh-rs (lib) due to 10 previous errors warning: build failed, waiting for other jobs to finish...

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:1:37 1 use std::sync::{atomic::AtomicBool, LazyLock}; ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:19:21 19 pub static CLIENTS: LazyLock<RwLock<HashMap<String, ChannelStream>>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:22:24 22 ...L: LazyLock<RwLock<(Sender, Receiver)>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:25:20 25 pub static CONFIG: LazyLock<RwLock> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

For more information about this error, try rustc --explain E0658. error: could not compile swyh-rs (lib) due to 10 previous errors warning: build failed, waiting for other jobs to finish... Compiling cmk v0.1.2 Compiling paste v1.0.15 Compiling ttf-parser v0.25.0 Compiling swyh-rs v1.12.0 (/var/www/radio) Compiling fltk-sys v1.4.35 Compiling fltk v1.4.35 Compiling fltk-theme v0.7.3 error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:1:37 1 use std::sync::{atomic::AtomicBool, LazyLock}; ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:19:21 19 pub static CLIENTS: LazyLock<RwLock<HashMap<String, ChannelStream>>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:22:24 22 ...L: LazyLock<RwLock<(Sender, Receiver)>> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:25:20 25 pub static CONFIG: LazyLock<RwLock> = ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:20:5 20 LazyLock::new( RwLock::new(HashMap::new())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:23:5 23 LazyLock::new( RwLock::new(unbounded())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

error[E0658]: use of unstable library feature 'lazy_cell' --> src/globals/statics.rs:26:5 26 LazyLock::new( RwLock::new(Configuration::read_config())); ^^^^^^^^^^^^^

= note: see issue #109736 https://github.com/rust-lang/rust/issues/109736 for more information

For more information about this error, try rustc --explain E0658. error: could not compile swyh-rs (lib) due to 10 previous errors warning: build failed, waiting for other jobs to finish...

dheijl commented 1 hour ago

I'm sorry but I can't support RPI or MAC Os, only X86-64.

If you want to build for RPI (native or cross-compile) you need Rust version 1.80 or later.

You will also have to look at all the prerequisites of the dependencies of swyh-rs, for instance fltk-rs needs a lot of libraries.

In case it is any help this is what I do on Ubuntu/Debian (x86-64) before I can build an run swyh-rs:

- install libraries to enable compiling fltk-rs:
    sudo apt-get install libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev

- install libasound2-dev to enable compiling the rust cpal sound library:
    sudo apt-get install libasound2-dev

- enable ufw rules for DLNA/UPNP and swyh-rs streaming:
    sudo ufw allow in from 192.168.0.0/24 to any port 1900 proto udp
       sudo ufw allow in from fc00::/7 to any port 1900 proto udp
       sudo ufw allow in from 192.168.0.0/24 to any port 32000:60000 proto udp
       sudo ufw allow in from fc00::/7 to any port 32000:60000 proto udp
       sudo ufw allow in from 192.168.0.0/24 to any port 5901  proto tcp
       sudo ufw allow in from fc00::/7 to any port 5901 proto tcp
       sudo ufw reload

Let me know if you can get it to work.

jamieduk commented 1 hour ago

cargo ./buildall error: running ./buildall requires -Zscript root@jnetreloaded:/var/www/radio#

how do i try and compile ? i tried just ./buildall and cargo ./buildall im trying to compile this on arm 64 bit ubuntu

i installed all you said required and im new to rust i just need the commands you used to compile...

dheijl commented 1 hour ago

buildall is a shell script that runs cargo. It's not a cargo command.

Just type ./buildall at the shell prompt (or have a look at the contents to see what it does).

jamieduk commented 1 hour ago

Nice i can share the compiled arm version so you can put in your releases and this is how i compiloed it (add these instructions to your readme.md file

To compile for ARM Linux Ubuntu (64 Bit)


RUSTUP_INIT_SKIP_PATH_CHECK=yes curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

press y enter and then 1 enter

(relaunch the terminal)

- install libraries to enable compiling fltk-rs:

sudo apt install -y libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev

- install libasound2-dev to enable compiling the rust cpal sound library:

sudo apt install -y libasound2-dev

- enable ufw rules for DLNA/UPNP and swyh-rs streaming:
    sudo ufw allow in from 192.168.0.0/24 to any port 1900 proto udp
       sudo ufw allow in from fc00::/7 to any port 1900 proto udp
       sudo ufw allow in from 192.168.0.0/24 to any port 32000:60000 proto udp
       sudo ufw allow in from fc00::/7 to any port 32000:60000 proto udp
       sudo ufw allow in from 192.168.0.0/24 to any port 5901  proto tcp
       sudo ufw allow in from fc00::/7 to any port 5901 proto tcp
       sudo ufw reload

       (install rust and cargo)
       dl the repo 
       ./buildall

       then a target folder is created with the binary in

       swyh-rs-1.12.0/target/release

       To Start....
       ./rs-cli  
     Or ./swyh-rs

It Works!

jamieduk commented 1 hour ago

swyh-rs-ARM-64.zip

dheijl commented 50 minutes ago

Very nice!

However, I would prefer it if you could set up a Github repo with your compiled Arm versions. I can then link to your repo for Arm binaries.

jamieduk commented 44 minutes ago

ok il set one up for you... https://github.com/jamieduk/SWYH-ARM-64Bit-Linux

im working onit now will be live in a lil bit!

jamieduk commented 33 minutes ago

Its now ready and live https://github.com/jamieduk/SWYH-ARM-64Bit-Linux

jamieduk commented 29 minutes ago

Also its now in Releases https://github.com/jamieduk/SWYH-ARM-64Bit-Linux/releases/tag/ARM64