[GH-ISSUE #337] Could not compile librespot-audio #222

Closed
opened 2026-02-27 19:29:29 +03:00 by kerem · 5 comments
Owner

Originally created by @jtonk on GitHub (Jun 7, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/337

I'm getting an error on latest version on an RPI, OSX and Ubuntu for Windows.
any idea why?

~/librespot $ cargo build --release

Compiling librespot-audio v0.1.0 (file:///opt/librespot/librespot/audio)
error[E0407]: method source is not a member of trait error::Error
--> audio/src/lewton_decoder.rs:78:5
|
78 | / fn source(&self) -> Option<&(dyn error::Error + 'static)> {
79 | | error::Error::source(&self.0)
80 | | }
| |_____^ not a member of trait error::Error

Originally created by @jtonk on GitHub (Jun 7, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/337 I'm getting an error on latest version on an RPI, OSX and Ubuntu for Windows. any idea why? ~/librespot $ cargo build --release Compiling librespot-audio v0.1.0 (file:///opt/librespot/librespot/audio) error[E0407]: method `source` is not a member of trait `error::Error` --> audio/src/lewton_decoder.rs:78:5 | 78 | / fn source(&self) -> Option<&(dyn error::Error + 'static)> { 79 | | error::Error::source(&self.0) 80 | | } | |_____^ not a member of trait `error::Error`
kerem closed this issue 2026-02-27 19:29:29 +03:00
Author
Owner

@bodiroga commented on GitHub (Jun 22, 2019):

+1

EDIT: this is the error I get when trying to compile the program with 'verbose' option enabled.

   Compiling librespot-audio v0.1.0 (file:///home/pi/librespot/audio)
     Running `rustc --crate-name librespot_audio audio/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=3981ea95949a511e -C extra-filename=-3981ea95949a511e --out-dir /home/pi/librespot/target/release/deps -L dependency=/home/pi/librespot/target/release/deps --extern aes_ctr=/home/pi/librespot/target/release/deps/libaes_ctr-691b7738200d4255.rlib --extern bit_set=/home/pi/librespot/target/release/deps/libbit_set-ca668c96bc990ab1.rlib --extern byteorder=/home/pi/librespot/target/release/deps/libbyteorder-99ad9f1633171ff4.rlib --extern futures=/home/pi/librespot/target/release/deps/libfutures-d8fdd6976bd80ee2.rlib --extern lewton=/home/pi/librespot/target/release/deps/liblewton-d6576591a184d650.rlib --extern librespot_core=/home/pi/librespot/target/release/deps/liblibrespot_core-3d2e894f936c152a.rlib --extern log=/home/pi/librespot/target/release/deps/liblog-22b9caffd792a5ec.rlib --extern num_bigint=/home/pi/librespot/target/release/deps/libnum_bigint-46a84facb1c7cca8.rlib --extern num_traits=/home/pi/librespot/target/release/deps/libnum_traits-2bcaf7134073ee49.rlib --extern tempfile=/home/pi/librespot/target/release/deps/libtempfile-6b5d4093e2dbf0b8.rlib`
error[E0407]: method `source` is not a member of trait `error::Error`
  --> audio/src/lewton_decoder.rs:78:5
   |
78 | /     fn source(&self) -> Option<&(dyn error::Error + 'static)> {
79 | |         error::Error::source(&self.0)
80 | |     }
   | |_____^ not a member of trait `error::Error`

error[E0599]: no function or associated item named `source` found for type `std::error::Error` in the current scope
  --> audio/src/lewton_decoder.rs:79:9
   |
79 |         error::Error::source(&self.0)
   |         ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `std::error::Error`

error: aborting due to 2 previous errors

Some errors occurred: E0407, E0599.
For more information about an error, try `rustc --explain E0407`.
error: Could not compile `librespot-audio`.

Caused by:
  process didn't exit successfully: `rustc --crate-name librespot_audio audio/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=3981ea95949a511e -C extra-filename=-3981ea95949a511e --out-dir /home/pi/librespot/target/release/deps -L dependency=/home/pi/librespot/target/release/deps --extern aes_ctr=/home/pi/librespot/target/release/deps/libaes_ctr-691b7738200d4255.rlib --extern bit_set=/home/pi/librespot/target/release/deps/libbit_set-ca668c96bc990ab1.rlib --extern byteorder=/home/pi/librespot/target/release/deps/libbyteorder-99ad9f1633171ff4.rlib --extern futures=/home/pi/librespot/target/release/deps/libfutures-d8fdd6976bd80ee2.rlib --extern lewton=/home/pi/librespot/target/release/deps/liblewton-d6576591a184d650.rlib --extern librespot_core=/home/pi/librespot/target/release/deps/liblibrespot_core-3d2e894f936c152a.rlib --extern log=/home/pi/librespot/target/release/deps/liblog-22b9caffd792a5ec.rlib --extern num_bigint=/home/pi/librespot/target/release/deps/libnum_bigint-46a84facb1c7cca8.rlib --extern num_traits=/home/pi/librespot/target/release/deps/libnum_traits-2bcaf7134073ee49.rlib --extern tempfile=/home/pi/librespot/target/release/deps/libtempfile-6b5d4093e2dbf0b8.rlib` (exit code: 101)

Raspberry Pi 3, latest git version (2019-06-22) and cargo 1.28.0, rustc 1.28.0 and built with the command "cargo build --features pulseaudio-backend --release".

Thanks for all the hard work!

<!-- gh-comment-id:504665379 --> @bodiroga commented on GitHub (Jun 22, 2019): +1 EDIT: this is the error I get when trying to compile the program with 'verbose' option enabled. ``` Compiling librespot-audio v0.1.0 (file:///home/pi/librespot/audio) Running `rustc --crate-name librespot_audio audio/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=3981ea95949a511e -C extra-filename=-3981ea95949a511e --out-dir /home/pi/librespot/target/release/deps -L dependency=/home/pi/librespot/target/release/deps --extern aes_ctr=/home/pi/librespot/target/release/deps/libaes_ctr-691b7738200d4255.rlib --extern bit_set=/home/pi/librespot/target/release/deps/libbit_set-ca668c96bc990ab1.rlib --extern byteorder=/home/pi/librespot/target/release/deps/libbyteorder-99ad9f1633171ff4.rlib --extern futures=/home/pi/librespot/target/release/deps/libfutures-d8fdd6976bd80ee2.rlib --extern lewton=/home/pi/librespot/target/release/deps/liblewton-d6576591a184d650.rlib --extern librespot_core=/home/pi/librespot/target/release/deps/liblibrespot_core-3d2e894f936c152a.rlib --extern log=/home/pi/librespot/target/release/deps/liblog-22b9caffd792a5ec.rlib --extern num_bigint=/home/pi/librespot/target/release/deps/libnum_bigint-46a84facb1c7cca8.rlib --extern num_traits=/home/pi/librespot/target/release/deps/libnum_traits-2bcaf7134073ee49.rlib --extern tempfile=/home/pi/librespot/target/release/deps/libtempfile-6b5d4093e2dbf0b8.rlib` error[E0407]: method `source` is not a member of trait `error::Error` --> audio/src/lewton_decoder.rs:78:5 | 78 | / fn source(&self) -> Option<&(dyn error::Error + 'static)> { 79 | | error::Error::source(&self.0) 80 | | } | |_____^ not a member of trait `error::Error` error[E0599]: no function or associated item named `source` found for type `std::error::Error` in the current scope --> audio/src/lewton_decoder.rs:79:9 | 79 | error::Error::source(&self.0) | ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `std::error::Error` error: aborting due to 2 previous errors Some errors occurred: E0407, E0599. For more information about an error, try `rustc --explain E0407`. error: Could not compile `librespot-audio`. Caused by: process didn't exit successfully: `rustc --crate-name librespot_audio audio/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=3981ea95949a511e -C extra-filename=-3981ea95949a511e --out-dir /home/pi/librespot/target/release/deps -L dependency=/home/pi/librespot/target/release/deps --extern aes_ctr=/home/pi/librespot/target/release/deps/libaes_ctr-691b7738200d4255.rlib --extern bit_set=/home/pi/librespot/target/release/deps/libbit_set-ca668c96bc990ab1.rlib --extern byteorder=/home/pi/librespot/target/release/deps/libbyteorder-99ad9f1633171ff4.rlib --extern futures=/home/pi/librespot/target/release/deps/libfutures-d8fdd6976bd80ee2.rlib --extern lewton=/home/pi/librespot/target/release/deps/liblewton-d6576591a184d650.rlib --extern librespot_core=/home/pi/librespot/target/release/deps/liblibrespot_core-3d2e894f936c152a.rlib --extern log=/home/pi/librespot/target/release/deps/liblog-22b9caffd792a5ec.rlib --extern num_bigint=/home/pi/librespot/target/release/deps/libnum_bigint-46a84facb1c7cca8.rlib --extern num_traits=/home/pi/librespot/target/release/deps/libnum_traits-2bcaf7134073ee49.rlib --extern tempfile=/home/pi/librespot/target/release/deps/libtempfile-6b5d4093e2dbf0b8.rlib` (exit code: 101) ``` Raspberry Pi 3, latest git version (2019-06-22) and cargo 1.28.0, rustc 1.28.0 and built with the command "cargo build --features pulseaudio-backend --release". Thanks for all the hard work!
Author
Owner

@kingosticks commented on GitHub (Jun 22, 2019):

The build instructions in the readme state that at least rust v1.30.0 is required.

<!-- gh-comment-id:504681259 --> @kingosticks commented on GitHub (Jun 22, 2019): The build instructions in the readme state that at least rust v1.30.0 is required.
Author
Owner

@bodiroga commented on GitHub (Jun 22, 2019):

Ouch, sorry, I have upgraded my rust and cargo version to 1.35.0 and now everything works correctly. Give it a try @jtonk and let us know 😉

PS: @kingosticks, you have been a minute faster 😄
EDIT: as stated by @kingosticks, I have corrected the version number (it's 1.35.0, not 1.3.5)

<!-- gh-comment-id:504681338 --> @bodiroga commented on GitHub (Jun 22, 2019): Ouch, sorry, I have upgraded my rust and cargo version to 1.35.0 and now everything works correctly. Give it a try @jtonk and let us know :wink: PS: @kingosticks, you have been a minute faster :smile: EDIT: as stated by @kingosticks, I have corrected the version number (it's 1.35.0, not 1.3.5)
Author
Owner

@kingosticks commented on GitHub (Jun 22, 2019):

No worries, glad it's working for you now (I assume you meant v1.35.0).

And if you still have problems @jtonk please provide more details (e.g. your version numbers).

<!-- gh-comment-id:504681568 --> @kingosticks commented on GitHub (Jun 22, 2019): No worries, glad it's working for you now (I assume you meant v1.35.0). And if you still have problems @jtonk please provide more details (e.g. your version numbers).
Author
Owner

@jtonk commented on GitHub (Jun 25, 2019):

that resolved the issue on osx, couldn't test yet with other OS, but I think we can close this. Tnx!

<!-- gh-comment-id:505606065 --> @jtonk commented on GitHub (Jun 25, 2019): that resolved the issue on osx, couldn't test yet with other OS, but I think we can close this. Tnx!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#222
No description provided.