[GH-ISSUE #466] build failed #295

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

Originally created by @treeshateorcs on GitHub (Apr 19, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/466

both on stable and nightly. both on 0.1.1 and git

error[E0308]: mismatched types
  --> protocol/build.rs:45:39
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                       ^^^^^^^ expected struct `std::path::Path`, found `str`
   |
   = note: expected reference `&std::path::Path`
              found reference `&'static str`

error[E0308]: mismatched types
  --> protocol/build.rs:45:51
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                                   ^^^ expected struct `std::path::Path`, found struct `std::string::String`
   |
   = note: expected reference `&std::path::Path`
              found reference `&std::string::String`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `librespot-protocol`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `librespot v0.1.1 (/home/tho/dev/rs/librespot)`, intermediate artifacts can be found at `/home/tho/.cargo/lib`

Caused by:
  build failed

must be something on my end, but i cannot solve this for the life of me

Originally created by @treeshateorcs on GitHub (Apr 19, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/466 both on stable and nightly. both on 0.1.1 and git ``` error[E0308]: mismatched types --> protocol/build.rs:45:39 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^^^^^ expected struct `std::path::Path`, found `str` | = note: expected reference `&std::path::Path` found reference `&'static str` error[E0308]: mismatched types --> protocol/build.rs:45:51 | 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); | ^^^ expected struct `std::path::Path`, found struct `std::string::String` | = note: expected reference `&std::path::Path` found reference `&std::string::String` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. error: could not compile `librespot-protocol`. To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: failed to compile `librespot v0.1.1 (/home/tho/dev/rs/librespot)`, intermediate artifacts can be found at `/home/tho/.cargo/lib` Caused by: build failed ``` must be something on my end, but i cannot solve this for the life of me
kerem closed this issue 2026-02-27 19:29:53 +03:00
Author
Owner

@treeshateorcs commented on GitHub (Apr 19, 2020):

solved by setting --features "pulseaudio-backend,with-vorbis"

<!-- gh-comment-id:616206582 --> @treeshateorcs commented on GitHub (Apr 19, 2020): solved by setting `--features "pulseaudio-backend,with-vorbis"`
Author
Owner

@treeshateorcs commented on GitHub (Apr 19, 2020):

how do i solve this?

image

<!-- gh-comment-id:616206990 --> @treeshateorcs commented on GitHub (Apr 19, 2020): how do i solve this? ![image](https://user-images.githubusercontent.com/60894565/79696945-4fcc6f00-826f-11ea-815c-8f09ea979ebb.png)
Author
Owner

@treeshateorcs commented on GitHub (Apr 19, 2020):

when i only do --features "pulseaudio-backend" (without with-vorbis), it's still the same error as in the first post

<!-- gh-comment-id:616209198 --> @treeshateorcs commented on GitHub (Apr 19, 2020): when i only do `--features "pulseaudio-backend"` (without `with-vorbis`), it's still the same error as in the first post
Author
Owner

@ashthespy commented on GitHub (Apr 19, 2020):

error[E0308]: mismatched types
  --> protocol/build.rs:45:39
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                       ^^^^^^^ expected struct `std::path::Path`, found `str`
   |
   = note: expected reference `&std::path::Path`
              found reference `&'static str`

error[E0308]: mismatched types
  --> protocol/build.rs:45:51
   |
45 |         let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc");
   |                                                   ^^^ expected struct `std::path::Path`, found struct `std::string::String`
   |
   = note: expected reference `&std::path::Path`
              found reference `&std::string::String`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `librespot-protocol`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `librespot v0.1.1 (/home/tho/dev/rs/librespot)`, intermediate artifacts can be found at `/home/tho/.cargo/lib`

Caused by:
  build failed

must be something on my end, but i cannot solve this for the life of me

This is a dupe of #460 and is caused by a breaking change in the protobuf crate.. https://github.com/librespot-org/librespot/pull/463 should fix it..

<!-- gh-comment-id:616210087 --> @ashthespy commented on GitHub (Apr 19, 2020): >``` > error[E0308]: mismatched types > --> protocol/build.rs:45:39 > | > 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); > | ^^^^^^^ expected struct `std::path::Path`, found `str` > | > = note: expected reference `&std::path::Path` > found reference `&'static str` > > error[E0308]: mismatched types > --> protocol/build.rs:45:51 > | > 45 | let p = parse_and_typecheck(&["proto"], &[src]).expect("protoc"); > | ^^^ expected struct `std::path::Path`, found struct `std::string::String` > | > = note: expected reference `&std::path::Path` > found reference `&std::string::String` > > error: aborting due to 2 previous errors > > For more information about this error, try `rustc --explain E0308`. > error: could not compile `librespot-protocol`. > > To learn more, run the command again with --verbose. > warning: build failed, waiting for other jobs to finish... > error: failed to compile `librespot v0.1.1 (/home/tho/dev/rs/librespot)`, intermediate artifacts can be found at `/home/tho/.cargo/lib` > > Caused by: > build failed > ``` > > must be something on my end, but i cannot solve this for the life of me This is a dupe of #460 and is caused by a breaking change in the protobuf crate.. https://github.com/librespot-org/librespot/pull/463 should fix it..
Author
Owner

@treeshateorcs commented on GitHub (Apr 19, 2020):

sorry for the bother. couldn't find it

<!-- gh-comment-id:616210350 --> @treeshateorcs commented on GitHub (Apr 19, 2020): sorry for the bother. couldn't find it
Author
Owner

@ashthespy commented on GitHub (Apr 19, 2020):

Can you confirm if that PR fixes it?

<!-- gh-comment-id:616210533 --> @ashthespy commented on GitHub (Apr 19, 2020): Can you confirm if that PR fixes it?
Author
Owner

@treeshateorcs commented on GitHub (Apr 19, 2020):

it does! thank you

<!-- gh-comment-id:616211175 --> @treeshateorcs commented on GitHub (Apr 19, 2020): it does! thank you
Author
Owner

@treeshateorcs commented on GitHub (Apr 20, 2020):

please merge that PR into master, i can't build spotifyd because the fix is only on dev (if that's possible)

<!-- gh-comment-id:616790950 --> @treeshateorcs commented on GitHub (Apr 20, 2020): please merge that PR into master, i can't build spotifyd because the fix is only on dev (if that's possible)
Author
Owner

@ashthespy commented on GitHub (Apr 21, 2020):

please merge that PR into master,

I'm not sure how the versioning with cargo and master work, so will leave that to others.

i can't build spotifyd because the fix is only on dev (if that's possible)

Have a look into Cargo's patch or use spotifyd's Cargo.lock and build it with cargo build --locked as possible interim solutions..

<!-- gh-comment-id:617086281 --> @ashthespy commented on GitHub (Apr 21, 2020): > > > please merge that PR into master, I'm not sure how the versioning with cargo and master work, so will leave that to others. > > i can't build spotifyd because the fix is only on dev (if that's possible) Have a look into Cargo's [`patch`](https://doc.rust-lang.org/edition-guide/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html) or use spotifyd's [`Cargo.lock`](https://github.com/Spotifyd/spotifyd/blob/bf77d9543dba84cadb9abc14e7d45ac4e1e04b1c/Cargo.lock#L1350-L1358) and build it with `cargo build --locked` as possible interim solutions..
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#295
No description provided.