[GH-ISSUE #1570] E0308 error in librespot-discovery-0.7.1/src/lib.rs:409 during "cargo install librespot" #713

Closed
opened 2026-02-27 19:32:06 +03:00 by kerem · 1 comment
Owner

Originally created by @abecrabt on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1570

Look for similar bugs

Please check if there's already an issue for your problem.
If you've only a "me too" comment to make, consider if a 👍 reaction
will suffice.

Description

A clear and concise description of what the problem is.

"cargo install librespot" - tried on raspberry pi and on my laptop.

librespot-discovery-0.7.1 type clash calling responder in libmdns-0.9.2, see below

I'm sorry, I'm not a rust/cargo or librespot person at all, just a user. I don't think I'm doing anything silly, & I've installed in the past, even the quite recent past. This seems to be something new. Thanks so much for any help.

Compiling librespot-discovery v0.7.1
error[E0308]: arguments to this method are incorrect
--> /home/abe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/librespot-discovery-0.7.1/src/lib.rs:409:33
|
409 | let svc = responder.register(
| ^^^^^^^^
410 | DNS_SD_SERVICE_NAME.to_owned(),
| ------------------------------ expected &str, found String
411 | name.into_owned(),
| ----------------- expected &str, found String
|
note: method defined here
--> /home/abe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libmdns-0.9.2/src/lib.rs:292:12
|
292 | pub fn register(&self, svc_type: &str, svc_name: &str, port: u16, txt: &[&str]) -> Service {
| ^^^^^^^^
help: try removing the method call
|
410 - DNS_SD_SERVICE_NAME.to_owned(),
410 + DNS_SD_SERVICE_NAME,
|
help: consider borrowing here
|
411 | &name.into_owned(),
| +

For more information about this error, try rustc --explain E0308.
error: could not compile librespot-discovery (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile librespot v0.7.1, intermediate artifacts can be found at /tmp/cargo-installao2qEI.

Version

What version(s) of librespot does this problem exist in?

How to reproduce

Steps to reproduce the behavior in librespot e.g.

  1. Launch librespot with '...'
  2. Connect with '...'
  3. In the client click on '...'
  4. See some error/problem

Log

  • A full debug log so we may trace your problem (launch librespot with --verbose).
  • Ideally contains your above steps to reproduce.
  • Format the log as code (help) or use a non-expiring pastebin.
  • Redact data you consider personal but do not remove/trim anything else.

Host (what you are running librespot on):

  • OS: [e.g. Linux]
  • Platform: [e.g. RPi 3B+]

Additional context

Add any other context about the problem here. If your issue is related to sound playback, at a minimum specify the type and make of your output device.

Originally created by @abecrabt on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1570 ### Look for similar bugs Please check if there's [already an issue](https://github.com/librespot-org/librespot/issues) for your problem. If you've only a "me too" comment to make, consider if a :+1: [reaction](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) will suffice. ### Description A clear and concise description of what the problem is. "cargo install librespot" - tried on raspberry pi and on my laptop. librespot-discovery-0.7.1 type clash calling responder in libmdns-0.9.2, see below I'm sorry, I'm not a rust/cargo or librespot person at all, just a user. I don't think I'm doing anything silly, & I've installed in the past, even the quite recent past. This seems to be something new. Thanks so much for any help. Compiling librespot-discovery v0.7.1 error[E0308]: arguments to this method are incorrect --> /home/abe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/librespot-discovery-0.7.1/src/lib.rs:409:33 | 409 | let svc = responder.register( | ^^^^^^^^ 410 | DNS_SD_SERVICE_NAME.to_owned(), | ------------------------------ expected `&str`, found `String` 411 | name.into_owned(), | ----------------- expected `&str`, found `String` | note: method defined here --> /home/abe/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libmdns-0.9.2/src/lib.rs:292:12 | 292 | pub fn register(&self, svc_type: &str, svc_name: &str, port: u16, txt: &[&str]) -> Service { | ^^^^^^^^ help: try removing the method call | 410 - DNS_SD_SERVICE_NAME.to_owned(), 410 + DNS_SD_SERVICE_NAME, | help: consider borrowing here | 411 | &name.into_owned(), | + For more information about this error, try `rustc --explain E0308`. error: could not compile `librespot-discovery` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... error: failed to compile `librespot v0.7.1`, intermediate artifacts can be found at `/tmp/cargo-installao2qEI`. ### Version What version(s) of *librespot* does this problem exist in? ### How to reproduce Steps to reproduce the behavior in *librespot* e.g. 1. Launch `librespot` with '...' 2. Connect with '...' 3. In the client click on '...' 4. See some error/problem ### Log * A *full* **debug** log so we may trace your problem (launch `librespot` with `--verbose`). * Ideally contains your above steps to reproduce. * Format the log as code ([help](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)) or use a *non-expiring* [pastebin](https://pastebin.com/). * Redact data you consider personal but do not remove/trim anything else. ### Host (what you are running `librespot` on): - OS: [e.g. Linux] - Platform: [e.g. RPi 3B+] ### Additional context Add any other context about the problem here. If your issue is related to sound playback, at a minimum specify the type and make of your output device.
kerem 2026-02-27 19:32:06 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kingosticks commented on GitHub (Sep 5, 2025):

Please check if there's already an issue for your problem.

Duplicate of #1569

<!-- gh-comment-id:3259881489 --> @kingosticks commented on GitHub (Sep 5, 2025): > Please check if there's [already an issue](https://github.com/librespot-org/librespot/issues) for your problem. Duplicate of #1569
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#713
No description provided.