Closed lassos closed 7 years ago
Maybe try a newer version first? Your's is from 2016.
i have tried. new rust, new cargo. new librespot from git. trying to compile ends in:
mpd@multihome:/home/lars/system/librespot/librespot$ rustc -V
rustc 1.18.0 (03fc9d622 2017-06-06)
mpd@multihome:/home/lars/system/librespot/librespot$ cargo -V
cargo 0.19.0 (28d1d60d4 2017-05-16)
mpd@multihome:/home/lars/system/librespot/librespot$
multihome:/home/lars/system/librespot/librespot# RUST_BACKTRACE=1 cargo build --features pulseaudio-backend
Compiling rust-crypto v0.2.36
Compiling tokio-proto v0.1.1
Compiling protobuf_macros v0.6.0 (https://github.com/plietar/rust-protobuf-macros#f186dc5a)
Compiling tokio-signal v0.1.2
Compiling mdns v0.2.0 (https://github.com/plietar/rust-mdns#5fed5710)
error: failed to run custom build command for `rust-crypto v0.2.36`
process didn't exit successfully: `/home/lars/system/librespot/librespot/target/debug/build/rust-crypto-a8f95c01d61a1b38/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("i686-unknown-linux-gnu")
OPT_LEVEL = Some("0")
TARGET = Some("i686-unknown-linux-gnu")
TARGET = Some("i686-unknown-linux-gnu")
HOST = Some("i686-unknown-linux-gnu")
CFLAGS_i686-unknown-linux-gnu = None
CFLAGS_i686_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("debug")
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m32" "-march=i686" "-o" "/home/lars/system/librespot/librespot/target/debug/build/rust-crypto-972d13cdaabe6906/out/src/util_helpers.o" "-c" "src/util_helpers.c"
cargo:warning=src/util_helpers.c: Assembler messages:
cargo:warning=src/util_helpers.c:53: Error: bad register name `%sil'
ExitStatus(ExitStatus(256))
command did not execute successfully, got: exit code: 1
--- stderr
thread 'main' panicked at 'explicit panic', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:1152
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:371
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:511
6: gcc::fail
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:1152
7: gcc::run
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:1096
8: gcc::Config::compile_object
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:482
9: gcc::Config::compile_objects
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:448
10: gcc::Config::compile
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.45/src/lib.rs:398
11: build_script_build::main
at ./build.rs:38
12: std::panicking::try::do_call
at /checkout/src/libcore/ops.rs:2626
at /checkout/src/libstd/panicking.rs:454
13: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
14: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:433
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:57
15: main
16: <unknown>
Build failed, waiting for other jobs to finish...
Did you exec cargo clean
before?
not, i didn't. but with
cargo clean cargo build --features pulseaudio-backend
same error. not able to install rust-crypto
error: failed to run custom build command for rust-crypto v0.2.36
if i only run
cargo build --release
the compiling works, bit wihtout pulseaudio support. and i need pulse
Have you tried cross compiling it? Reading up on the error, it appears to occur when building rust crypto on i386-unknown-Linux-gnu. Try cross compilation and see if it builds
No chance. Building the binary and execute it ends in erros. Does librespot do not support 32 bit environment anymore ?
INFO:librespot: librespot (). Built on 2017-06-19.
INFO:librespot::session: Connecting to AP "lon3-accesspoint-a39.ap.spotify.com:4070"
INFO:librespot::session: Authenticated !
thread 'main' panicked at 'subscription terminated', /home/lars/system/librespot-9873eaf2a0df2c4f959024a21c7b28de59550a32/target/debug/build/librespot-cfad99f9ac34ca80/out/lib.rs:1517
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:371
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:511
6: <librespot::spirc::SpircTask as futures::future::Future>::poll
at ./build/librespot-cfad99f9ac34ca80/out/lib.rs:1517
7: <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/future/map_err.rs:29
8: <futures::future::chain::Chain<A, B, C>>::poll
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/future/chain.rs:31
9: <futures::future::and_then::AndThen<A, B, F> as futures::future::Future>::poll
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/future/and_then.rs:31
10: <futures::task_impl::Spawn<F>>::poll_future::{{closure}}
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:312
11: <futures::task_impl::Spawn<T>>::enter::{{closure}}
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:399
12: futures::task_impl::set::{{closure}}
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:50
13: <std::thread::local::LocalKey<T>>::with
at /checkout/src/libstd/thread/local.rs:253
14: futures::task_impl::set
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:47
15: <futures::task_impl::Spawn<T>>::enter
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:399
16: <futures::task_impl::Spawn<F>>::poll_future
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.9/src/task_impl/mod.rs:312
17: tokio_core::reactor::Core::run::{{closure}}
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.4/src/reactor/mod.rs:231
18: <scoped_tls::ScopedKey<T>>::set
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.0/src/lib.rs:135
19: tokio_core::reactor::Core::run
at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.4/src/reactor/mod.rs:230
20: librespot::main
at /home/lars/system/librespot-9873eaf2a0df2c4f959024a21c7b28de59550a32/src/main.rs:175
21: std::panicking::try::do_call
at /checkout/src/libcore/ops.rs:2626
at /checkout/src/libstd/panicking.rs:454
22: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
23: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:433
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:57
24: main
and build another binary, still the same. no error in compiling. starting librespot now comes up with
cargo clean
cargo build --release --no-default-features --features pulseaudio-backend
...
Compiling vorbis v0.1.0
Compiling mdns v0.2.0 (https://github.com/plietar/rust-mdns#5fed5710)
Compiling tokio-proto v0.1.1
Compiling tokio-signal v0.1.2
Compiling hyper v0.11.0-a.0 (https://github.com/hyperium/hyper#fed04dfb)
Compiling env_logger v0.4.2
Compiling syntex_syntax v0.58.1
Compiling aster v0.41.0
Compiling syntex v0.58.1
Compiling protobuf_macros v0.6.0 (https://github.com/plietar/rust-protobuf-macros#f186dc5a)
Compiling librespot v0.1.0 (file:///home/lars/system/librespot)
Finished release [optimized] target(s) in 297.87 secs
------------------------------
INFO:librespot: librespot 2259188 (2017-06-14). Built on 2017-06-19.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 92, message: "Protocol not available" } }', /checkout/src/libcore/result.rs:859
note: Run with `RUST_BACKTRACE=1` for a backtrace.
INFO:librespot: librespot 2259188 (2017-06-14). Built on 2017-06-19.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 92, message: "Protocol not available" } }', /checkout/src/libcore/result.rs:859
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:371
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:511
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:495
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:471
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:69
9: core::result::unwrap_failed
10: librespot::main
11: std::panicking::try::do_call
at /checkout/src/libcore/ops.rs:2626
at /checkout/src/libstd/panicking.rs:454
12: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
13: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:433
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:57
14: main
15: <unknown>
You still have an active premium account? Error message in https://github.com/plietar/librespot/issues/203#issuecomment-309402571 suspiciously says "subscription terminated". BTW, how did you get to compile without error?
i just compiled with
cargo build --release --no-default-features --features pulseaudio-backend
instead of
cargo build --release --features pulseaudio-backend
Yes, i definatelly have a premium account .-)
So,i at the moment i updated my os from wheezy to jessie . Maybe this will help ?
With docker i wasnt be able to cross compile.
Last time I tried to run on a Wheezy system I found the version of libc was too old
Both runtime errors sound like a network problem to me. Do you have a default IPv4 route to the internet? And no firewall or the like blocking stuff?
Maybe the ip range is blocked from spotify ? I can see in the spotify app the conntcted client multihome, if i tried to connect it fails. there is no error output and the client is not visible anymore.
mpd@multihome:/home/lars/system/librespot/target/debug$ /usr/bin/librespot /root//spotify-connect-web-chroot/usr/src/app/spotify_appkey.key --username --password --bitrate 320 --name multihome --backend pulseaudio
INFO:librespot::main_helper: librespot 7fd8503 (2016-12-30). Built on 2016-12-30.
INFO:librespot::session: Connecting to AP lon3-accesspoint-a49.ap.spotify.com:4070
INFO:librespot::session: Authenticated !
DEBUG:librespot::audio_backend::pulseaudio: Using PulseAudio sink
so everything looks fine. shit. i loved librespot and i switched back to spotify from tifal cause of librespot . tidal supports dlna/upnp.
multihome:/home/lars/system/librespot/target/debug# ifconfig
eth0 Link encap:Ethernet Hardware Adresse 00:25:90:73:fd:28
inet Adresse:192.XXX.XXX.XXX Bcast:192.168.2.255 Maske:255.255.255.0
inet6-Adresse: fe80::225:90ff:fe73:fd28/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:909407 errors:0 dropped:427 overruns:0 frame:0
TX packets:479549 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:798975713 (761.9 MiB) TX bytes:110156205 (105.0 MiB)
Interrupt:11 Speicher:fbb00000-fbb20000
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metrik:1
RX packets:40822 errors:0 dropped:0 overruns:0 frame:0
TX packets:40822 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:2768646 (2.6 MiB) TX bytes:2768646 (2.6 MiB)
multihome:/home/lars/system/librespot/target/debug# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ssh tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
multihome:/home/lars/system/librespot/target/debug# cat /etc/hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
multihome:/home/lars/system
EDIT by @plietar, fixed the formatting of snippets. In the future please wrap them in triple backticks, it makes them much simpler to read
OK. Got it working. I have done so many things that i can't really say why it now works. Maybe the upgrade to jessie .-)
Thanks for your help. Yes, next time i will do a better formated post.
Thread could be closed
I've also tried with pulseaudio on an old Ubuntu running on an 32bit x86 box, and it worked, compiled with:
cargo build --release --no-default-features --features pulseaudio-backend
Great that it worked for you now.
Btw, you should be able to close this issue yourself.
hi, i have nothing changed in system. since a while i start librespot, the device is visible. trying to connect will timeout and the device is not visible anymore.
got no erros with backtrace. anyone a hint for me ?
multihome:/var/log# su mpd mpd@multihome:/var/log$ RUST_BACKTRACE=1 /usr/bin/librespot /root//spotify-connect-web-chroot/usr/src/app/spotify_appkey.key --username XXX--password XXX--bitrate 320 --name XXX--backend pulseaudio INFO:librespot::main_helper: librespot 7fd8503 (2016-12-30). Built on 2016-12-30. INFO:librespot::session: Connecting to AP gew1-accesspoint-b-2d7t.ap.spotify.com:4070 INFO:librespot::session: Authenticated ! DEBUG:librespot::audio_backend::pulseaudio: Using PulseAudio sink