These are chat archives for librespot-org/spotify-connect-resources

5th
Mar 2018
Daniel Bischof
@dbischof90
Mar 05 2018 12:05 UTC
I finally compiled it for OpenWRT
Have you had any cases where discovery mode wouldn't work?
Michael Herger
@michaelherger
Mar 05 2018 12:08 UTC
There's conflicts with avahi, iirc. If you have avahi configured on your system you should compile with with-dns-sd
Daniel Bischof
@dbischof90
Mar 05 2018 12:28 UTC
Eh, that gave other problems. sigh
But thanks for the tip.
For another time then.
Michael Herger
@michaelherger
Mar 05 2018 12:41 UTC
What kind of other problems? I might be venturing in to that territory at some not too distant point...
Daniel Bischof
@dbischof90
Mar 05 2018 12:42 UTC
   Compiling dns-sd v0.1.3                                                                                                                                                                                  
error: failed to run custom build command for `dns-sd v0.1.3`                                                                                                                                                                             
process didn't exit successfully: `/home/rust/src/target/release/build/dns-sd-f0de00d88825eb7e/build-script-build` (exit code: 101)                                                                                                                                                                                                   
--- stderr                                                                                                                                                                                                                                                                                                                                                                         
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override"', /checkout/src/libcore/result.rs:916:5                                                                                                                                                                                            
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Michael Herger
@michaelherger
Mar 05 2018 12:44 UTC
I gave up cross-compiling long ago... I just install the additional musl target and compile directly.
Daniel Bischof
@dbischof90
Mar 05 2018 12:44 UTC
Yes, but I wanted to have armv7 portaudio support
And that is a little nasty without an actual ARM processor
I kinda botched my raspberry already. :D
Michael Herger
@michaelherger
Mar 05 2018 12:46 UTC
get another SD card for the build environment :-). Or backup images and re-write them.
Paul Liétar
@plietar
Mar 05 2018 14:12 UTC
The embedded mdns responder mostly works even with avahi running next to it
Unless avahi is configured with a special flag
Michael Herger
@michaelherger
Mar 05 2018 14:13 UTC
Ah, ok
thanks
Paul Liétar
@plietar
Mar 05 2018 14:15 UTC
Although if you have avahi and can get dns-sd to cross compile then I'd recommend you use it, since the embedded responder is just my probably-not-RFC-compliant implementation
I added it pretty much only to make cross compiling easier
Daniel Bischof
@dbischof90
Mar 05 2018 17:23 UTC
I got crosscompile to OpenWRT working!
On my normal laptop
That took a while but I know now the problems :D
Before was only over some strange environment set up on my pi
Now I can work on the actual problems. @plietar , do you know why the discovery might not work?
Daniel Bischof
@dbischof90
Mar 05 2018 17:29 UTC
With my credentials I can log in
Sasha Hilton
@sashahilton00
Mar 05 2018 17:58 UTC
@dbischof90 if you get a moment could you document it on the wiki?
Daniel Bischof
@dbischof90
Mar 05 2018 18:00 UTC
I can
I honestly just figured out that I compiled without the audio-backend. ahem. :D
But I think I understand what you can do about that. I installed the packages on the openwrt side and copied the compiled libraries from /usr/lib to the library folder on my laptop of the compile chain. That changed the errors to something reasonable for now :P
I'll write down what worked, it feels like I'm not far away anymore from the whole deal.
Hopefully I can write down the whole thing.
Sasha Hilton
@sashahilton00
Mar 05 2018 18:08 UTC
Nice, ty
Daniel Bischof
@dbischof90
Mar 05 2018 18:12 UTC
Seems that alsa is the most promising.
I get a linker error
/home/daniel/.cargo/git/checkouts/rust-alsa-2497a722b20921c0/8c63543/src/alsa.rs:132: undefined reference to `snd_pcm_writei'
etc
Is it possible that I have to supply additional *.so's for that? So far I only copied the libs from my router
Daniel Bischof
@dbischof90
Mar 05 2018 18:17 UTC
There is a folder /usr/share/alsa/ though.
Sasha Hilton
@sashahilton00
Mar 05 2018 18:18 UTC
Audio is such a pain. It's why I'm hoping coal will fix it. I'm going to try cross compiling coal tonight to see if it will work
Daniel Bischof
@dbischof90
Mar 05 2018 18:27 UTC
It is
Daniel Bischof
@dbischof90
Mar 05 2018 18:34 UTC
Okay, I think I at least understand the alsa issue.
So I went to that piece of code and checked the error and it's referring to a function in the ffi
The folder contains alsa.rs and ffi.rs
ffi.rs looks autocreated. I guess the compiler simply doesn't have it.
So they might call a function in the alsa Rust module that the C compiler simply doesn't have
Daniel Bischof
@dbischof90
Mar 05 2018 19:20 UTC
It's a little frustrating since I know that those packages exist compiled for the corresponding distribution.
I'm of course not sure whether they were compiled with my specific SDK - after all, I'm using the OpenWRT SDK and I am using LEDE on my router, which is a fork.
Daniel Bischof
@dbischof90
Mar 05 2018 19:31 UTC
Guess I could try that out. Quite the effort :(
Daniel Bischof
@dbischof90
Mar 05 2018 20:03 UTC
Found another way. Still no success. Well, I'm gonna stop for now - we see that it works in theory if we fix the audio backend issue. Another plus for the mentioned rust backend...